POST
Exchange the code for a customer token

Authorizations

Authorization
string
header
default:sk_test_docs_246e232c64ccc7a001bf61ec0f2e6ab0
required

Authorization: Bearer <secret key>. Secret keys belong to your organisation, are shown once when created in the dashboard, and are scoped (see x-required-scope on each operation). Keep them on your server. Live keys are issued after your business is verified. Publishable keys (pk_) are only for @ketapay/checkout and don't work here.

Headers

Idempotency-Key
string
required

Unique key for this operation. Retries with the same key return the first result.

Maximum string length: 255
Example:

"7f3e2a10-6c4d-4b8e-9a1f-2d5c8e7b6a40"

Path Parameters

id
string<uuid>
required

Body

application/json
code
string
required
Pattern: ^\d{6}$
Example:

"482913"

Response

Verified

object
string
required
Allowed value: "customer_token"
token
string
required

Send as KetaPay-Customer-Token. Shown only here.

Example:

"ctk_test_4f9a2c7e1b8d6a3f5e0c9b2d7a1e4f8c"

expires_at
string<date-time>
required
email
string<email> | null
required

The customer's email on KetaPay, if known

Maximum string length: 254
Example:

"ada@example.com"

phone
string | null
required

The customer's phone on KetaPay, if known

Pattern: ^\+234[789][01]\d{8}$
Example:

"+2348012345678"

has_claimed_account
boolean
required