@bebapps/rapyd-sdk
Version:
An un-official [Rapyd](https://rapyd.net) SDK for Node.js.
109 lines (107 loc) • 3.9 kB
text/typescript
import { CustomElements } from '../types/CustomElements';
export interface CreateCheckoutPageRequest {
/**
* The amount of the payment, in units of the currency defined in `currency`. Required if `cart_items` is not used. Decimal.
*/
amount?: number;
/**
* URL where the customer is redirected when the checkout page is closed before the payment has been completed.
*/
cancel_checkout_url?: string;
/**
* Object that describes the cart items that the customer is purchasing. Required if `amount` is not used.
*/
cart_items?: object;
/**
* URL where the customer is redirected when checkout is successful. This page usually appears after the user clicks the **Finish** button, and can be set dynamically for each generated checkout.
*/
complete_checkout_url?: string;
/**
* URL where the customer is redirected when payment is successful. Relevant to bank redirect payment methods.
*/
complete_payment_url?: string;
/**
* The two-letter ISO 3166-1 ALPHA-2 code for the country. Uppercase.
*/
country: string;
/**
* Defines the currency for the amount. Three-letter ISO 4217 code. For FX transactions, see [Checkout Page Object](ref:checkout-page-object).
*/
currency: string;
/**
* Conditions for displaying additional parameters on the checkout page. See [Custom Elements Object](ref:custom-elements-object).
*/
custom_elements?: Partial<CustomElements>;
/**
* ID of the 'customer' object. String starting with **cus_**. When used, the customer has the option to save card details for future purchases.
*/
customer?: `cus_${string}`;
/**
* Description of the payment.
*/
description?: string;
/**
* URL where the customer is redirected when payment is not successful. Relevant to bank redirect payment methods.
*/
error_payment_url?: string;
/**
* ID of the wallet that the money is paid into. String starting with **ewallet_**.
*/
ewallet?: `ewallet_${string}`;
/**
* Time when the payment expires if it is not completed, in [*Unix time*](ref:glossary).
*/
expiration?: string;
/**
* Indicates whether the FX rate is fixed for the buy side (seller) or for the sell side (buyer). One of the following values: **sell** or **buy**.
*/
fixed_side?: string;
/**
* Determines the default language of the hosted page.
*/
language?: string;
/**
* In a payment with FX where `fixed_side`=**buy**, determines whether the buyer's currency and the exchange rate appear.
*/
merchant_currency_only?: boolean;
/**
* Identifier for the transaction. Defined by the merchant.
*/
merchant_reference_id?: string;
/**
* A JSON object defined by the client.
*/
metadata?: object;
/**
* End of the time when the customer can use the Checkout page, in [*Unix time*](ref:glossary).
*/
page_expiration?: number;
/**
* Length of time for the payment to be completed after it is created, measured in seconds.
*/
payment_expiration?: string;
/**
* Describes the fees that can be charged for a payment transaction.
*/
payment_fees?: object;
/**
* The type of the payment method.
*/
payment_method_type?: string;
/**
* Category of payment method: **bank_redirect**, **bank_transfer**, **card**, **cash**, **ewallet**.
*/
payment_method_type_categories?: string;
/**
* List of payment methods that are excluded from display on the checkout page. Array of strings.
*/
payment_method_types_exclude?: string;
/**
* List of payment methods that are displayed on the checkout page. Array of strings.
*/
payment_method_types_include?: string;
/**
* When `fixed_side` is **sell**, it is the currency received by the merchant. When `fixed_side` is **buy**, it is the currency charged to the buyer (customer). Three-letter ISO 4217 code.
*/
requested_currency?: string;
};