Initialize a Payment
Create a Paystack checkout session for your user. Redirect them to the returned URL to complete payment.
typescript
const { checkoutUrl, reference } = await settle.payments.initialize({
endUserId: 'user_123',
amountKobo: 500000, // ₦5,000 — always pass amounts in kobo
email: 'user@example.com',
metadata: { plan: 'starter' }, // Optional — attach any extra context
})
// Redirect the user to this URL to complete payment
console.log(checkoutUrl)
// → https://checkout.paystack.com/xxxxxxxxxxxxxxxxxx
// Store this — use it to check payment status
console.log(reference)
// → ss_1234567890_abcdefRequest fields
| Field | Type | Required | Description |
|---|---|---|---|
endUserId | string | Yes | Your user's ID in your system |
amountKobo | number | Yes | Amount in kobo. ₦1 = 100 kobo. Must be a positive integer. |
email | string | Yes | User's email for the Paystack receipt |
metadata | object | No | Any extra key-value data to attach |
Converting Naira to kobo
typescript
// ₦500 = 50000 kobo
const amountKobo = nairaAmount * 100After payment
You do not need to do anything. SettleSettle receives the Paystack webhook, confirms the payment, and credits your developer balance automatically. If you need to check status manually, use settle.payments.verify().
