Skip to main content
POST
Create checkout session
Create a hosted checkout session from your backend. Pasteaza returns a checkout URL that you can redirect your customer to. You can also pass the returned reference to the Pasteaza browser SDK to open checkout in a modal.
Payment methods can be configured from your Pasteaza dashboard. You can choose the exact methods you want to offer on checkout, and Bank Transfer is enabled by default.

Endpoint

Headers

Request body

Example request

Successful response

Integration flow

1

Create session

Create the checkout session from your backend using your secret key.
2

Redirect customer

Redirect your customer to the checkoutUrl returned by Pasteaza, or pass the reference to PasteAZA.checkout.
3

Customer pays

The hosted page displays enabled payment methods. In Phase 1, Bank Transfer generates a dedicated virtual account.
4

Receive webhook

Pasteaza confirms payment, credits your primary Pasteaza wallet, and sends checkout.payment.success.

Error responses

Common errors include invalid API key, unsupported currency, invalid redirect URL, expired session, and disabled payment method.

Authorizations

Authorization
string
header
required

Use an sk_test_... key in the playground. Never enter a live key in shared environments.

Body

application/json
amount
integer
required

Amount in kobo. Must be divisible by 100.

Required range: x >= 100
Example:

50000

description
string
required
Example:

"Order"

currency
enum<string>
default:NGN
Available options:
NGN
customer
object
redirectUrl
string<uri>
Example:

"https://merchant.example/payment-complete"

metadata
object
Example:
expiresAt
string<date-time>

Response

Checkout session created.

status
boolean
required
message
string
required
data
object
required