modem-pay
Version:
A TypeScript SDK for integrating with the Modem Pay payment gateway, enabling seamless payment processing and financial services in your applications.
56 lines (55 loc) • 1.56 kB
TypeScript
/**
* Representation of a SubAccount.
*/
export type SubAccount = {
/**
* Unique identifier for the subaccount.
*/
id: string;
/**
* Name of the business associated with the subaccount.
*/
business_name: string;
/**
* Settlement code for the subaccount. Can be "wave" or "afrimoney".
*/
settlement_code: "wave" | "afrimoney";
/**
* Account number associated with the subaccount.
*/
account_number: number;
/**
* Percentage allocation for the subaccount.
*/
percentage: number;
/**
* Identifier for the business this subaccount belongs to.
*/
business_id: string;
/**
* Identifier for the account this subaccount is linked to.
*/
account_id: string;
/**
* Indicates if the subaccount is in test mode.
*/
test_mode: boolean;
/**
* Indicates if the subaccount is active.
*/
active: boolean;
/**
* The current balance of the subaccount.
*/
balance: number;
};
/**
* Parameters required to create a SubAccount.
* Only includes business_name, percentage, settlement_code, and account_number.
*/
export type SubAccountParams = Pick<SubAccount, "business_name" | "percentage" | "settlement_code" | "account_number">;
/**
* Parameters required to update a SubAccount.
* All fields are optional: active, settlement_code, account_number, and percentage.
*/
export type SubAccountUpdateParams = Partial<Pick<SubAccount, "active" | "settlement_code" | "account_number" | "percentage">>;