Handle errors and check payment status
A successful HTTP request does not always mean a payment succeeded. Some endpoints return HTTP 200 and status: true even when the provider reports a failed or pending payment. Check the payment fields in the response before updating your own records.
What to do with each result
| Result | What to do |
|---|---|
| 200 with provider success | Save the returned references and confirm the payment through its status endpoint. |
Pending, PendingTSQ or an unknown provider code | Keep the payment pending in your app. Query its original reference; do not send a second debit. |
202 with data.statusCode: AML_HOLD | No funds moved. Save approvalId and amlApprovalReference, then wait for the bank's anti-money-laundering review. Follow the bank's process to release an approved request. |
| 400 | Read message and the validation errors. Correct the fields. If a payment may already have reached the provider, check that payment first. |
| 401 | Sign in again if the token expired. Contact the bank if the API key is inactive. |
| 403 | Check that you are using API credentials and that the bank has granted access. Staff portal tokens cannot be used for bank-client API requests. |
| 404 | Check the URL and record identifier. If a payment-status lookup returns 404, ask the bank to investigate before submitting another payment. |
| 409 | Read the conflict message. For overlapping document IDs, supply documentScope. For payments, look up the original instruction. |
| 429 | Wait for the number of seconds in Retry-After before trying again. |
| Timeout, disconnect, 5xx or an unreadable response | The payment may still have been processed. Query its original reference and contact the bank if the result remains unknown. |
ConfirmManually, or success reported after a reversal | Stop automatic retries and ask the bank to resolve the difference between the provider result and the account transactions. |
Use the status endpoint for the payment you sent:
- Outward transfer:
GET /api/transfer/v1/tsq. - Local transfer:
GET /api/transfer/v1/tsq/local. - Bill payment:
POST /api/bills/v1/tsq. - Collections-ledger loan repayment:
GET /api/loanaccount/v1/repaymentstatus?Reference=....
Send the original reference accepted by that endpoint. A status query can also update payment or refund records, so save its response with the original request.
Keep request and payment references separate
The request-reference header helps the bank trace an HTTP attempt. It does not guarantee that repeating a request will return the old result without processing it again.
Give each HTTP attempt a new request reference. Separately, save your application's payment ID and the endpoint's payment reference: transactionReference for outward transfers or paymentReference for bills.
Prevent two workers, job retries or repeated clicks from submitting the same payment at once. If the response is lost, check the original payment. Sending it with a new payment reference can debit the customer again.
An unknown transfer or bill-payment result stays pending for a status check. A confirmed decline triggers a refund; a timeout alone does not. Ask the bank which provider codes mean success, decline and pending, and test each before launch.
Read the response body correctly
Authentication returns accessToken, tokenType, expirationTime and tokenValiditySec directly. Other endpoints often use status, message and data, but their response formats differ. Check the selected endpoint's response fields in the explorer.
Errors can include reason, nextStep, summary or errors. Validation errors may use a JSON problem-details response. Rate-limit errors can include code, message and retryAfterSeconds.
Check the HTTP status and Content-Type before parsing JSON. An authentication or server error may have an empty body, and reports may return files. Allow optional fields to be absent and ignore extra fields your app does not use.
Set timeouts and retry limits
Set a timeout on each API call. A timeout stops your app waiting; it does not necessarily stop the bank processing the request. Canceling a wait in the explorer works the same way.
Store access tokens on your backend and sign in again before expirationTime. Share the renewed token between workers so they do not all authenticate at once. API keys become inactive after 14 days without activity.
Agree request rates and payment-status check frequency with the bank. After a rate-limit response, wait at least as long as Retry-After says. Increase the wait between repeated failures, add a small random delay so workers do not retry together, and stop after a set number of attempts. Keep unresolved payments pending and contact the bank.
If browser requests fail
For production, call CoreWave from your backend so client secrets stay out of your web or mobile app.
To use the explorer, the bank must allow requests from the documentation website. Its CORS settings must allow the requested method and the Authorization, Content-Type and request-reference headers. OPTIONS preflight requests must work without a bearer token. Responses must expose request-reference, Retry-After and Content-Disposition for the browser to read them.
The explorer keeps tokens in page memory and clears them when you change the bank URL or environment. It does not put the token in copied cURL commands. Before sending a write request, check the destination URL and select the confirmation checkbox.
Contact the bank with useful details
Include the environment, HTTP method and path, time and timezone, HTTP status, provider code, request reference, original payment reference and returned session or posting IDs. Include a redacted request if needed.
Never include bearer tokens, client secrets, PINs or customer identity documents in a routine support message. Use the bank's approved secure channel for any account or customer details it needs.
Amount precision
Send payment and funding amounts in base currency units, with at most two decimal places: 100.25 means 100 naira and 25 kobo. Transfer amounts, fees, bill payments, posting entries, deposit principal/top-ups, loan principal/repayments and account limits reject fractional kobo. Round the amount in your application before submitting it, using the rounding rule agreed with the bank. Use a decimal or minor-unit representation internally to avoid binary floating-point errors. The endpoint schema gives the allowed minimum and maximum for each amount.
Search results preserve empty arrays as [], including nested result lists. Date-only search bounds cover the inclusive UTC calendar dates on record creation timestamps, unless the endpoint describes a financial-date filter.
Changes awaiting bank approval
Lien and overdraft responses include an approval receipt. A pending change does not alter the live record. Save the receipt and query GET /api/operations/v1/approvalstatus by approval ID or reference. See Track bank approvals for states and follow-up steps. This is separate from payment TSQ and AML release.