feat: (payment) add eBirr as synchronous API_PURCHASE wallet debit

This commit is contained in:
Abubeker Yasin
2026-08-10 11:36:05 +03:00
parent 78d69eb02b
commit 6471c3511a
19 changed files with 1591 additions and 380 deletions

View File

@@ -58,6 +58,17 @@ export type ClientAction =
providerOrderId: string;
message?: string;
}
| {
/**
* Wallet push-debit (eBirr): the provider has already prompted the payer on their own
* handset (USSD/app PIN). There is nothing to navigate to and nothing to collect —
* the client shows `message` and polls the intent until it turns terminal.
*/
type: "AWAIT_PUSH";
message: string;
/** Masked MSISDN the prompt was pushed to, so the payer can confirm it's their phone. */
payerAccountMasked?: string;
}
| {
/** CBE_BILL: show the bill reference the customer pays at any CBE channel. */
type: "SHOW_BILL_REFERENCE";
@@ -77,6 +88,8 @@ export interface ProviderInitiationInput {
* Payer account identifier (e.g. mobile-wallet MSISDN in full international format).
* Optional and provider-specific: some wallet providers (e.g. Waafi HPP with
* MWALLET_ACCOUNT) require the payer's phone number up front to pre-fill the hosted page.
* For push-debit providers (eBirr, CAC Bank) it is mandatory — it is the account the PIN
* prompt is pushed to, so there is no hosted page that could collect it later.
*/
payerAccount?: string;
/** Optional caller-supplied redirect targets for redirect/HPP-style providers. */