Errors and retries

Handle API failures and retry create requests without duplicating orders.

A failed request returns status: false, an error message, and a stable code. Match on code, and display error to people.

{
  "status": false,
  "error": "Quote lapsed or already used. Get a new one.",
  "code": "quote_expired"
}

Error codes

A 404 response does not reveal whether another business owns the quote or order.

HTTPCodeWhen
400bad_requestMalformed JSON, a missing required field, or an invalid field format.
400amount_requiredProvide exactly one of source_amount or destination_amount.
400invalid_amountQuote amount is outside the supported range.
400invalid_currencyNeither side is NGN, or both are.
400invalid_assetUnsupported crypto asset.
400invalid_networkUnsupported chain for that asset.
400quote_expiredQuote lapsed or already used. Get a new one.
409quote_not_refreshableA consumed quote cannot be refreshed.
400quote_flow_mismatchOnramp quote used on offramp, or the reverse.
400invalid_destination_addressNot a valid address for the chain.
400account_verification_failedBank could not confirm the account.
401unauthorizedInvalid or missing API key.
404quote_not_foundNo such quote for your business.
404order_not_foundNo such order for your business.
409duplicate_referenceThe reference belongs to a different request in the same resource.
409quote_changedA refresh changed the quote during order creation.
429rate_limitedToo many requests. Wait 60 seconds before retrying.
503service_unavailableAn upstream service was unreachable and nothing was written. Retry.
500internalUnexpected failure. Safe to retry with the same reference.

Retries are safe

An order create can time out after Pulse stores the order. The reference lets a repeated request return that order instead of creating another one.

Store the reference first

Generate a reference for the payment in your system. Store it before you create the order.

Retry the same request

After a timeout, 503 service_unavailable, or 500 internal, send the same body with the same reference.

Save the order ID

After a successful create, store the returned order ID (id) with your reference. You can also find the order with GET /v1/orders?reference=....

Use a unique reference for each order across both flows. Reuse a reference only for the same create request.

For 409 duplicate_reference, read the existing order. Use a new reference only when you intend to create a different order.

For 409 quote_changed, your integration must refresh the quote again and review the response. It can then retry the order request.

On this page