Authorization
default A public key (pk./pk_test.) is accepted on /payments, /customers, /links, /invoices and the catalogue reads (/channels, /providers, /countries, /currencies); anything that moves money out, reads the balance or manages the account answers 406 to it. It is an identifier, never an authorization. Use a secret key (sk./sk_test.) for sensitive operations (transfers, refunds, balance), or a restricted key (rk./rk_test.) scoped to specific permissions. The _test. variant of any key selects the sandbox environment, there is no separate sandbox URL. Never expose your secret key in client-side code.
In: header
Path Parameters
Payment `id`.
Header Parameters
Your key for this request, 1 to 128 characters of letters, digits and `. _ : -`. The same request sent again with the same key returns the first answer instead of doing the work twice. See [Idempotency](/api/idempotency).
Request Body
application/json
With `confirm_otp`: the `otp_id` of the charge's answer.
With `otp_id`: the code the payer received.
With `confirm_pin`: the `pin_id` of the charge's answer.
With `pin_id`: the card's PIN, as the payer typed it.
With `confirm_phone`: the `phone_id` of the charge's answer.
With `phone_id`: the payer's phone number.
With `confirm_birthday`: the `birthday_id` of the charge's answer.
With `birthday_id`: the payer's date of birth, `YYYY-MM-DD`.
With `confirm_address`: the `address_id` of the charge's answer.
With `address_id`: the billing street address.
With `address_id`: the billing city.
With `address_id`: the billing state or region.
With `address_id`: the billing postal code.
With `client_session`: the `client_session.id` of the charge's answer, once the payer has finished in the provider's window.
With `client_session_id`, for a provider whose window hands back its own payment id.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.wajub.com/payments/trx_CSUGajfv9xh0XQ5wu2lx/confirm" \ -H "Idempotency-Key: confirm-order-1042" \ -H "Content-Type: application/json" \ -d '{}'{ "code": 200, "status": "OK", "message": "Payment confirmed.", "transaction": { "id": "trx_CSUGajfv9xh0XQ5wu2lx", "status": "succeeded", "amount": 5000, "currency": "NGN" }}Confirmed, the payment is paid