UNPKG

@bebapps/rapyd-sdk

Version:

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

95 lines (94 loc) 3.65 kB
export interface CreatePaymentRequest { /** * Billing address associated with this specific payment. 'address' object. */ address?: object; /** * The amount of the payment, in units of the currency defined in `currency`. Decimal. */ amount: number; /** * Determines when the payment is processed for capture. When **true**, the payment is captured immediately. When **false**, the payment is captured at a later time. Relevant to cards. Default is **true**. */ capture?: boolean; /** * URL where the customer is redirected after a successful payment. Required for bank redirect payment methods. */ complete_payment_url?: string; /** * Defines the currency for the amount. Three-letter ISO 4217 code. In FX transactions, see full explanations on `currency`, `fixed_side` and `requested_currency` fields in [Payment Object](ref:payment-object). */ currency: string; /** * ID of the customer. String starting with **cus_**. Required if `payment_method` is blank. */ customer?: `cus_${string}`; /** * Description of the payment. */ description?: string; /** * URL where the customer is redirected in case of an error in the payment. Required for bank redirect payment methods. */ error_payment_url?: string; /** * Determines whether the payment is held in escrow for later release. Relevant for card payments. */ escrow?: boolean; /** * Defines the number of days after the creation of the payment that the funds are automatically released. Relevant when `escrow` is **true**. */ escrow_release_days?: number; /** * Represents the wallets that the money is paid into. Array of objects. */ ewallets?: (object)[]; /** * End of the time allowed for customer to make this payment, in [*Unix time*](ref:glossary). Must be after the current time. */ expiration?: number; /** * Indicates whether the FX rate is fixed for the buy side (seller) or for the sell side (buyer). See [Payment Object](ref:payment-object) for full explanation. */ fixed_side?: string; /** * Describes how the transaction was initiated. One of the following: **customer_present**, **installment**, **moto**, **recurring**, **unscheduled**. */ initiation_type?: string; /** * ID of the group payment, a string starting with 'gp_'. Relevant to replacing a payment that failed. */ group_payment?: string; /** * ID defined by the client. */ merchant_reference_id?: string; /** * A JSON object defined by the client. */ metadata?: object; /** * Object that defines transaction fees and foreign exchange fees. These are fees that the Rapyd merchant can define for its consumers in addition to the payment amount. */ payment_fees?: object; /** * Payment Method object or ID. See [Payment Method Type Object](ref:payment-method-type-object). */ payment_method: string; /** * Object describing additional information required for the payment. The object is returned by [Get Payment Method Required Fields](ref:get-payment-method-required-fields). */ payment_method_options?: object; /** * Email address that the receipt for this transaction is sent to. */ receipt_email?: 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) to pay the seller (merchant). Three-letter ISO 4217 code. */ requested_currency?: string; /** * A text description that appears in the customer's bank statement. Limited to 22 characters. */ statement_descriptor?: string; };