Skip to main content

Create an online checkout order

Step 1 of 7. Before you can charge a card later, the customer has to pay with it once. Create a checkout order for that first payment, with tokenizeCard set to true. The first payment does two things. It proves that the card is valid and can be charged, and the customer approves the payment with their bank. After that, you can charge the card without the customer re-entering their card details.

POST /v1/checkout/order

tokenizeCard goes at the top level of the request body, next to order. Nomba ignores it if you put it inside order, and the card isn’t saved.

Headers

string
required
Bearer <access_token>. See Authenticate.
string
required
Your account ID

Request body

These are the fields that matter for saving a card. For the full list, see Create a checkout order.
object
required
Details of the first payment
boolean
required
Set it to true to save the card when the payment succeeds

Response body

string
required
"00" when the order was created
string
required
Response description
boolean
required
Request status
object
required
Keep data.orderReference from the response. You send it with the card details in the next step.

Choose the amount for the first payment

If the first payment is the customer’s first bill, such as the first month of a subscription, charge the real amount. If you only need the payment to save the card, charge a small amount. Then refund it, or give the customer the same value in your app, such as wallet credit. Nomba doesn’t set a minimum amount, but some banks decline very small card payments, so test the amount you plan to use.
Set tokenizeCard only when you plan to charge the card again. Tell the customer you’ll save their card and how you’ll use it, and get their agreement before they pay.

Next: Submit card details

Send the card details your customer entered on your page.