@bebapps/rapyd-sdk
Version:
An un-official [Rapyd](https://rapyd.net) SDK for Node.js.
134 lines (133 loc) • 3.98 kB
text/typescript
export interface ServiceProvider {
/**
* ID of the service provider payment object, a string starting with **spp_**.
*/
id: `spp_${string}`;
/**
* Amount of the payment, in units 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;
/**
* Amounts available for recharge.
*/
available_amounts: object;
/**
* Full name of the service provider.
*/
brand: string;
/**
* Category of service provider. For example,
* **bills**, **education**, **financial_service**, **utility**
*/
catalog_type: string;
/**
* Subcategory of service provider. For example, **electricity**, **water**, **gas**, **internet**
*/
catalog_sub_type: string;
/**
* Optional fields for this service provider.
*/
catalog_subtype_options: any[];
/**
* The country of the service provider. Two-letter ISO 3166-1 ALPHA-2 code. Uppercase.
*/
country: string;
/**
* Time of creation of the service provider payout, in [*Unix time*](ref:glossary). Response only.
*/
created_at: number;
/**
* The currency accepted by the service provider. Three-letter ISO 4217 code. Uppercase.
*/
currency: string;
/**
* Description of the payment transaction.
*/
description: string;
/**
* ID of the consumer's wallet. String starting with **ewallet_**.
*/
ewallet: `ewallet_${string}`;
/**
* One or more wallet objects containing these fields:
* - **ewallet_id** - ID of the consumer's wallet. String starting with **ewallet_**.
* - **amount** - Amount of the payment with this wallet, in units defined in `currency`. Decimal.
* - **percent** - Percentage of amount due, paid with this wallet.
* - **refunded_amount** - Amount refunded to this wallet.
*/
ewallets: (object)[];
/**
* Object containing the fields required for the service provider. To get a list of required fields, use [Retrieve Service Provider Details](ref:retrieve-service-provider-details).
*
* **Note:** The 'fields' object can contain only fields that are either required or optional. A field with an unknown name will throw an error.
*/
fields: object;
/**
* Maximum number of hours for a payment to appear on the consumer's bill. Integer from 0 to 72.
*/
hours_to_fulfill: number;
/**
* URL for the icon image for the service provider.
*/
icon_url: string;
/**
* Instructions for the consumer to make the payment.
*/
instructions: object;
/**
* Indicates whether this service provider is available.
*/
is_active: boolean;
/**
* Indicates whether this service provider supports checking a consumer's balance.
*/
is_balance_check_supported: boolean;
/**
* Indicates whether this service provider supports canceling a payment.
*/
is_cancelable: boolean;
/**
* Indicates whether this service provider supports recharging.
*/
is_rechargeable: boolean;
/**
* A JSON object defined by the client.
*/
metadata: object;
/**
* Time that the service provider payout is closed, in [*Unix time*](ref:glossary). Response only.
*/
paid_at: number;
/**
* Reserved.
*/
pay_options: object;
/**
* Explanation for the `status`. Response only.
*/
reason: string;
/**
* Options for making recurrent payments.
*/
recurrency_options: object;
/**
* Contains the fields that this service provider requires for making a payment.
*/
required_fields: object;
/**
* The ID of the service provider.
*/
service_provider: string;
/**
* Indicates whether a consumer has an account with a specified service provider. One of the following values:
* - **Exist**
* - **NotExist**
*
* Response only.
*/
status: 'Exist' | 'NotExist';
/**
* The ID of the service provider.
*/
type: string;
};