Send a test bank transfer
const url = 'https://api.paywithnablr.com/v1/test/transfers';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"account_number":"9912345678"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.paywithnablr.com/v1/test/transfers \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "account_number": "9912345678" }'Test mode only (sk_test_ key). Pays into a test transfer account
that the checkout issued, as if the customer had made the transfer.
Omit amount to send exactly what was asked; send a different amount
to see an amount mismatch. The payment’s outcome then follows the
test amount rules.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The account number the checkout showed the customer.
Minor units. Omitted or 0 means the exact amount due.
Example
{ "account_number": "9912345678"}Responses
Section titled “Responses”The payment after the transfer.
object
channel is the method that paid: null until the payment
succeeds, never the method of an attempt that failed.
fee, charged_amount and net are exact once the payment has
succeeded: the price of the method that paid. Before that they are a
quote, and nothing has been charged: the price of the method the
customer last chose, or, before they choose, the highest across the
methods offered (what the customer pays at most).
object
pending: waiting for the customer. processing: the payment network
has the payment and has not confirmed it. succeeded: paid. failed: the
checkout closed after the last attempt failed. abandoned: the
checkout closed with nothing tried. refunded and
partially_refunded are reserved for refunds, which are not yet
available.
The amount you asked for, in kobo.
Our fee, in kobo. Each method’s price is fixed when the payment is created; once succeeded this is the paying method’s fee, before that a quote (see above).
merchant: the fee comes out of amount. customer: the fee is added to what the customer pays.
What the customer pays, in kobo. amount, plus fee when the customer bears it. A quote until the payment succeeds.
What you receive, in kobo. A quote until the payment succeeds.
The methods the checkout offers.
object
What you sent. {} if you sent nothing.
object
The payment link this payment came through, if any.
Why the last attempt failed, in words you can show the customer. null once succeeded.
When the checkout closes.
The settlement (stl_…) that paid this out, once settled.
object
This request’s id, also in the X-Request-Id header.
Example
{ "data": { "id": "pay_01M3XX8PCBFA5VZ3PQZQ0S78BP", "object": "payment", "reference": "order_1042", "status": "pending", "mode": "test", "amount": 500000, "currency": "NGN", "fee": 7500, "fee_bearer": "merchant", "charged_amount": 500000, "net": 492500, "channel": "card", "channels": [ "card" ], "customer": { "id": "cus_01M3XX8ERVFY9A1FAQ2EGHYZWT", "email": "ada@example.com", "name": "Ada Obi" }, "failure_reason": "Your bank declined the card: insufficient funds.", "authorization": { "brand": "visa", "last4": "4081", "exp_month": 12, "exp_year": 2030, "bank": "Nablr Test Bank", "nablr_handle": "ada" } }}VALIDATION_FAILED: a field is wrong; details says which. A value
of the wrong JSON type has detail code type and a message saying
what to send (Send a whole number., Send text., Send true or false., Send an object., Send a list.).
MALFORMED_REQUEST: the body is not valid JSON.
object
object
A sentence for a person. Safe to show to your user.
The code in words, for example Validation failed.
A quotable reference for some failures.
One entry per field that is wrong.
object
For example required, invalid, format, length, unknown, type.
Extra context, such as retry_after_seconds on RATE_LIMITED.
object
object
This request’s id, also in the X-Request-Id header.
Example
{ "error": { "message": "Send a positive amount in minor units (500000 = ₦5,000.00).", "code": "VALIDATION_FAILED", "title": "Validation failed", "details": [ { "field": "amount", "code": "invalid", "message": "Send a positive amount in minor units (500000 = ₦5,000.00)." } ] }, "meta": { "request_id": "01a0fbd4-3b18-7181-9149-8dbcae100085" }}UNAUTHENTICATED: no Authorization: Bearer header. The message
says what to send: your secret key (Bearer sk_test_… or
sk_live_…).
INVALID_API_KEY: the key is unknown, malformed or revoked.
object
object
A sentence for a person. Safe to show to your user.
The code in words, for example Validation failed.
A quotable reference for some failures.
One entry per field that is wrong.
object
For example required, invalid, format, length, unknown, type.
Extra context, such as retry_after_seconds on RATE_LIMITED.
object
object
This request’s id, also in the X-Request-Id header.
Example
{ "error": { "message": "The API key provided is not valid.", "code": "INVALID_API_KEY", "title": "Invalid API key" }, "meta": { "request_id": "01a0fbd4-3b68-75e0-bd33-0b950ddc99a5" }}TEST_MODE_ONLY with a live key, or one of the key errors.
object
object
A sentence for a person. Safe to show to your user.
The code in words, for example Validation failed.
A quotable reference for some failures.
One entry per field that is wrong.
object
For example required, invalid, format, length, unknown, type.
Extra context, such as retry_after_seconds on RATE_LIMITED.
object
object
This request’s id, also in the X-Request-Id header.
Example
{ "error": { "code": "VALIDATION_FAILED", "details": [ { "field": "amount" } ] }}NOT_FOUND: no such object in this mode, or it is not yours.
object
object
A sentence for a person. Safe to show to your user.
The code in words, for example Validation failed.
A quotable reference for some failures.
One entry per field that is wrong.
object
For example required, invalid, format, length, unknown, type.
Extra context, such as retry_after_seconds on RATE_LIMITED.
object
object
This request’s id, also in the X-Request-Id header.
Example
{ "error": { "message": "This payment could not be found.", "code": "NOT_FOUND", "title": "Not found" }, "meta": { "request_id": "01a0fbd4-5df3-7308-8497-51f8ed8d7c77" }}RATE_LIMITED: wait Retry-After seconds, then retry.
object
object
A sentence for a person. Safe to show to your user.
The code in words, for example Validation failed.
A quotable reference for some failures.
One entry per field that is wrong.
object
For example required, invalid, format, length, unknown, type.
Extra context, such as retry_after_seconds on RATE_LIMITED.
object
object
This request’s id, also in the X-Request-Id header.
Example
{ "error": { "message": "Too many attempts. Please wait a moment and try again.", "code": "RATE_LIMITED", "title": "Rate limited", "meta": { "retry_after_seconds": 12 } }, "meta": { "request_id": "01a0fbd4-3b68-75e0-bd33-0b950ddc99a5" }}Headers
Section titled “Headers”Seconds to wait.
Unix time when a request will be allowed again.