@bebapps/rapyd-sdk
Version:
An un-official [Rapyd](https://rapyd.net) SDK for Node.js.
81 lines (80 loc) • 3.85 kB
text/typescript
export interface Escrow {
/**
* ID of the escrow, a string starting with **escrow_**.
*/
id: `escrow_${string}`;
/**
* The amount in escrow, in units of the currency defined in `currency`. Decimal, including the correct number of decimal places for the currency exponent, as defined in ISO 2417:2015. If the amount is a whole number, use an integer and not a decimal.
*/
amount: number;
/**
* Total amount of funds that are currently held in the escrow, in the currency defined in `currency_code`.
*/
amount_on_hold: number;
/**
* Date and time the escrow was created, in [*Unix time*](ref:glossary).
*/
created_at: number;
/**
* ID of the escrow, a string starting with **escrow_**.
*/
escrow: `escrow_${string}`;
/**
* Indicates the number of days after creation of the payment that funds are released from escrow. Funds are released at 5:00 pm GMT on the day indicated. Integer, range: 1-90.
*/
escrow_release_days: number;
/**
* Array of objects that describe individual releases.
*
* See ***Escrow Releases Object***, below.
*/
escrow_releases: any[];
/**
* Array of objects that define the allocation of the release to multiple wallets. Each object contains the following fields:
* * `ewallet` - ID of the wallet, a string starting with 'ewallet_'.
* * `amount` - The amount to release to this wallet. Relevant when `percentage` is not set.
* * `percentage` - The percentage of this escrow to release to this wallet. Relevant when `amount` is not set. On a partial release after the first, this refers to the percentage of the original amount of the escrow.
*
* **Note:** All wallets in the array must be specified by `amount` or by `percentage` or neither. If neither `amount` nor `percentage` is set, the release is proportionate according to the split defined in the payment.
*/
ewallets: any[];
/**
* Date and time of the completion of the last payment or partial payment, in [*Unix time*](ref:glossary).
*/
last_payment_completion: number;
/**
* ID of the payment, a string starting with **payment_**.
*/
payment: `payment_${string}`;
/**
* The percentage that is paid to the wallet out of the total payment. Positive decimal, up to 3 decimal places. If the amount is a whole number, use an integer and not a decimal. Maximum value: 100.
*/
percentage: number;
/**
* Status of the escrow. One of the following:
* * **pending** - The payment and escrow were created, but the payment is not completed and the funds are not in the escrow.
* * **on_hold** - The payment is completed and the funds are in escrow.
* * **canceled** - The escrow is canceled.
* * **released** - All or part of the funds have been released to the wallets.
* Indicates the status of the refund operation. One of the following values:
* * **Completed** - The refund was complete.
* * **Rejected** - The refund was not made because of an internal error.
* * **Pending** - The request created a refund object on the Rapyd platform, but the refund is not yet complete. For example, the refund is for a payment method that requires a customer action, such as cash, bank redirect or bank transfer.
*
* Read-only.
*/
status: 'pending' | 'on_hold' | 'canceled' | 'released' | 'Completed' | 'Rejected' | 'Pending';
/**
* Total amount of funds that were released to the wallets, in the currency defined in `currency_code`.
*/
total_amount_released: number;
/**
* Date and time of the last update to the escrow, in [*Unix time*](ref:glossary).
* Time that this refund was last updated, in [*Unix time*](ref:glossary). Read-only.
*/
updated_at: number | number;
/**
* Number of the receipt for the refund, provided by the merchant. Read-only.
*/
receipt_number: string;
};