Skip to main content

Connect bank-side provider callbacks

Provider callbacks are part of the bank's server integration. They are separately authenticated from the bank-client API. The callback reference and provider OpenAPI JSON include all 22 registered callback routes and aliases.

Bank-client applications use the normal API explorer and API-channel JWT. Giving a caller a bank-client token does not authorize these callbacks.

Prepare your connection​

Get the bank's staging base URL, callback secret, numeric bank ID and existing test account or loan identifiers. Callback credentials differ from bank-client credentials. The examples use Bash or Zsh, cURL and uuidgen.

export COREWAVE_BASE_URL='https://api.staging.ibanks.corewavecba.com'
export COREWAVE_CALLBACK_KEY='YOUR_BANK_CALLBACK_SECRET'

Replace the secret placeholder through your approved secret store or local environment. Do not commit it or include it in support messages. Use a separate callback secret for each bank and environment. The callback reference provides a complete JSON body and authenticated command for each action. Replace sample bank, account and loan identifiers before sending. Transaction and collection callbacks can move money.

Card gateway authentication and request format​

Card callbacks require the X-API-KEY callback secret supplied by the bank. Agree the callback URLs and credentials with the bank before sending events. Do not pass the key in a query string or send it to bank-client applications.

The generic route is POST /api/card/v1/webhooks/{provider}/{eventType}. Supported providers are providus and interswitch. The API also accepts fixed paths under /cba/cards/{provider}/transaction-feedback and /cba/cards/{provider}/lifecycle-feedback.

Put the event details inside payload. The surrounding JSON can also include eventType, sourceTraceId, headers and query. Transaction fields placed outside payload will not be read.

Transaction feedback​

{
"eventType": "transaction_feedback",
"sourceTraceId": "ORIGINAL_STABLE_EVENT_REFERENCE",
"payload": {
"institutionId": 1,
"accountNumber": "YOUR_REAL_ACCOUNT_NUMBER",
"transactionReference": "ORIGINAL_PROVIDER_TRANSACTION_REFERENCE",
"amount": 100,
"responseCode": "00"
}
}

Replace the example institutionId and account details with values supplied by the bank. Amounts use Naira. A transaction callback can debit a real account, so it must include a provider code or status that clearly confirms success. Pending, declined, contradictory or unknown outcomes are rejected without moving money. A stable transaction reference is required; sourceTraceId is a fallback only when it remains stable across retries. A newly generated request reference cannot safely identify a duplicate delivery.

The bank checks the account, settlement ledger, amount and anti-money-laundering (AML) rules before posting. Requests for the same bank, provider and reference are processed one at a time. The debit and its event details are saved together. Sending the same successful event again does not post another debit. An exact replay can acknowledge the original posting after the business date closes; reusing its reference with a different account or amount returns 409. New postings wait for EOD operations and require one open, ready business date.

If an account number exists in multiple institutions, provide payload.institutionId; ambiguous routing returns 409 without choosing a bank. Missing or invalid settlement ledgers return 503, and non-positive or fractional-cent amounts return 400; none of these failures moves money or acknowledges a completed posting. Inspect status and message on every response, retain the original event, and resolve configuration failures with the bank before retrying.

Lifecycle feedback​

Lifecycle callbacks update local card status and never post a transaction debit, even if the provider includes an amount in the payload.

{
"eventType": "card_blocked",
"payload": {
"institutionId": 1,
"cardId": "YOUR_EXTERNAL_CARD_ID"
}
}

Supported events are card_issued, card_activated, card_unblocked → Active, card_blocked → Blocked, and card_deleted → Deleted. Generic lifecycle feedback can instead carry a supported payload.status / cardStatus of active, blocked or deleted. The card must already be linked locally. If the same provider card ID exists in multiple institutions, supply institutionId; ambiguous events return 409.

Lifecycle delivery does not create a missing card link. Use the bank-client addcardtoaccount operation to link a card already created by the provider; that operation does not request a new plastic card from the provider.

Recova mandate and collection callbacks​

The callback routes use the spelling recova. Routes begin /api/integrations/recova/v1/{institutionId}.

Authenticate with Authorization: Bearer SECRET, using the Recova callback secret supplied by the bank. This is a configured shared secret, not a JWT from /api/auth/v1/authenticate.

ActionMain route suffixInputs / behavior
SMS alertsms-alertphoneNumber and message; a failure to send returns 503.
Mandate/disbursementmandate-creationExisting loanReference and callback fields; bank approval/mandate rules apply.
Collection updateloan-balance-updateThe loanReference of an existing loan at this bank and the collection details. Check the payment and approval results.
Due amountloan-due?loanReference=...Computes due principal, interest, penalties, defaults and fees through the institution's financial date.

Path-based LoanDueAmount/{loanReference} and LoanDue/{loanReference} are also supported. Query-only aliases accept loanReference; the older queryLoanReference query name remains accepted. The callback reference lists every alias and request field.

Required Recova fields​

For an SMS alert, send phoneNumber and message. For a mandate update, send the existing loanReference and the provider's original transactionReference. A mandate callback can initiate loan disbursement, so send it only after the provider confirms the mandate event. The bank's approval rules still apply.

For a collection update, send the existing loanReference, a stable transactionReference unique to that collection, and a positive settlementAmount or debitedAmount. A positive settlementAmount takes precedence; otherwise the API uses debitedAmount. The recovery-fee field does not replace the amount to settle. Use the provider's confirmed amounts, rather than calculating a new collection from the callback.

{
"loanReference": "LOAN-001",
"transactionReference": "example-collection-001",
"debitedAmount": 100,
"settlementAmount": 100,
"recoveryFee": 0,
"narration": "Example loan collection"
}

Send this body to POST /api/integrations/recova/v1/{institutionId}/loan-balance-update, replacing the path's bank ID and the body's loan and payment references. Authenticate with the bank's Recova callback secret. Reuse the same collection reference when retrying that event; use a different reference for each new collection on the same loan. Check the response before acknowledging settlement.

Collection callbacks require a nonblank transactionReference of at most 100 characters. Amounts must be nonnegative with at most two decimal places, and the amount applied must be positive. Reusing a processed reference with changed loan ownership or amounts returns HTTP 409. An exact replay acknowledges the original result without moving money again, including when the business date has since closed.

New collections require one open, ready business date. Funding, repayment and the completion marker commit together; failed processing rolls all of them back. An amount greater than the currently due balance is rejected for reconciliation rather than silently reduced. An ambiguous loan reference is rejected rather than choosing a loan arbitrarily. The SMS callback does not require a loan reference.

Bank acceptance and operations​

Test incorrect secrets, events sent to the wrong bank, missing or ambiguous identifiers, unknown results, duplicate deliveries, AML holds and card-status changes. Match successful events to the account transactions. Keep callback secrets separate from client credentials and preserve original event references in the audit trail.

Agree the retry schedule, any signature checks and the support process with the bank and provider. Confirm callback delivery and settlement in the bank’s staging environment before launch.