UNPKG

@bebapps/rapyd-sdk

Version:

An un-official [Rapyd](https://rapyd.net) SDK for Node.js.

296 lines (295 loc) 11.8 kB
export interface Payout { /** * ID of the Payout object. String starting with **payout_**. */ id: `payout_${string}`; /** * Amount of the payout, in units defined by `payout_currency`. Decimal, including the correct number of decimal places for the currency exponent, as defined in ISO 2417:2015. Same as `payout_amount`. Response only. */ amount: number; /** * An array of objects that describe limits on the amount, per currency. Contains the following fields: * - `maximum_amount` - Maximum amount supported by this payout method for the indicated currency. Decimal number. * - `minimum_amount` - Minimum amount supported by this payout method for the indicated currency. Decimal number. * - `payout_currency` - Currency of the payout. Three-letter ISO 4217 code. Uppercase. */ amount_range_per_currency: { maximum_amount: unknown; minimum_amount: unknown; payout_currency: unknown }; /** * Contains a comma-separated list of the headers required for creating a batch file. Relevant for creating a mass payout through the Client Portal. */ batch_file_header: string; /** * One of the following: * - String starting with **beneficiary_**. The response to [Create Beneficiary](ref:create-beneficiary) provides the ID of the `beneficiary` object. * - Object describing the beneficiary. Must include all fields in the [Beneficiary Object](ref:beneficiary-object), and all fields in the response to [Get Payout Required Fields](ref:get-payout-required-fields). */ beneficiary: `beneficiary_${string}` | object; /** * Country of the beneficiary. Two-letter ISO 3166-1 ALPHA-2 code. Uppercase. */ beneficiary_country: string; /** * Filters the type of entity for the beneficiary. One of the following: * - **company** * - **individual** * * Relevant to [List Payout Method Types](ref:list-payout-method-types). */ beneficiary_entity_type: 'company' | 'individual'; /** * A list of the beneficiary entity types supported by this payout method. One or more of the following: * - **company** * - **individual** */ beneficiary_entity_types: ('company' | 'individual')[]; /** * Describes the fields required for the beneficiary when you create a payout. Two or more of the following: * - `name` - Name of the field. * - `regex` - A regular expression that defines the valid values for the field. * - `type` - Type of data for the field. * - `description` - Text description of the field. */ beneficiary_required_fields: (string)[]; /** * The category of payout method type. One of the following: * - **bank** * - **card** * - **cash** * - ** ewallet** - local eWallet * - **rapyd_ewallet** - Rapyd wallet */ category: 'bank' | 'card' | 'cash' | 'ewallet' | 'rapyd_ewallet'; /** * Determines whether completion of the payout requires confirmation of the FX rate. One of the following: * - **true** - The transaction is completed immediately. * - **false** - The FX rate is confirmed by a separate API call to [Confirm Payout with FX](ref:confirm-payout-with-fx). This is the default. * * Relevant to payouts with FX. */ confirm_automatically: boolean; /** * Country of the sender. Two-letter ISO 3166-1 ALPHA-2 code. Uppercase. */ country: string; /** * Time of creation of the 'payout' object, in [*Unix time*](ref:glossary). Response only. */ created_at: number; /** * Currency that the sender is paying with. Three-letter ISO 4217 code. Uppercase. */ currency: string; /** * Description of the payout transaction. */ description: string; /** * Determines the order in which the files are returned. One of the following: * - **ASC** - Ascending. * - **DESC** - Descending. This is the default. */ direction: 'ASC' | 'DESC'; /** * ID of the Payout object after the last one in the list. String starting with **payout_**. */ ending_before: `payout_${string}`; /** * Indicates the error code of the last unsuccessful operation on the Payout object. */ error: string; /** * ID of the wallet that the money is transferred from. String starting with **ewallet_**. */ ewallet: `ewallet_${string}`; /** * An array of one object, which contains the following fields: * - **ewallet_id** - The ID of the wallet that the money is transferred from, a string starting with **ewallet_**. * - **amount** - Amount of the transaction in currency units defined in `currency`. * - **percent** - A decimal number representing a percentage of the total payout. * * Response only. */ ewallets: (object)[]; /** * Determines the time which the payout must be completed by, in [*Unix time*](ref:glossary). * * Relevant to all payout methods where the `is_expirable` field is **true** in the response to [List Payout Method Types](ref:list-payout-method-types). */ expiration: number; /** * Currency conversion rate for the payout. Decimal. Response only. */ fx_rate: number; /** * URL of an image that the merchant can use to represent the payout method. */ image: string; /** * Describes how the customer collects the payout. * * Contains the following fields: * - **name** - Short description of the instructions. * - **steps** - A 'steps' object containing a list of steps for the customer to take. Each step is named step*N*, where *N* is an integer. */ instructions: object; /** * Additional information from the merchant. For example, the merchant's instructions and transaction number that must be presented for collecting the payout. */ instructions_value: object; /** * Indicates whether the payout can be canceled. Relevant when `category` is **cash**. */ is_cancelable: boolean; /** * Indicates whether the payout expires if not completed. Relevant when `category` is **cash**. */ is_expirable: boolean; /** * Indicates whether the payout must be made at a specific physical location. Relevant when `category` is **cash**. */ is_location_specific: boolean; /** * Indicates whether the payout is made automatically, without any action by the beneficiary. Response only. */ is_online: boolean; /** * Maximum number of payout object IDs to return. Integer. */ limit: number; /** * Maximum amount supported by this payout method for the indicated currency. Decimal number. */ maximum_amount: number; /** * The maximum time (in seconds) that the merchant can set for completing the payout. Relevant when `is_expirable` is **true**. Response only. */ maximum_expiration_seconds: number; /** * ID defined by the client. Limited to 255 characters. */ merchant_reference_id: string; /** * A JSON object defined by the client. */ metadata: object; /** * Minimum amount supported by this payout method for the indicated currency. Decimal number. */ minimum_amount: number; /** * The minimum time (in seconds) that the merchant can set for completing the payout. Relevant when `is_expirable` is **true**. Response only. */ minimum_expiration_seconds: number; /** * Cumulative amount received by the beneficiary, in units defined by `payout_currency`. Response only. */ paid_amount: number; /** * Time of the payout, in [*Unix time*](ref:glossary). Response only. */ paid_at: number; /** * Amount received by the beneficiary, in units of the currency defined in `payout_currency`. Mandatory when `sender_amount` is not used. Decimal. */ payout_amount: number; /** * Currency received by the beneficiary. Three-letter ISO 4217 code. Uppercase. */ payout_currency: string; /** * A list of the currencies supported by this payout method. Three-letter ISO 4217 code. Uppercase. */ payout_currencies: (string)[]; /** * Reserved. */ payout_fees: object; /** * The type of payout method. */ payout_method_type: string; /** * Additional information about fields used in creating the specific payout method. Each object represents a field and contains the following fields: * - `name` - Name of the field. * - `type` - Type of the field (boolean, number, string). * * `regex` - A regular expression that defines the format, when `type` is **string**. * - `description` - Description of the field. * - `is_required` - Whether the field is required for adding the payout method. * - `is_updateable` - Indicates whether the field can be updated with [Update Payout](ref:update-payout). */ payout_options: ({ name: unknown; type: unknown; regex: unknown; description: unknown; is_required: unknown; is_updateable: unknown })[]; /** * The type of the payout method. */ payout_type: string; /** * Determines which file is retrieved from the platform. * - **true** - Returns the result file. * - **false** - Returns the original uploaded batch file. */ result: string; /** * One of the following: * - String starting with **sender_**. The response to [Create Sender](ref:create-sender) provides the ID of the 'sender' object. * - Object describing the sender. Must include all fields in the [Sender Object](ref:sender-object), and all fields in the response to [Get Payout Required Fields](ref:get-payout-required-fields). */ sender: `sender_${string}` | object; /** * Amount that the sender is paying in units of the currency defined in `sender_currency`. This amount remains the same regardless of FX fees. Required when `payout_amount` is not used. Decimal. */ sender_amount: number; /** * Country of the sender. Two-letter ISO 3166-1 ALPHA-2 code. Uppercase. */ sender_country: string; /** * Currency that the sender is paying with. Currency consists of a three-letter ISO 4217 code. Uppercase. */ sender_currency: object; /** * Filters the type of entity for the sender. One of the following: * - **company** * - **individual** * * Relevant to [List Payout Method Types](ref:list-payout-method-types). */ sender_entity_type: 'company' | 'individual'; /** * A list of the sender entity types supported by this payout method. One or more of the following: * - **company** * - **individual** */ sender_entity_types: ('company' | 'individual')[]; /** * Describes the fields required for the sender when you create a payout. Two or more of the following: * - `name` - Name of the field. * - `regex` - A regular expression that defines the valid values for the field. * - `type` - Type of data for the field. * - `description` - Text description of the field. */ sender_required_fields: (object)[]; /** * ID of the Payout object before the first one in the list. String starting with **payout_**. */ starting_after: `payout_${string}`; /** * A statement that includes the reason for the payout. Limited to 35 characters. */ statement_descriptor: string; /** * Indicates whether the payout method is currently available. One of the following values: * - **false** - Not available. * - **true** - Available. * * Relevant to [List Payout Method Types](ref:list-payout-method-types). * Indicates the status of the payout. Response only. * One of the following: * - **Confirmation** - The payout is waiting for a confirmation of the FX rate. * - **Created** - The payout was created successfully. * - **Completed** - The beneficiary received some or all payout funds. * - **Canceled** - The payout was canceled. * - **Error** - The payout was not created or failed after creation. * - **Expired** - The payout has expired. */ status: boolean | 'Confirmation' | 'Created' | 'Completed' | 'Canceled' | 'Error' | 'Expired'; };