Skip to main content

TensorRail API (1.0)

Download OpenAPI specification:Download

The TensorRail API for accepting and managing payments.

Generated from the running service. Endpoints appear here only if their resource family is on an explicit publication allowlist AND the edge serves the path; administrative and internal routes satisfy neither, and a set of never-publish families is asserted at build time.

What's enabled on your account

Live now.

  • UPI — India's real-time payments rail. India (INR). Automatic capture, with payment events delivered to your webhook endpoint.

Ready to switch on — the integration is built and the rail is part of the platform; what is left is commercial and account configuration rather than a new integration. Bank transfer / mobile money and Crypto are configured against provider sandboxes today, so going live also takes live credentials and endpoints for your account. Ask your account manager.

  • Bank transfer / mobile money — Local bank and mobile-wallet transfers. Kenya, Ghana, Tanzania and Uganda (KES, GHS, TZS, UGX). Automatic capture, with payment events delivered to your webhook endpoint.
  • Crypto — Digital-asset acceptance with fiat settlement. Currencies: EUR, USD, GBP. Automatic capture, with payment events delivered to your webhook endpoint once that endpoint is registered in your own account with the provider.

In test mode, on every account. The TensorRail Test Simulator answers UPI and crypto payments deterministically, with refunds on UPI, so you can build and assert those paths before a live rail is switched on. Card intake is tokenized in every mode, so cards are the one thing test keys alone cannot drive — see Testing and sandbox.

The rest of this document is the same API on whichever rail your account is on, ordered so that what your account can use comes first. An endpoint that depends on a rail feature carries a one-line note naming the condition and where that stands today; it switches on with the rail. Nothing is left out of this reference because your account cannot reach it yet.

Errors

Every error response has the same shape: a single error object carrying a type, a human-readable message and a stable code from the ERR_NNNN catalog. Branch on code; the message wording is not part of the contract.

{ "error": { "type": "invalid_request", "message": "Missing required param: api_key", "code": "ERR_2001", "field_name": "api_key" } }

Rail support

Every endpoint below is part of the API and documented in full. Nothing here is withdrawn, deprecated or held back: an endpoint your account cannot use today is documented as completely as one it can, because an undocumented endpoint is still discoverable by trying it, and the refusal then arrives with no explanation. What varies between accounts is the rail behind an endpoint, so anything that depends on a rail feature carries its condition in the title and a one-line note saying where that stands today — including what already works on test keys.

How this document is ordered. By what your account can use, rather than alphabetically or by resource. Everything that works on every rail enabled today comes first, then the groups closest to switching on, and the ones needing the most setup last. So an unmarked endpoint is one you can call now, and the further down a section sits, the more has to be arranged before it answers.

  • unmarked — available on every rail enabled today
  • [available on rails that support refunds] — exercisable on test keys today; switches on live with a refund-capable rail
  • [available on rails that accept metadata updates] — switches on with a rail that can carry a metadata change to a payment already sent
  • [available on rails that support recurring] — switches on with a rail that can store an instrument and charge it again
  • [available with a billing processor] — switches on when a billing processor is connected to your account; independent of your payment rail
  • [available on rails with manual capture] — switches on with a rail that authorizes now and captures later
  • [available on rails that report disputes] — switches on with a rail that raises dispute events
  • [available on card rails] — switches on with a card acquirer enabled for your account

Payments

Create, confirm, read and cancel a payment. These work on every rail enabled on your account.

Payments - Create

Creates a payment resource, which represents a customer's intent to pay. This endpoint is the starting point for various payment flows:

Authorizations:
api_key
Request Body schema: application/json
required
amount
required
integer <int64> >= 0

The primary amount for the payment, provided in the lowest denomination of the specified currency (e.g., 6540 for $65.40 USD). This field is mandatory for creating a payment.

order_tax_amount
integer or null <int64>

Total tax amount applicable to the order, in the lowest denomination of the currency.

currency
required
string (Currency)
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BZD" "CAD" "CDF" "CHF" "CLF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "INR" "IQD" "IRR" "ISK" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRU" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLE" "SLL" "SOS" "SRD" "SSP" "STD" "STN" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VES" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "YER" "ZAR" "ZMW" "ZWL"

The three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the payment amount. This field is mandatory for creating a payment.

amount_to_capture
integer or null <int64>

The amount to be captured from the user's payment method, in the lowest denomination. If not provided, and capture_method is automatic, the full payment amount will be captured. If capture_method is manual, this can be specified in the /capture call. Must be less than or equal to the authorized amount.

shipping_cost
integer or null <int64>

The shipping cost for the payment. This is required for tax calculation in some regions.

payment_id
string or null [ 1 .. 62 ] characters

Optional. A merchant-provided unique identifier for the payment, up to 64 characters (e.g., "pay_examplexxxxxxxxxxxxxxxxxxx"). If provided, it ensures idempotency for the payment creation request. If omitted, TensorRail generates a unique ID for the payment (a 4-character prefix plus 20 generated characters, so 24 in total).

any or null
connector
Array of strings or null (Connector)

Processor identifier assigned by TensorRail. Routing is managed for your account; you do not select a processor.

capture_method
string or null
Enum: "automatic" "manual" "manual_multiple" "scheduled" "sequential_automatic"

Specifies how the payment is captured.

  • automatic: Funds are captured immediately after successful authorization. This is the default behavior if the field is omitted.
  • manual: Funds are authorized but not captured. A separate request to the /payments/{payment_id}/capture endpoint is required to capture the funds.
authentication_type
string or null
Default: "three_ds"
Enum: "three_ds" "no_three_ds"

Specifies the type of cardholder authentication to be applied for a payment.

  • ThreeDs: Requests 3D Secure (3DS) authentication. If the card is enrolled, 3DS authentication will be activated, potentially shifting chargeback liability to the issuer.
  • NoThreeDs: Indicates that 3D Secure authentication should not be performed. The liability for chargebacks typically remains with the merchant. This is often the default if not specified.

Note: The actual authentication behavior can also be influenced by merchant configuration and specific connector defaults. Some connectors might still enforce 3DS or bypass it regardless of this parameter.

object or null
confirm
boolean or null
Default: false

If set to true, TensorRail attempts to confirm and authorize the payment immediately after creation, provided sufficient payment method details are included. If false or omitted (default is false), the payment is created with a status such as requires_payment_method or requires_confirmation, and a separate POST /payments/{payment_id}/confirm call is necessary to proceed with authorization.

object or null

Passing this object creates a new customer or attaches an existing customer to the payment

customer_id
string or null [ 1 .. 64 ] characters

The identifier for the customer

off_session
boolean or null

Set to true to indicate that the customer is not in your checkout flow during this payment, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and charge them later. When making a recurring payment by passing a mandate_id, this parameter is mandatory

description
string or null

An arbitrary string attached to the payment. Often useful for displaying to users or for your own internal record-keeping.

return_url
string or null <= 2048 characters

The URL to redirect the customer to after they complete the payment process or authentication. This is crucial for flows that involve off-site redirection (e.g., 3DS, some bank redirects, wallet payments).

setup_future_usage
string or null
Enum: "off_session" "on_session"

Specifies how the payment method can be used for future payments.

  • off_session: The payment method can be used for future payments when the customer is not present.
  • on_session: The payment method is intended for use only when the customer is present during checkout. If omitted, defaults to on_session.
(Card (object or null)) or (CardRedirect (object or null)) or (Wallet (object or null)) or (PayLater (object or null)) or (BankRedirect (object or null)) or (BankDebit (object or null)) or (BankTransfer (object or null)) or (RealTimePayment (object or null)) or (Crypto (object or null)) or (MandatePayment (object or null)) or (Reward (object or null)) or (Upi (object or null)) or (Voucher (object or null)) or (GiftCard (object or null)) or (CardToken (object or null)) or (OpenBanking (object or null)) or (MobilePayment (object or null)) or (NetworkToken (object or null)) or (PspToken (object or null)) (PaymentMethodDataRequest)

The payment method information provided for making a payment

payment_method
string or null
Enum: "card" "card_redirect" "pay_later" "wallet" "bank_redirect" "bank_transfer" "crypto" "bank_debit" "reward" "real_time_payment" "upi" "voucher" "gift_card" "open_banking" "mobile_payment" "network_token"

Indicates the type of payment method. Eg: 'card', 'wallet', etc.

payment_token
string or null

As TensorRail tokenises the sensitive details about the payments method, it provides the payment_token as a reference to a stored payment method, ensuring that the sensitive details are not exposed in any manner.

object or null
statement_descriptor_name
string or null <= 255 characters
Deprecated

For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. To be deprecated soon, use billing_descriptor instead.

statement_descriptor_suffix
string or null <= 255 characters
Deprecated

Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. To be deprecated soon, use billing_descriptor instead.

Array of objects or null (OrderDetailsWithAmount)

Use this object to capture the details about the different products for which the payment is being made. The sum of amount across different products here should be equal to the overall payment amount

object or null

Passing this object during payments creates a mandate. The mandate_type sub object is passed by the server.

object or null

This "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.

mandate_id
string or null <= 64 characters

A unique identifier to link the payment to a mandate. To do Recurring payments after a mandate has been created, pass the mandate_id instead of payment_method_data

object or null

Browser information to be used for 3DS 2.0

payment_experience
string or null
Enum: "redirect_to_url" "invoke_sdk_client" "display_qr_code" "one_click" "link_wallet" "invoke_payment_app" "display_wait_screen" "collect_otp"

To indicate the type of payment experience that the customer would go through

payment_method_type
string or null
Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" "paysera" "apple_pay" "atome" "bacs" "bancontact_card" "becs" "benefit" "bizum" "blik" "bluecode" "boleto" "bca_bank_transfer" "bni_va" "breadpay" "bri_va" "bhn_card_network" "card_redirect" "cimb_va" "classic" "credit" "crypto_currency" "cashapp" "dana" "danamon_va" "debit" "duit_now" "efecty" "eft" "eps" "flexiti" "fps" "evoucher" "giropay" "givex" "google_pay" "go_pay" "gcash" "ideal" "interac" "indomaret" "klarna" "kakao_pay" "local_bank_redirect" "mandiri_va" "knet" "mb_way" "mobile_pay" "momo" "momo_atm" "multibanco" "online_banking_thailand" "online_banking_czech_republic" "online_banking_finland" "online_banking_fpx" "online_banking_poland" "online_banking_slovakia" "oxxo" "pago_efectivo" "permata_bank_transfer" "open_banking_uk" "pay_bright" "payjustnow" "paypal" "paze" "pix" "pix_automatico_qr" "pix_automatico_push" "pay_safe_card" "przelewy24" "prompt_pay" "pse" "qris" "red_compra" "red_pagos" "samsung_pay" "sepa" "sepa_bank_transfer" "sepa_guarenteed_debit" "skrill" "sofort" "swish" "touch_n_go" "trustly" "twint" "upi_collect" "upi_intent" "upi_qr" "vipps" "viet_qr" "venmo" "walley" "we_chat_pay" "seven_eleven" "lawson" "mini_stop" "family_mart" "seicomart" "pay_easy" "local_bank_transfer" "mifinity" "open_banking_pis" "direct_carrier_billing" "instant_bank_transfer" "instant_bank_transfer_finland" "instant_bank_transfer_poland" "revolut_pay" "indonesian_bank_transfer" "open_banking" "network_token"

Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.

business_country
string or null
Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BQ" "BA" "BW" "BV" "BR" "IO" "BN" "BG" "BF" "BI" "KH" "CM" "CA" "CV" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "HR" "CU" "CW" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GR" "GL" "GD" "GP" "GU" "GT" "GG" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IM" "IL" "IT" "JM" "JP" "JE" "JO" "KZ" "KE" "KI" "KP" "KR" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LI" "LT" "LU" "MO" "MK" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "ME" "MS" "MA" "MZ" "MM" "NA" "NR" "NP" "NL" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RW" "BL" "SH" "KN" "LC" "MF" "PM" "VC" "WS" "SM" "ST" "SA" "SN" "RS" "SC" "SL" "SG" "SX" "SK" "SI" "SB" "SO" "ZA" "GS" "SS" "ES" "LK" "SD" "SR" "SJ" "SZ" "SE" "CH" "SY" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "UM" "UY" "UZ" "VU" "VE" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW" "US"
business_label
string or null

Business label of the merchant for this payment. To be deprecated soon. Pass the profile_id instead

object or null

Merchant connector details used to make payments.

allowed_payment_method_types
Array of strings or null (PaymentMethodType)
Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" "paysera" "apple_pay" "atome" "bacs" "bancontact_card" "becs" "benefit" "bizum" "blik" "bluecode" "boleto" "bca_bank_transfer" "bni_va" "breadpay" "bri_va" "bhn_card_network" "card_redirect" "cimb_va" "classic" "credit" "crypto_currency" "cashapp" "dana" "danamon_va" "debit" "duit_now" "efecty" "eft" "eps" "flexiti" "fps" "evoucher" "giropay" "givex" "google_pay" "go_pay" "gcash" "ideal" "interac" "indomaret" "klarna" "kakao_pay" "local_bank_redirect" "mandiri_va" "knet" "mb_way" "mobile_pay" "momo" "momo_atm" "multibanco" "online_banking_thailand" "online_banking_czech_republic" "online_banking_finland" "online_banking_fpx" "online_banking_poland" "online_banking_slovakia" "oxxo" "pago_efectivo" "permata_bank_transfer" "open_banking_uk" "pay_bright" "payjustnow" "paypal" "paze" "pix" "pix_automatico_qr" "pix_automatico_push" "pay_safe_card" "przelewy24" "prompt_pay" "pse" "qris" "red_compra" "red_pagos" "samsung_pay" "sepa" "sepa_bank_transfer" "sepa_guarenteed_debit" "skrill" "sofort" "swish" "touch_n_go" "trustly" "twint" "upi_collect" "upi_intent" "upi_qr" "vipps" "viet_qr" "venmo" "walley" "we_chat_pay" "seven_eleven" "lawson" "mini_stop" "family_mart" "seicomart" "pay_easy" "local_bank_transfer" "mifinity" "open_banking_pis" "direct_carrier_billing" "instant_bank_transfer" "instant_bank_transfer_finland" "instant_bank_transfer_poland" "revolut_pay" "indonesian_bank_transfer" "open_banking" "network_token"

Use this parameter to restrict the Payment Method Types to show for a given PaymentIntent

metadata
object or null

You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.

object or null

Some payment methods need extra information alongside the payment. Find the specific details in the child attributes below.

payment_link
boolean or null
Default: false

Whether to generate the payment link for this payment or not (if applicable)

object or null (PaymentCreatePaymentLinkConfig)

Configure a custom payment link for the particular payment

payment_link_config_id
string or null

Custom payment link config id set at business profile, send only if business_specific_configs is configured

profile_id
string or null

The business profile to be used for this payment, if not passed the default business profile associated with the merchant account will be used. It is mandatory in case multiple business profiles have been set up.

object or null

Details of surcharge applied on this payment, if applicable

payment_type
string or null
Enum: "normal" "new_mandate" "setup_mandate" "recurring_mandate" "installment"

The type of the payment that differentiates between normal and various types of mandate payments. Use 'setup_mandate' in case of zero auth flow.

request_incremental_authorization
boolean or null

Request an incremental authorization, i.e., increase the authorized amount on a confirmed payment before you capture it.

session_expiry
integer or null <int32> >= 0

Will be used to expire client secret after certain amount of time to be supplied in seconds (900) for 15 mins

frm_metadata
object or null

Additional data related to some frm(Fraud Risk Management) connectors

request_external_three_ds_authentication
boolean or null

Whether to perform external authentication (if applicable)

object or null
any or null

Details required for recurring payment

request_extended_authorization
boolean or null
Default: false

Optional boolean value to extent authorization period of this payment

capture method must be manual or manual_multiple

merchant_order_reference_id
string or null <= 255 characters

Your unique identifier for this payment or order. This ID helps you reconcile payments on your system. If provided, it is passed to the connector if supported.

skip_external_tax_calculation
boolean or null

Whether to calculate tax for this payment intent

psd2_sca_exemption_type
string or null
Enum: "low_value" "transaction_risk_analysis"

SCA Exemptions types available for authentication

object or null
force_3ds_challenge
boolean or null

Indicates if 3ds challenge is forced

threeds_method_comp_ind
string or null
Enum: "Y" "N" "U"

Indicates if 3DS method data was successfully completed or not

is_iframe_redirection_enabled
boolean or null

Indicates if the redirection has to open in the iframe

all_keys_required
boolean or null

If enabled, provides whole connector response

(string or null) or (string or null) or (string or null) or (object or null)

Describes the channel through which the payment was initiated.

tax_status
string or null
Enum: "taxable" "exempt"
discount_amount
integer or null <int64>

Total amount of the discount you have applied to the order or transaction.

shipping_amount_tax
integer or null <int64>

This Unit struct represents MinorUnit in which core amount works

duty_amount
integer or null <int64>

This Unit struct represents MinorUnit in which core amount works

order_date
string or null <date-time>

Date the payer placed the order.

enable_partial_authorization
boolean or null
Default: false

Allow partial authorization for this payment

enable_overcapture
boolean or null

Boolean indicating whether to enable overcapture for this payment

is_stored_credential
boolean or null

Boolean flag indicating whether this payment method is stored and has been previously used for payments

mit_category
string or null
Enum: "installment" "unscheduled" "recurring" "resubmission"

Specifies the category of a Merchant Initiated Transaction (MIT). In the case of MIT, mit_category tells what kind of MIT is being processed. In the case of CIT, it tells the future intended MIT type.

object or null

Billing Descriptor information to be sent to the payment gateway

tokenization
string or null
Enum: "skip_psp" "tokenize_at_psp"

The type of tokenization to use for the payment method

object or null

Information identifying partner and merchant application initiating the request

Array of objects or null (InstallmentOption)

Installment payment options grouped by payment method. When provided, the payment is treated as an installment payment.

object or null

Installment selection sent by the customer during payment confirmation.

Responses

Request samples

Content type
application/json
Example
{
  • "amount": 6540,
  • "currency": "USD"
}

Response samples

Content type
application/json
Example
{
  • "amount": 6540,
  • "amount_capturable": 6540,
  • "client_secret": "pay_syxxxxxxxxxxxx_secret_szzzzzzzzzzz",
  • "created": "2023-10-26T10:00:00Z",
  • "currency": "USD",
  • "expires_on": "2023-10-26T10:15:00Z",
  • "payment_id": "pay_syxxxxxxxxxxxx",
  • "status": "requires_payment_method"
}

Payments - List

To list the payments

Authorizations:
api_key
query Parameters
customer_id
string or null

The identifier for the customer

starting_after
string or null

A cursor for use in pagination, fetch the next list after some object

ending_before
string or null

A cursor for use in pagination, fetch the previous list before some object

limit
integer or null <int64>

Limit on the number of objects to return

created
string or null <date-time>

The time at which payment is created

created.lt
string or null <date-time>

Time less than the payment created time

created.gt
string or null <date-time>

Time greater than the payment created time

created.lte
string or null <date-time>

Time less than or equals to the payment created time

created.gte
string or null <date-time>

Time greater than or equals to the payment created time

Responses

Response samples

Content type
application/json
{
  • "size": 0,
  • "data": [
    ]
}

Payments - Update

To update the properties of a PaymentIntent object. This may include attaching a payment method, or attaching customer object or metadata fields after the Payment is created

Authorizations:
api_keypublishable_key
path Parameters
payment_id
required
string

The identifier for payment

Request Body schema: application/json
required
amount
integer or null <int64> >= 0

The primary amount for the payment, provided in the lowest denomination of the specified currency (e.g., 6540 for $65.40 USD). This field is mandatory for creating a payment.

order_tax_amount
integer or null <int64>

Total tax amount applicable to the order, in the lowest denomination of the currency.

currency
string or null
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BZD" "CAD" "CDF" "CHF" "CLF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "INR" "IQD" "IRR" "ISK" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRU" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLE" "SLL" "SOS" "SRD" "SSP" "STD" "STN" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VES" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "YER" "ZAR" "ZMW" "ZWL"

The three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the payment amount. This field is mandatory for creating a payment.

amount_to_capture
integer or null <int64>

The amount to be captured from the user's payment method, in the lowest denomination. If not provided, and capture_method is automatic, the full payment amount will be captured. If capture_method is manual, this can be specified in the /capture call. Must be less than or equal to the authorized amount.

shipping_cost
integer or null <int64>

The shipping cost for the payment. This is required for tax calculation in some regions.

payment_id
string or null [ 1 .. 62 ] characters

Optional. A merchant-provided unique identifier for the payment, up to 64 characters (e.g., "pay_examplexxxxxxxxxxxxxxxxxxx"). If provided, it ensures idempotency for the payment creation request. If omitted, TensorRail generates a unique ID for the payment (a 4-character prefix plus 20 generated characters, so 24 in total).

any or null
connector
Array of strings or null (Connector)

Processor identifier assigned by TensorRail. Routing is managed for your account; you do not select a processor.

capture_method
string or null
Enum: "automatic" "manual" "manual_multiple" "scheduled" "sequential_automatic"

Specifies how the payment is captured.

  • automatic: Funds are captured immediately after successful authorization. This is the default behavior if the field is omitted.
  • manual: Funds are authorized but not captured. A separate request to the /payments/{payment_id}/capture endpoint is required to capture the funds.
authentication_type
string or null
Default: "three_ds"
Enum: "three_ds" "no_three_ds"

Specifies the type of cardholder authentication to be applied for a payment.

  • ThreeDs: Requests 3D Secure (3DS) authentication. If the card is enrolled, 3DS authentication will be activated, potentially shifting chargeback liability to the issuer.
  • NoThreeDs: Indicates that 3D Secure authentication should not be performed. The liability for chargebacks typically remains with the merchant. This is often the default if not specified.

Note: The actual authentication behavior can also be influenced by merchant configuration and specific connector defaults. Some connectors might still enforce 3DS or bypass it regardless of this parameter.

object or null
confirm
boolean or null
Default: false

If set to true, TensorRail attempts to confirm and authorize the payment immediately after creation, provided sufficient payment method details are included. If false or omitted (default is false), the payment is created with a status such as requires_payment_method or requires_confirmation, and a separate POST /payments/{payment_id}/confirm call is necessary to proceed with authorization.

object or null

Passing this object creates a new customer or attaches an existing customer to the payment

customer_id
string or null [ 1 .. 64 ] characters

The identifier for the customer

off_session
boolean or null

Set to true to indicate that the customer is not in your checkout flow during this payment, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and charge them later. When making a recurring payment by passing a mandate_id, this parameter is mandatory

description
string or null

An arbitrary string attached to the payment. Often useful for displaying to users or for your own internal record-keeping.

return_url
string or null <= 2048 characters

The URL to redirect the customer to after they complete the payment process or authentication. This is crucial for flows that involve off-site redirection (e.g., 3DS, some bank redirects, wallet payments).

setup_future_usage
string or null
Enum: "off_session" "on_session"

Specifies how the payment method can be used for future payments.

  • off_session: The payment method can be used for future payments when the customer is not present.
  • on_session: The payment method is intended for use only when the customer is present during checkout. If omitted, defaults to on_session.
(Card (object or null)) or (CardRedirect (object or null)) or (Wallet (object or null)) or (PayLater (object or null)) or (BankRedirect (object or null)) or (BankDebit (object or null)) or (BankTransfer (object or null)) or (RealTimePayment (object or null)) or (Crypto (object or null)) or (MandatePayment (object or null)) or (Reward (object or null)) or (Upi (object or null)) or (Voucher (object or null)) or (GiftCard (object or null)) or (CardToken (object or null)) or (OpenBanking (object or null)) or (MobilePayment (object or null)) or (NetworkToken (object or null)) or (PspToken (object or null)) (PaymentMethodDataRequest)

The payment method information provided for making a payment

payment_method
string or null
Enum: "card" "card_redirect" "pay_later" "wallet" "bank_redirect" "bank_transfer" "crypto" "bank_debit" "reward" "real_time_payment" "upi" "voucher" "gift_card" "open_banking" "mobile_payment" "network_token"

Indicates the type of payment method. Eg: 'card', 'wallet', etc.

payment_token
string or null

As TensorRail tokenises the sensitive details about the payments method, it provides the payment_token as a reference to a stored payment method, ensuring that the sensitive details are not exposed in any manner.

object or null
statement_descriptor_name
string or null <= 255 characters
Deprecated

For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. To be deprecated soon, use billing_descriptor instead.

statement_descriptor_suffix
string or null <= 255 characters
Deprecated

Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. To be deprecated soon, use billing_descriptor instead.

Array of objects or null (OrderDetailsWithAmount)

Use this object to capture the details about the different products for which the payment is being made. The sum of amount across different products here should be equal to the overall payment amount

object or null

Passing this object during payments creates a mandate. The mandate_type sub object is passed by the server.

object or null

This "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.

object or null

Browser information to be used for 3DS 2.0

payment_experience
string or null
Enum: "redirect_to_url" "invoke_sdk_client" "display_qr_code" "one_click" "link_wallet" "invoke_payment_app" "display_wait_screen" "collect_otp"

To indicate the type of payment experience that the customer would go through

payment_method_type
string or null
Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" "paysera" "apple_pay" "atome" "bacs" "bancontact_card" "becs" "benefit" "bizum" "blik" "bluecode" "boleto" "bca_bank_transfer" "bni_va" "breadpay" "bri_va" "bhn_card_network" "card_redirect" "cimb_va" "classic" "credit" "crypto_currency" "cashapp" "dana" "danamon_va" "debit" "duit_now" "efecty" "eft" "eps" "flexiti" "fps" "evoucher" "giropay" "givex" "google_pay" "go_pay" "gcash" "ideal" "interac" "indomaret" "klarna" "kakao_pay" "local_bank_redirect" "mandiri_va" "knet" "mb_way" "mobile_pay" "momo" "momo_atm" "multibanco" "online_banking_thailand" "online_banking_czech_republic" "online_banking_finland" "online_banking_fpx" "online_banking_poland" "online_banking_slovakia" "oxxo" "pago_efectivo" "permata_bank_transfer" "open_banking_uk" "pay_bright" "payjustnow" "paypal" "paze" "pix" "pix_automatico_qr" "pix_automatico_push" "pay_safe_card" "przelewy24" "prompt_pay" "pse" "qris" "red_compra" "red_pagos" "samsung_pay" "sepa" "sepa_bank_transfer" "sepa_guarenteed_debit" "skrill" "sofort" "swish" "touch_n_go" "trustly" "twint" "upi_collect" "upi_intent" "upi_qr" "vipps" "viet_qr" "venmo" "walley" "we_chat_pay" "seven_eleven" "lawson" "mini_stop" "family_mart" "seicomart" "pay_easy" "local_bank_transfer" "mifinity" "open_banking_pis" "direct_carrier_billing" "instant_bank_transfer" "instant_bank_transfer_finland" "instant_bank_transfer_poland" "revolut_pay" "indonesian_bank_transfer" "open_banking" "network_token"

Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.

object or null

Merchant connector details used to make payments.

allowed_payment_method_types
Array of strings or null (PaymentMethodType)
Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" "paysera" "apple_pay" "atome" "bacs" "bancontact_card" "becs" "benefit" "bizum" "blik" "bluecode" "boleto" "bca_bank_transfer" "bni_va" "breadpay" "bri_va" "bhn_card_network" "card_redirect" "cimb_va" "classic" "credit" "crypto_currency" "cashapp" "dana" "danamon_va" "debit" "duit_now" "efecty" "eft" "eps" "flexiti" "fps" "evoucher" "giropay" "givex" "google_pay" "go_pay" "gcash" "ideal" "interac" "indomaret" "klarna" "kakao_pay" "local_bank_redirect" "mandiri_va" "knet" "mb_way" "mobile_pay" "momo" "momo_atm" "multibanco" "online_banking_thailand" "online_banking_czech_republic" "online_banking_finland" "online_banking_fpx" "online_banking_poland" "online_banking_slovakia" "oxxo" "pago_efectivo" "permata_bank_transfer" "open_banking_uk" "pay_bright" "payjustnow" "paypal" "paze" "pix" "pix_automatico_qr" "pix_automatico_push" "pay_safe_card" "przelewy24" "prompt_pay" "pse" "qris" "red_compra" "red_pagos" "samsung_pay" "sepa" "sepa_bank_transfer" "sepa_guarenteed_debit" "skrill" "sofort" "swish" "touch_n_go" "trustly" "twint" "upi_collect" "upi_intent" "upi_qr" "vipps" "viet_qr" "venmo" "walley" "we_chat_pay" "seven_eleven" "lawson" "mini_stop" "family_mart" "seicomart" "pay_easy" "local_bank_transfer" "mifinity" "open_banking_pis" "direct_carrier_billing" "instant_bank_transfer" "instant_bank_transfer_finland" "instant_bank_transfer_poland" "revolut_pay" "indonesian_bank_transfer" "open_banking" "network_token"

Use this parameter to restrict the Payment Method Types to show for a given PaymentIntent

retry_action
string or null
Enum: "manual_retry" "requeue"

Denotes the retry action

metadata
object or null

You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.

object or null

Some payment methods need extra information alongside the payment. Find the specific details in the child attributes below.

payment_link
boolean or null
Default: false

Whether to generate the payment link for this payment or not (if applicable)

object or null (PaymentCreatePaymentLinkConfig)

Configure a custom payment link for the particular payment

payment_link_config_id
string or null

Custom payment link config id set at business profile, send only if business_specific_configs is configured

object or null

Details of surcharge applied on this payment, if applicable

payment_type
string or null
Enum: "normal" "new_mandate" "setup_mandate" "recurring_mandate" "installment"

The type of the payment that differentiates between normal and various types of mandate payments. Use 'setup_mandate' in case of zero auth flow.

request_incremental_authorization
boolean or null

Request an incremental authorization, i.e., increase the authorized amount on a confirmed payment before you capture it.

session_expiry
integer or null <int32> >= 0

Will be used to expire client secret after certain amount of time to be supplied in seconds (900) for 15 mins

frm_metadata
object or null

Additional data related to some frm(Fraud Risk Management) connectors

request_external_three_ds_authentication
boolean or null

Whether to perform external authentication (if applicable)

object or null
any or null

Details required for recurring payment

request_extended_authorization
boolean or null
Default: false

Optional boolean value to extent authorization period of this payment

capture method must be manual or manual_multiple

merchant_order_reference_id
string or null <= 255 characters

Your unique identifier for this payment or order. This ID helps you reconcile payments on your system. If provided, it is passed to the connector if supported.

skip_external_tax_calculation
boolean or null

Whether to calculate tax for this payment intent

psd2_sca_exemption_type
string or null
Enum: "low_value" "transaction_risk_analysis"

SCA Exemptions types available for authentication

object or null
force_3ds_challenge
boolean or null

Indicates if 3ds challenge is forced

threeds_method_comp_ind
string or null
Enum: "Y" "N" "U"

Indicates if 3DS method data was successfully completed or not

is_iframe_redirection_enabled
boolean or null

Indicates if the redirection has to open in the iframe

all_keys_required
boolean or null

If enabled, provides whole connector response

(string or null) or (string or null) or (string or null) or (object or null)

Describes the channel through which the payment was initiated.

tax_status
string or null
Enum: "taxable" "exempt"
discount_amount
integer or null <int64>

Total amount of the discount you have applied to the order or transaction.

shipping_amount_tax
integer or null <int64>

This Unit struct represents MinorUnit in which core amount works

duty_amount
integer or null <int64>

This Unit struct represents MinorUnit in which core amount works

order_date
string or null <date-time>

Date the payer placed the order.

enable_partial_authorization
boolean or null
Default: false

Allow partial authorization for this payment

enable_overcapture
boolean or null

Boolean indicating whether to enable overcapture for this payment

is_stored_credential
boolean or null

Boolean flag indicating whether this payment method is stored and has been previously used for payments

mit_category
string or null
Enum: "installment" "unscheduled" "recurring" "resubmission"

Specifies the category of a Merchant Initiated Transaction (MIT). In the case of MIT, mit_category tells what kind of MIT is being processed. In the case of CIT, it tells the future intended MIT type.

object or null

Billing Descriptor information to be sent to the payment gateway

tokenization
string or null
Enum: "skip_psp" "tokenize_at_psp"

The type of tokenization to use for the payment method

object or null

Information identifying partner and merchant application initiating the request

Array of objects or null (InstallmentOption)

Installment payment options grouped by payment method. When provided, the payment is treated as an installment payment.

object or null

Installment selection sent by the customer during payment confirmation.

Responses

Request samples

Content type
application/json
Example
{
  • "amount": 7654
}

Response samples

Content type
application/json
{
  • "payment_id": "pay_examplexxxxxxxxxxxxxxxxxxx",
  • "status": "requires_confirmation",
  • "amount": 6540,
  • "net_amount": 6540,
  • "shipping_cost": 6540,
  • "amount_capturable": 6540,
  • "amount_received": 6540,
  • "client_secret": "pay_EXAMPLE_PAYMENT_ID_secret_EXAMPLE_CLIENT_SECRET",
  • "created": "2022-09-10T10:11:12Z",
  • "modified_at": "2022-09-10T10:11:12Z",
  • "currency": "AED",
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "description": "It's my first payment request",
  • "mandate_id": "mandate_iwer89rnjef349dni3",
  • "setup_future_usage": "off_session",
  • "capture_method": "automatic",
  • "payment_method": "card",
  • "return_url": "https://tensorrail.com",
  • "next_action": {
    },
  • "error_code": "E0001",
  • "error_message": "Failed while verifying the card",
  • "error_reason": "param payAmount invalid, more than 100",
  • "payment_method_type": "ach",
  • "metadata": { },
  • "reference_id": "993672945374576J",
  • "payment_link": {
    },
  • "expires_on": "2022-09-10T10:11:12Z",
  • "payment_method_id": "string",
  • "merchant_order_reference_id": "Custom_Order_id_123",
  • "order_tax_amount": 0
}

Payments - Retrieve

Retrieves a Payment. This API can also be used to get the status of a previously initiated payment or next action for an ongoing payment

Authorizations:
api_keypublishable_key
path Parameters
payment_id
required
string

The identifier for payment

query Parameters
force_sync
boolean or null

Decider to enable or disable the connector call for retrieve request

client_secret
string or null

This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK

expand_attempts
boolean or null

If enabled provides list of attempts linked to payment intent

expand_captures
boolean or null

If enabled provides list of captures linked to latest attempt

Responses

Response samples

Content type
application/json
{
  • "payment_id": "pay_examplexxxxxxxxxxxxxxxxxxx",
  • "status": "requires_confirmation",
  • "amount": 6540,
  • "net_amount": 6540,
  • "shipping_cost": 6540,
  • "amount_capturable": 6540,
  • "amount_received": 6540,
  • "client_secret": "pay_EXAMPLE_PAYMENT_ID_secret_EXAMPLE_CLIENT_SECRET",
  • "created": "2022-09-10T10:11:12Z",
  • "modified_at": "2022-09-10T10:11:12Z",
  • "currency": "AED",
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "customer": {
    },
  • "description": "It's my first payment request",
  • "mandate_id": "mandate_iwer89rnjef349dni3",
  • "setup_future_usage": "off_session",
  • "capture_method": "automatic",
  • "payment_method": "card",
  • "return_url": "https://tensorrail.com",
  • "next_action": {
    },
  • "error_code": "E0001",
  • "error_message": "Failed while verifying the card",
  • "error_reason": "param payAmount invalid, more than 100",
  • "payment_method_type": "ach",
  • "metadata": { },
  • "reference_id": "993672945374576J",
  • "payment_link": {
    },
  • "expires_on": "2022-09-10T10:11:12Z",
  • "payment_method_id": "string",
  • "merchant_order_reference_id": "Custom_Order_id_123",
  • "order_tax_amount": 0
}

Payments - Cancel

A Payment could can be cancelled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_customer_action.

Authorizations:
api_key
path Parameters
payment_id
required
string

The identifier for payment

Request Body schema: application/json
required
cancellation_reason
string or null

The reason for the payment cancel

object or null

Merchant connector details used to make payments.

all_keys_required
boolean or null

If enabled, provides whole connector response

Responses

Request samples

Content type
application/json
Example
{
  • "cancellation_reason": "requested_by_customer"
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Payments - Confirm

Confirms a payment intent that was previously created with confirm: false. This action attempts to authorize the payment with the payment processor.

Expected status transitions after confirmation:

  • succeeded: If authorization is successful and capture_method is automatic.
  • requires_capture: If authorization is successful and capture_method is manual.
  • failed: If authorization fails.
Authorizations:
api_keypublishable_key
path Parameters
payment_id
required
string

The identifier for payment

Request Body schema: application/json
required
amount
integer or null <int64> >= 0

The primary amount for the payment, provided in the lowest denomination of the specified currency (e.g., 6540 for $65.40 USD). This field is mandatory for creating a payment.

order_tax_amount
integer or null <int64>

Total tax amount applicable to the order, in the lowest denomination of the currency.

currency
string or null
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BZD" "CAD" "CDF" "CHF" "CLF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "INR" "IQD" "IRR" "ISK" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRU" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLE" "SLL" "SOS" "SRD" "SSP" "STD" "STN" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VES" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "YER" "ZAR" "ZMW" "ZWL"

The three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the payment amount. This field is mandatory for creating a payment.

amount_to_capture
integer or null <int64>

The amount to be captured from the user's payment method, in the lowest denomination. If not provided, and capture_method is automatic, the full payment amount will be captured. If capture_method is manual, this can be specified in the /capture call. Must be less than or equal to the authorized amount.

shipping_cost
integer or null <int64>

The shipping cost for the payment. This is required for tax calculation in some regions.

payment_id
string or null [ 1 .. 62 ] characters

Optional. A merchant-provided unique identifier for the payment, up to 64 characters (e.g., "pay_examplexxxxxxxxxxxxxxxxxxx"). If provided, it ensures idempotency for the payment creation request. If omitted, TensorRail generates a unique ID for the payment (a 4-character prefix plus 20 generated characters, so 24 in total).

any or null
connector
Array of strings or null (Connector)

Processor identifier assigned by TensorRail. Routing is managed for your account; you do not select a processor.

capture_method
string or null
Enum: "automatic" "manual" "manual_multiple" "scheduled" "sequential_automatic"

Specifies how the payment is captured.

  • automatic: Funds are captured immediately after successful authorization. This is the default behavior if the field is omitted.
  • manual: Funds are authorized but not captured. A separate request to the /payments/{payment_id}/capture endpoint is required to capture the funds.
authentication_type
string or null
Default: "three_ds"
Enum: "three_ds" "no_three_ds"

Specifies the type of cardholder authentication to be applied for a payment.

  • ThreeDs: Requests 3D Secure (3DS) authentication. If the card is enrolled, 3DS authentication will be activated, potentially shifting chargeback liability to the issuer.
  • NoThreeDs: Indicates that 3D Secure authentication should not be performed. The liability for chargebacks typically remains with the merchant. This is often the default if not specified.

Note: The actual authentication behavior can also be influenced by merchant configuration and specific connector defaults. Some connectors might still enforce 3DS or bypass it regardless of this parameter.

object or null
confirm
boolean or null
Default: false

If set to true, TensorRail attempts to confirm and authorize the payment immediately after creation, provided sufficient payment method details are included. If false or omitted (default is false), the payment is created with a status such as requires_payment_method or requires_confirmation, and a separate POST /payments/{payment_id}/confirm call is necessary to proceed with authorization.

object or null

Passing this object creates a new customer or attaches an existing customer to the payment

customer_id
string or null [ 1 .. 64 ] characters

The identifier for the customer

off_session
boolean or null

Set to true to indicate that the customer is not in your checkout flow during this payment, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and charge them later. When making a recurring payment by passing a mandate_id, this parameter is mandatory

description
string or null

An arbitrary string attached to the payment. Often useful for displaying to users or for your own internal record-keeping.

return_url
string or null <= 2048 characters

The URL to redirect the customer to after they complete the payment process or authentication. This is crucial for flows that involve off-site redirection (e.g., 3DS, some bank redirects, wallet payments).

setup_future_usage
string or null
Enum: "off_session" "on_session"

Specifies how the payment method can be used for future payments.

  • off_session: The payment method can be used for future payments when the customer is not present.
  • on_session: The payment method is intended for use only when the customer is present during checkout. If omitted, defaults to on_session.
(Card (object or null)) or (CardRedirect (object or null)) or (Wallet (object or null)) or (PayLater (object or null)) or (BankRedirect (object or null)) or (BankDebit (object or null)) or (BankTransfer (object or null)) or (RealTimePayment (object or null)) or (Crypto (object or null)) or (MandatePayment (object or null)) or (Reward (object or null)) or (Upi (object or null)) or (Voucher (object or null)) or (GiftCard (object or null)) or (CardToken (object or null)) or (OpenBanking (object or null)) or (MobilePayment (object or null)) or (NetworkToken (object or null)) or (PspToken (object or null)) (PaymentMethodDataRequest)

The payment method information provided for making a payment

payment_method
string or null
Enum: "card" "card_redirect" "pay_later" "wallet" "bank_redirect" "bank_transfer" "crypto" "bank_debit" "reward" "real_time_payment" "upi" "voucher" "gift_card" "open_banking" "mobile_payment" "network_token"

Indicates the type of payment method. Eg: 'card', 'wallet', etc.

payment_token
string or null

As TensorRail tokenises the sensitive details about the payments method, it provides the payment_token as a reference to a stored payment method, ensuring that the sensitive details are not exposed in any manner.

object or null
statement_descriptor_name
string or null <= 255 characters
Deprecated

For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. To be deprecated soon, use billing_descriptor instead.

statement_descriptor_suffix
string or null <= 255 characters
Deprecated

Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. To be deprecated soon, use billing_descriptor instead.

Array of objects or null (OrderDetailsWithAmount)

Use this object to capture the details about the different products for which the payment is being made. The sum of amount across different products here should be equal to the overall payment amount

client_secret
string or null

Client-side confirmation token. Publishable-key only, and optional. Send client_secret only when confirming the payment from the client side with a publishable API key. When confirming server-side with a secret API key, DO NOT send client_secret — the request is rejected if it is present. (FIX 3: annotation reconciled to runtime reality — secret-key confirm must not carry client_secret.)

object or null

Passing this object during payments creates a mandate. The mandate_type sub object is passed by the server.

object or null

This "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.

mandate_id
string or null <= 64 characters

A unique identifier to link the payment to a mandate. To do Recurring payments after a mandate has been created, pass the mandate_id instead of payment_method_data

object or null

Browser information to be used for 3DS 2.0

payment_experience
string or null
Enum: "redirect_to_url" "invoke_sdk_client" "display_qr_code" "one_click" "link_wallet" "invoke_payment_app" "display_wait_screen" "collect_otp"

To indicate the type of payment experience that the customer would go through

payment_method_type
string or null
Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" "paysera" "apple_pay" "atome" "bacs" "bancontact_card" "becs" "benefit" "bizum" "blik" "bluecode" "boleto" "bca_bank_transfer" "bni_va" "breadpay" "bri_va" "bhn_card_network" "card_redirect" "cimb_va" "classic" "credit" "crypto_currency" "cashapp" "dana" "danamon_va" "debit" "duit_now" "efecty" "eft" "eps" "flexiti" "fps" "evoucher" "giropay" "givex" "google_pay" "go_pay" "gcash" "ideal" "interac" "indomaret" "klarna" "kakao_pay" "local_bank_redirect" "mandiri_va" "knet" "mb_way" "mobile_pay" "momo" "momo_atm" "multibanco" "online_banking_thailand" "online_banking_czech_republic" "online_banking_finland" "online_banking_fpx" "online_banking_poland" "online_banking_slovakia" "oxxo" "pago_efectivo" "permata_bank_transfer" "open_banking_uk" "pay_bright" "payjustnow" "paypal" "paze" "pix" "pix_automatico_qr" "pix_automatico_push" "pay_safe_card" "przelewy24" "prompt_pay" "pse" "qris" "red_compra" "red_pagos" "samsung_pay" "sepa" "sepa_bank_transfer" "sepa_guarenteed_debit" "skrill" "sofort" "swish" "touch_n_go" "trustly" "twint" "upi_collect" "upi_intent" "upi_qr" "vipps" "viet_qr" "venmo" "walley" "we_chat_pay" "seven_eleven" "lawson" "mini_stop" "family_mart" "seicomart" "pay_easy" "local_bank_transfer" "mifinity" "open_banking_pis" "direct_carrier_billing" "instant_bank_transfer" "instant_bank_transfer_finland" "instant_bank_transfer_poland" "revolut_pay" "indonesian_bank_transfer" "open_banking" "network_token"

Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.

object or null

Merchant connector details used to make payments.

allowed_payment_method_types
Array of strings or null (PaymentMethodType)
Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" "paysera" "apple_pay" "atome" "bacs" "bancontact_card" "becs" "benefit" "bizum" "blik" "bluecode" "boleto" "bca_bank_transfer" "bni_va" "breadpay" "bri_va" "bhn_card_network" "card_redirect" "cimb_va" "classic" "credit" "crypto_currency" "cashapp" "dana" "danamon_va" "debit" "duit_now" "efecty" "eft" "eps" "flexiti" "fps" "evoucher" "giropay" "givex" "google_pay" "go_pay" "gcash" "ideal" "interac" "indomaret" "klarna" "kakao_pay" "local_bank_redirect" "mandiri_va" "knet" "mb_way" "mobile_pay" "momo" "momo_atm" "multibanco" "online_banking_thailand" "online_banking_czech_republic" "online_banking_finland" "online_banking_fpx" "online_banking_poland" "online_banking_slovakia" "oxxo" "pago_efectivo" "permata_bank_transfer" "open_banking_uk" "pay_bright" "payjustnow" "paypal" "paze" "pix" "pix_automatico_qr" "pix_automatico_push" "pay_safe_card" "przelewy24" "prompt_pay" "pse" "qris" "red_compra" "red_pagos" "samsung_pay" "sepa" "sepa_bank_transfer" "sepa_guarenteed_debit" "skrill" "sofort" "swish" "touch_n_go" "trustly" "twint" "upi_collect" "upi_intent" "upi_qr" "vipps" "viet_qr" "venmo" "walley" "we_chat_pay" "seven_eleven" "lawson" "mini_stop" "family_mart" "seicomart" "pay_easy" "local_bank_transfer" "mifinity" "open_banking_pis" "direct_carrier_billing" "instant_bank_transfer" "instant_bank_transfer_finland" "instant_bank_transfer_poland" "revolut_pay" "indonesian_bank_transfer" "open_banking" "network_token"

Use this parameter to restrict the Payment Method Types to show for a given PaymentIntent

retry_action
string or null
Enum: "manual_retry" "requeue"

Denotes the retry action

metadata
object or null

You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.

object or null

Some payment methods need extra information alongside the payment. Find the specific details in the child attributes below.

payment_link
boolean or null
Default: false

Whether to generate the payment link for this payment or not (if applicable)

object or null (PaymentCreatePaymentLinkConfig)

Configure a custom payment link for the particular payment

payment_link_config_id
string or null

Custom payment link config id set at business profile, send only if business_specific_configs is configured

payment_type
string or null
Enum: "normal" "new_mandate" "setup_mandate" "recurring_mandate" "installment"

The type of the payment that differentiates between normal and various types of mandate payments. Use 'setup_mandate' in case of zero auth flow.

request_incremental_authorization
boolean or null

Request an incremental authorization, i.e., increase the authorized amount on a confirmed payment before you capture it.

session_expiry
integer or null <int32> >= 0

Will be used to expire client secret after certain amount of time to be supplied in seconds (900) for 15 mins

frm_metadata
object or null

Additional data related to some frm(Fraud Risk Management) connectors

request_external_three_ds_authentication
boolean or null

Whether to perform external authentication (if applicable)

object or null
any or null

Details required for recurring payment

request_extended_authorization
boolean or null
Default: false

Optional boolean value to extent authorization period of this payment

capture method must be manual or manual_multiple

merchant_order_reference_id
string or null <= 255 characters

Your unique identifier for this payment or order. This ID helps you reconcile payments on your system. If provided, it is passed to the connector if supported.

skip_external_tax_calculation
boolean or null

Whether to calculate tax for this payment intent

psd2_sca_exemption_type
string or null
Enum: "low_value" "transaction_risk_analysis"

SCA Exemptions types available for authentication

object or null
force_3ds_challenge
boolean or null

Indicates if 3ds challenge is forced

threeds_method_comp_ind
string or null
Enum: "Y" "N" "U"

Indicates if 3DS method data was successfully completed or not

is_iframe_redirection_enabled
boolean or null

Indicates if the redirection has to open in the iframe

all_keys_required
boolean or null

If enabled, provides whole connector response

(string or null) or (string or null) or (string or null) or (object or null)

Describes the channel through which the payment was initiated.

tax_status
string or null
Enum: "taxable" "exempt"
discount_amount
integer or null <int64>

Total amount of the discount you have applied to the order or transaction.

shipping_amount_tax
integer or null <int64>

This Unit struct represents MinorUnit in which core amount works

duty_amount
integer or null <int64>

This Unit struct represents MinorUnit in which core amount works

order_date
string or null <date-time>

Date the payer placed the order.

enable_partial_authorization
boolean or null
Default: false

Allow partial authorization for this payment

is_stored_credential
boolean or null

Boolean flag indicating whether this payment method is stored and has been previously used for payments

mit_category
string or null
Enum: "installment" "unscheduled" "recurring" "resubmission"

Specifies the category of a Merchant Initiated Transaction (MIT). In the case of MIT, mit_category tells what kind of MIT is being processed. In the case of CIT, it tells the future intended MIT type.

object or null

Billing Descriptor information to be sent to the payment gateway

tokenization
string or null
Enum: "skip_psp" "tokenize_at_psp"

The type of tokenization to use for the payment method

object or null

Information identifying partner and merchant application initiating the request

Array of objects or null (InstallmentOption)

Installment payment options grouped by payment method. When provided, the payment is treated as an installment payment.

object or null

Installment selection sent by the customer during payment confirmation.

Responses

Request samples

Content type
application/json
{
  • "customer_acceptance": {
    },
  • "payment_method": "card",
  • "payment_method_data": {
    },
  • "payment_method_type": "credit"
}

Response samples

Content type
application/json
{
  • "payment_id": "pay_examplexxxxxxxxxxxxxxxxxxx",
  • "status": "requires_confirmation",
  • "amount": 6540,
  • "net_amount": 6540,
  • "shipping_cost": 6540,
  • "amount_capturable": 6540,
  • "amount_received": 6540,
  • "client_secret": "pay_EXAMPLE_PAYMENT_ID_secret_EXAMPLE_CLIENT_SECRET",
  • "created": "2022-09-10T10:11:12Z",
  • "modified_at": "2022-09-10T10:11:12Z",
  • "currency": "AED",
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "description": "It's my first payment request",
  • "mandate_id": "mandate_iwer89rnjef349dni3",
  • "setup_future_usage": "off_session",
  • "capture_method": "automatic",
  • "payment_method": "card",
  • "return_url": "https://tensorrail.com",
  • "next_action": {
    },
  • "error_code": "E0001",
  • "error_message": "Failed while verifying the card",
  • "error_reason": "param payAmount invalid, more than 100",
  • "payment_method_type": "ach",
  • "metadata": { },
  • "reference_id": "993672945374576J",
  • "payment_link": {
    },
  • "expires_on": "2022-09-10T10:11:12Z",
  • "payment_method_id": "string",
  • "merchant_order_reference_id": "Custom_Order_id_123",
  • "order_tax_amount": 0
}

Payments - Submit Eligibility Data

Authorizations:
publishable_key
path Parameters
payment_id
required
string

The identifier for payment

Request Body schema: application/json
required
client_secret
required
string

Token used for client side verification

payment_method_type
required
string (PaymentMethod)
Enum: "card" "card_redirect" "pay_later" "wallet" "bank_redirect" "bank_transfer" "crypto" "bank_debit" "reward" "real_time_payment" "upi" "voucher" "gift_card" "open_banking" "mobile_payment" "network_token"

Indicates the type of payment method. Eg: 'card', 'wallet', etc.

payment_method_subtype
string or null
Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" "paysera" "apple_pay" "atome" "bacs" "bancontact_card" "becs" "benefit" "bizum" "blik" "bluecode" "boleto" "bca_bank_transfer" "bni_va" "breadpay" "bri_va" "bhn_card_network" "card_redirect" "cimb_va" "classic" "credit" "crypto_currency" "cashapp" "dana" "danamon_va" "debit" "duit_now" "efecty" "eft" "eps" "flexiti" "fps" "evoucher" "giropay" "givex" "google_pay" "go_pay" "gcash" "ideal" "interac" "indomaret" "klarna" "kakao_pay" "local_bank_redirect" "mandiri_va" "knet" "mb_way" "mobile_pay" "momo" "momo_atm" "multibanco" "online_banking_thailand" "online_banking_czech_republic" "online_banking_finland" "online_banking_fpx" "online_banking_poland" "online_banking_slovakia" "oxxo" "pago_efectivo" "permata_bank_transfer" "open_banking_uk" "pay_bright" "payjustnow" "paypal" "paze" "pix" "pix_automatico_qr" "pix_automatico_push" "pay_safe_card" "przelewy24" "prompt_pay" "pse" "qris" "red_compra" "red_pagos" "samsung_pay" "sepa" "sepa_bank_transfer" "sepa_guarenteed_debit" "skrill" "sofort" "swish" "touch_n_go" "trustly" "twint" "upi_collect" "upi_intent" "upi_qr" "vipps" "viet_qr" "venmo" "walley" "we_chat_pay" "seven_eleven" "lawson" "mini_stop" "family_mart" "seicomart" "pay_easy" "local_bank_transfer" "mifinity" "open_banking_pis" "direct_carrier_billing" "instant_bank_transfer" "instant_bank_transfer_finland" "instant_bank_transfer_poland" "revolut_pay" "indonesian_bank_transfer" "open_banking" "network_token"

Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.

required
(EligibilityCard (object or null)) or (CardRedirect (object or null)) or (Wallet (object or null)) or (PayLater (object or null)) or (BankRedirect (object or null)) or (BankDebit (object or null)) or (BankTransfer (object or null)) or (RealTimePayment (object or null)) or (Crypto (object or null)) or (MandatePayment (object or null)) or (Reward (object or null)) or (Upi (object or null)) or (Voucher (object or null)) or (GiftCard (object or null)) or (CardToken (object or null)) or (OpenBanking (object or null)) or (MobilePayment (object or null)) or (NetworkToken (object or null)) (EligibilityPaymentMethodDataRequest)

Payment method data request for eligibility check

object or null

Browser information to be used for 3DS 2.0

Responses

Request samples

Content type
application/json
{
  • "client_secret": "pay_EXAMPLE_PAYMENT_ID_secret_EXAMPLE_CLIENT_SECRET",
  • "payment_method_type": "card",
  • "payment_method_subtype": "ach",
  • "payment_method_data": {
    },
  • "browser_info": {
    }
}

Response samples

Content type
application/json
{
  • "payment_id": "string",
  • "sdk_next_action": {
    }
}

Poll - Retrieve Poll Status

Authorizations:
publishable_key
path Parameters
poll_id
required
string

The identifier for poll

Responses

Response samples

Content type
application/json
{
  • "poll_id": "string",
  • "status": "pending"
}

Customers

Create and manage the customers you attach payments to.

Customers - Create

Creates a customer object and stores the customer details to be reused for future payments. Incase the customer already exists in the system, this API will respond with the customer details.

Authorizations:
api_key
Request Body schema: application/json
required
customer_id
string or null [ 1 .. 64 ] characters

The identifier for the customer object. If not provided the customer ID will be autogenerated.

name
string or null <= 255 characters

The customer's name

email
string or null <= 255 characters

The customer's email address

phone
string or null <= 255 characters

The customer's phone number

description
string or null <= 255 characters

An arbitrary string that you can attach to a customer object.

phone_country_code
string or null <= 255 characters

The country code for the customer phone number

object or null

Address details

metadata
object or null

You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.

tax_registration_id
string or null <= 255 characters

Customer's tax registration ID

object or null

Responses

Request samples

Content type
application/json
{
  • "email": "guest@example.com",
  • "name": "John Doe"
}

Response samples

Content type
application/json
{
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "name": "Jon Test",
  • "email": "JonTest@test.com",
  • "phone": "9123456789",
  • "phone_country_code": "+65",
  • "description": "First Customer",
  • "address": {
    },
  • "created_at": "2023-01-18T11:04:09.922Z",
  • "metadata": { },
  • "default_payment_method_id": "pm_djh2837dwduh890123",
  • "tax_registration_id": "123456789",
  • "document_details": {
    }
}

Customers - List

Lists all the customers for a particular merchant id.

Authorizations:
api_key
query Parameters
offset
integer or null <int32> >= 0

Offset for pagination

limit
integer or null <int32> >= 0

Limit for pagination

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Customers - Retrieve

Retrieves a customer's details.

Authorizations:
api_keyephemeral_key
path Parameters
customer_id
required
string

The unique identifier for the Customer

Responses

Response samples

Content type
application/json
{
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "name": "Jon Test",
  • "email": "JonTest@test.com",
  • "phone": "9123456789",
  • "phone_country_code": "+65",
  • "description": "First Customer",
  • "address": {
    },
  • "created_at": "2023-01-18T11:04:09.922Z",
  • "metadata": { },
  • "default_payment_method_id": "pm_djh2837dwduh890123",
  • "tax_registration_id": "123456789",
  • "document_details": {
    }
}

Customers - Update

Updates the customer's details in a customer object.

Authorizations:
api_key
path Parameters
customer_id
required
string

The unique identifier for the Customer

Request Body schema: application/json
required
name
string or null <= 255 characters

The customer's name

email
string or null <= 255 characters

The customer's email address

phone
string or null <= 255 characters

The customer's phone number

description
string or null <= 255 characters

An arbitrary string that you can attach to a customer object.

phone_country_code
string or null <= 255 characters

The country code for the customer phone number

object or null

Address details

metadata
object or null

You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.

tax_registration_id
string or null <= 255 characters

Customer's tax registration ID

object or null

Responses

Request samples

Content type
application/json
{
  • "email": "guest@example.com",
  • "name": "John Doe"
}

Response samples

Content type
application/json
{
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "name": "Jon Test",
  • "email": "JonTest@test.com",
  • "phone": "9123456789",
  • "phone_country_code": "+65",
  • "description": "First Customer",
  • "address": {
    },
  • "created_at": "2023-01-18T11:04:09.922Z",
  • "metadata": { },
  • "default_payment_method_id": "pm_djh2837dwduh890123",
  • "tax_registration_id": "123456789",
  • "document_details": {
    }
}

Customers - Delete

Delete a customer record.

Authorizations:
api_key
path Parameters
customer_id
required
string

The unique identifier for the Customer

Responses

Response samples

Content type
application/json
{
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "customer_deleted": false,
  • "address_deleted": false,
  • "payment_methods_deleted": false
}

Account

What your own account can present at checkout.

List payment methods for a Merchant

Lists the applicable payment methods for a particular Merchant ID. Use the client secret and publishable key authorization to list all relevant payment methods of the merchant for the payment corresponding to the client secret.

Authorizations:
api_keypublishable_key
query Parameters
client_secret
string or null

This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK

accepted_countries
Array of strings or null (CountryAlpha2)
Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BQ" "BA" "BW" "BV" "BR" "IO" "BN" "BG" "BF" "BI" "KH" "CM" "CA" "CV" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "HR" "CU" "CW" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GR" "GL" "GD" "GP" "GU" "GT" "GG" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IM" "IL" "IT" "JM" "JP" "JE" "JO" "KZ" "KE" "KI" "KP" "KR" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LI" "LT" "LU" "MO" "MK" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "ME" "MS" "MA" "MZ" "MM" "NA" "NR" "NP" "NL" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RW" "BL" "SH" "KN" "LC" "MF" "PM" "VC" "WS" "SM" "ST" "SA" "SN" "RS" "SC" "SL" "SG" "SX" "SK" "SI" "SB" "SO" "ZA" "GS" "SS" "ES" "LK" "SD" "SR" "SJ" "SZ" "SE" "CH" "SY" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "UM" "UY" "UZ" "VU" "VE" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW" "US"

The two-letter ISO currency code

accepted_currencies
Array of strings or null (Currency)
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BZD" "CAD" "CDF" "CHF" "CLF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "INR" "IQD" "IRR" "ISK" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRU" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLE" "SLL" "SOS" "SRD" "SSP" "STD" "STN" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VES" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "YER" "ZAR" "ZMW" "ZWL"

The three-letter ISO currency code

amount
integer or null <int64>

The amount accepted for processing by the particular payment method.

recurring_enabled
boolean or null

Indicates whether the payment method is eligible for recurring payments

installment_payment_enabled
boolean or null

Indicates whether the payment method is eligible for installment payments

limit
integer or null <int64>

Indicates the limit of last used payment methods

card_networks
Array of strings or null (CardNetwork)
Enum: "Visa" "Mastercard" "AmericanExpress" "JCB" "DinersClub" "Discover" "CartesBancaires" "UnionPay" "Interac" "RuPay" "Maestro" "Star" "Pulse" "Accel" "Nyce"

Indicates whether the payment method is eligible for card netwotks

Responses

Response samples

Content type
application/json
{
  • "redirect_url": "https://www.google.com",
  • "currency": "AED",
  • "payment_methods": [
    ],
  • "mandate_payment": {
    },
  • "merchant_name": "string",
  • "checkout_branding": {
    },
  • "payment_method_order": {
    },
  • "show_surcharge_breakup_screen": true,
  • "payment_type": "normal",
  • "request_external_three_ds_authentication": true,
  • "collect_shipping_details_from_wallets": true,
  • "collect_billing_details_from_wallets": true,
  • "is_tax_calculation_enabled": true,
  • "sdk_next_action": {
    },
  • "is_guest_customer": true,
  • "intent_data": {
    },
  • "card_checkout_config": {
    }
}

Refunds

Return a captured payment in whole or in part.

Refunds - Create [available on rails that support refunds]

Available on rails that support refunds. In test mode these endpoints work end to end today: the TensorRail Test Simulator — the rail behind test-mode UPI payments — supports refunds, so the whole refund path, including a partial refund and an over-amount attempt, is exercisable before you go live. Refunding a live payment needs a refund-capable rail; no rail enabled today declares one, so a live refund is arranged outside TensorRail until such a rail is switched on for your account. See Testing and sandbox.

Creates a refund against an already processed payment. In case of some processors, you can even opt to refund only a partial amount multiple times until the original charge amount has been refunded

Authorizations:
api_key
Request Body schema: application/json
required
payment_id
required
string [ 1 .. 62 ] characters

The payment id against which refund is to be initiated

refund_id
string or null [ 1 .. 64 ] characters

Unique Identifier for the Refund. This is to ensure idempotency for multiple partial refunds initiated against the same payment. If this is not passed by the merchant, this field shall be auto generated and provided in the API response. It is recommended to generate uuid(v4) as the refund_id.

merchant_id
string or null <= 255 characters

The identifier for the Merchant Account

amount
integer or null <int64> >= 100

Total amount for which the refund is to be initiated. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc., If not provided, this will default to the full payment amount

reason
string or null <= 255 characters

Reason for the refund. Often useful for displaying to users and your customer support executive. Some rails accept only one of these values: duplicate, fraudulent, or requested_by_customer.

refund_type
string or null
Default: "Instant"
Enum: "scheduled" "instant"

To indicate whether to refund needs to be instant or scheduled

metadata
object or null

You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.

object or null

Merchant connector details used to make payments.

all_keys_required
boolean or null

If true, returns stringified connector raw response body

Responses

Request samples

Content type
application/json
Example
{
  • "amount": 654,
  • "payment_id": "{{payment_id}}",
  • "refund_type": "instant"
}

Response samples

Content type
application/json
{
  • "refund_id": "string",
  • "payment_id": "string",
  • "amount": 6540,
  • "currency": "string",
  • "status": "succeeded",
  • "reason": "string",
  • "metadata": { },
  • "error_message": "string",
  • "error_code": "string",
  • "unified_code": "string",
  • "unified_message": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Refunds - List [available on rails that support refunds]

Available on rails that support refunds. In test mode these endpoints work end to end today: the TensorRail Test Simulator — the rail behind test-mode UPI payments — supports refunds, so the whole refund path, including a partial refund and an over-amount attempt, is exercisable before you go live. Refunding a live payment needs a refund-capable rail; no rail enabled today declares one, so a live refund is arranged outside TensorRail until such a rail is switched on for your account. See Testing and sandbox.

Lists all the refunds associated with the merchant, or for a specific payment if payment_id is provided

Authorizations:
api_key
Request Body schema: application/json
required
start_time
required
string <date-time>

The start time to filter payments list or to get list of filters. To get list of filters start time is needed to be passed

end_time
string or null <date-time>

The end time to filter payments list or to get list of filters. If not passed the default time is now

payment_id
string or null

The identifier for the payment

refund_id
string or null

The identifier for the refund

profile_id
string or null

The identifier for business profile

limit
integer or null <int64>

Limit on the number of objects to return

offset
integer or null <int64>

The starting point within a list of objects

object or null
connector
Array of strings or null

Processor identifier assigned by TensorRail. Routing is managed for your account; you do not select a processor.

merchant_connector_id
Array of strings or null

The list of merchant connector ids to filter the refunds list for selected label

currency
Array of strings or null (Currency)
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BZD" "CAD" "CDF" "CHF" "CLF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "INR" "IQD" "IRR" "ISK" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRU" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLE" "SLL" "SOS" "SRD" "SSP" "STD" "STN" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VES" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "YER" "ZAR" "ZMW" "ZWL"

The list of currencies to filter refunds list

refund_status
Array of strings or null (RefundStatus)
Enum: "succeeded" "failed" "pending" "review"

The list of refund statuses to filter refunds list

Responses

Request samples

Content type
application/json
{
  • "start_time": "2019-08-24T14:15:22Z",
  • "end_time": "2019-08-24T14:15:22Z",
  • "payment_id": "string",
  • "refund_id": "string",
  • "profile_id": "string",
  • "limit": 0,
  • "offset": 0,
  • "amount_filter": {
    },
  • "connector": [
    ],
  • "merchant_connector_id": [
    ],
  • "currency": [
    ],
  • "refund_status": [
    ]
}

Response samples

Content type
application/json
{
  • "count": 0,
  • "total_count": 0,
  • "data": [
    ]
}

Refunds - Retrieve [available on rails that support refunds]

Available on rails that support refunds. In test mode these endpoints work end to end today: the TensorRail Test Simulator — the rail behind test-mode UPI payments — supports refunds, so the whole refund path, including a partial refund and an over-amount attempt, is exercisable before you go live. Refunding a live payment needs a refund-capable rail; no rail enabled today declares one, so a live refund is arranged outside TensorRail until such a rail is switched on for your account. See Testing and sandbox.

Retrieves a Refund. This may be used to get the status of a previously initiated refund

Authorizations:
api_key
path Parameters
refund_id
required
string

The identifier for refund

Responses

Response samples

Content type
application/json
{
  • "refund_id": "string",
  • "payment_id": "string",
  • "amount": 6540,
  • "currency": "string",
  • "status": "succeeded",
  • "reason": "string",
  • "metadata": { },
  • "error_message": "string",
  • "error_code": "string",
  • "unified_code": "string",
  • "unified_message": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Refunds - Update [available on rails that support refunds]

Available on rails that support refunds. In test mode these endpoints work end to end today: the TensorRail Test Simulator — the rail behind test-mode UPI payments — supports refunds, so the whole refund path, including a partial refund and an over-amount attempt, is exercisable before you go live. Refunding a live payment needs a refund-capable rail; no rail enabled today declares one, so a live refund is arranged outside TensorRail until such a rail is switched on for your account. See Testing and sandbox.

Updates the properties of a Refund object. This API can be used to attach a reason for the refund or metadata fields

Authorizations:
api_key
path Parameters
refund_id
required
string

The identifier for refund

Request Body schema: application/json
required
reason
string or null <= 255 characters

An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive

metadata
object or null

You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.

Responses

Request samples

Content type
application/json
{
  • "reason": "Paid by mistake"
}

Response samples

Content type
application/json
{
  • "refund_id": "string",
  • "payment_id": "string",
  • "amount": 6540,
  • "currency": "string",
  • "status": "succeeded",
  • "reason": "string",
  • "metadata": { },
  • "error_message": "string",
  • "error_code": "string",
  • "unified_code": "string",
  • "unified_message": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Metadata updates

Change a payment's metadata after it has been sent to the rail.

Payments - Update Metadata [available on rails that accept metadata updates]

Available on rails that accept metadata updates — one that can carry a metadata change to the payment after it has been sent. No rail enabled today implements that flow, so this endpoint answers ERR_4094 and the stored metadata is unchanged. Metadata set on the create call, or on POST /payments/{payment_id} while the payment is still modifiable, is stored and returned with the payment on every rail — that is the route to use.

Authorizations:
api_key
path Parameters
payment_id
required
string

The identifier for payment

Request Body schema: application/json
required
metadata
required
object

Metadata is useful for storing additional, unstructured information on an object.

object or null

additional data that might be required by tensorrail

Responses

Request samples

Content type
application/json
{
  • "metadata": { },
  • "feature_metadata": {
    }
}

Response samples

Content type
application/json
{
  • "payment_id": "string",
  • "metadata": { },
  • "status": "requires_confirmation",
  • "feature_metadata": {
    }
}

Payment methods

Instruments stored against a customer and charged again later.

List customer saved payment methods for a Payment [available on rails that support recurring]

Available on rails that support recurring — one that can store an instrument and charge it again. No rail enabled today both declares mandate support and implements it, so no MANDATE is created: setup_future_usage, an explicit mandate_data block and a zero-amount setup each complete with 200 succeeded and return mandate_id: null, and the later off-session charge is then refused with ERR_4088. The payment-method endpoints themselves respond normally and a token row is written — what is missing is the mandate behind it, so the token cannot be charged. Treat the absence of a mandate_id on the first payment as the signal, not the status of that payment. Confirm the rail with your account manager before building against a stored instrument.

Lists all the applicable payment methods for a particular payment tied to the client_secret.

Authorizations:
publishable_key
query Parameters
client_secret
string or null

This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK

accepted_countries
Array of strings or null (CountryAlpha2)
Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BQ" "BA" "BW" "BV" "BR" "IO" "BN" "BG" "BF" "BI" "KH" "CM" "CA" "CV" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "HR" "CU" "CW" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GR" "GL" "GD" "GP" "GU" "GT" "GG" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IM" "IL" "IT" "JM" "JP" "JE" "JO" "KZ" "KE" "KI" "KP" "KR" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LI" "LT" "LU" "MO" "MK" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "ME" "MS" "MA" "MZ" "MM" "NA" "NR" "NP" "NL" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RW" "BL" "SH" "KN" "LC" "MF" "PM" "VC" "WS" "SM" "ST" "SA" "SN" "RS" "SC" "SL" "SG" "SX" "SK" "SI" "SB" "SO" "ZA" "GS" "SS" "ES" "LK" "SD" "SR" "SJ" "SZ" "SE" "CH" "SY" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "UM" "UY" "UZ" "VU" "VE" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW" "US"

The two-letter ISO currency code

accepted_currencies
Array of strings or null (Currency)
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BZD" "CAD" "CDF" "CHF" "CLF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "INR" "IQD" "IRR" "ISK" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRU" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLE" "SLL" "SOS" "SRD" "SSP" "STD" "STN" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VES" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "YER" "ZAR" "ZMW" "ZWL"

The three-letter ISO currency code

amount
integer or null <int64>

The amount accepted for processing by the particular payment method.

recurring_enabled
boolean or null

Indicates whether the payment method is eligible for recurring payments

installment_payment_enabled
boolean or null

Indicates whether the payment method is eligible for installment payments

limit
integer or null <int64>

Indicates the limit of last used payment methods

card_networks
Array of strings or null (CardNetwork)
Enum: "Visa" "Mastercard" "AmericanExpress" "JCB" "DinersClub" "Discover" "CartesBancaires" "UnionPay" "Interac" "RuPay" "Maestro" "Star" "Pulse" "Accel" "Nyce"

Indicates whether the payment method is eligible for card netwotks

Responses

Response samples

Content type
application/json
{
  • "customer_payment_methods": [
    ],
  • "is_guest_customer": true
}

List payment methods for a Customer [available on rails that support recurring]

Available on rails that support recurring — one that can store an instrument and charge it again. No rail enabled today both declares mandate support and implements it, so no MANDATE is created: setup_future_usage, an explicit mandate_data block and a zero-amount setup each complete with 200 succeeded and return mandate_id: null, and the later off-session charge is then refused with ERR_4088. The payment-method endpoints themselves respond normally and a token row is written — what is missing is the mandate behind it, so the token cannot be charged. Treat the absence of a mandate_id on the first payment as the signal, not the status of that payment. Confirm the rail with your account manager before building against a stored instrument.

Lists all the applicable payment methods for a particular Customer ID.

Authorizations:
api_key
path Parameters
customer_id
required
string

The unique identifier for the customer account

query Parameters
client_secret
string or null

This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK

accepted_countries
Array of strings or null (CountryAlpha2)
Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BQ" "BA" "BW" "BV" "BR" "IO" "BN" "BG" "BF" "BI" "KH" "CM" "CA" "CV" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "HR" "CU" "CW" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GR" "GL" "GD" "GP" "GU" "GT" "GG" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IM" "IL" "IT" "JM" "JP" "JE" "JO" "KZ" "KE" "KI" "KP" "KR" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LI" "LT" "LU" "MO" "MK" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "ME" "MS" "MA" "MZ" "MM" "NA" "NR" "NP" "NL" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RW" "BL" "SH" "KN" "LC" "MF" "PM" "VC" "WS" "SM" "ST" "SA" "SN" "RS" "SC" "SL" "SG" "SX" "SK" "SI" "SB" "SO" "ZA" "GS" "SS" "ES" "LK" "SD" "SR" "SJ" "SZ" "SE" "CH" "SY" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "UM" "UY" "UZ" "VU" "VE" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW" "US"

The two-letter ISO currency code

accepted_currencies
Array of strings or null (Currency)
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BZD" "CAD" "CDF" "CHF" "CLF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "INR" "IQD" "IRR" "ISK" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRU" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLE" "SLL" "SOS" "SRD" "SSP" "STD" "STN" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VES" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "YER" "ZAR" "ZMW" "ZWL"

The three-letter ISO currency code

amount
integer or null <int64>

The amount accepted for processing by the particular payment method.

recurring_enabled
boolean or null

Indicates whether the payment method is eligible for recurring payments

installment_payment_enabled
boolean or null

Indicates whether the payment method is eligible for installment payments

limit
integer or null <int64>

Indicates the limit of last used payment methods

card_networks
Array of strings or null (CardNetwork)
Enum: "Visa" "Mastercard" "AmericanExpress" "JCB" "DinersClub" "Discover" "CartesBancaires" "UnionPay" "Interac" "RuPay" "Maestro" "Star" "Pulse" "Accel" "Nyce"

Indicates whether the payment method is eligible for card netwotks

Responses

Response samples

Content type
application/json
{
  • "customer_payment_methods": [
    ],
  • "is_guest_customer": true
}

Payment Method - Set Default Payment Method for Customer [available on rails that support recurring]

Available on rails that support recurring — one that can store an instrument and charge it again. No rail enabled today both declares mandate support and implements it, so no MANDATE is created: setup_future_usage, an explicit mandate_data block and a zero-amount setup each complete with 200 succeeded and return mandate_id: null, and the later off-session charge is then refused with ERR_4088. The payment-method endpoints themselves respond normally and a token row is written — what is missing is the mandate behind it, so the token cannot be charged. Treat the absence of a mandate_id on the first payment as the signal, not the status of that payment. Confirm the rail with your account manager before building against a stored instrument.

Set the Payment Method as Default for the Customer.

Authorizations:
ephemeral_key
path Parameters
customer_id
required
string

The unique identifier for the Customer

payment_method_id
required
string

The unique identifier for the Payment Method

Responses

Response samples

Content type
application/json
{
  • "default_payment_method_id": "card_rGK4Vi5iSW70MY7J2mIg",
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "payment_method": "card",
  • "payment_method_type": "ach"
}

PaymentMethods - Create [available on rails that support recurring]

Available on rails that support recurring — one that can store an instrument and charge it again. No rail enabled today both declares mandate support and implements it, so no MANDATE is created: setup_future_usage, an explicit mandate_data block and a zero-amount setup each complete with 200 succeeded and return mandate_id: null, and the later off-session charge is then refused with ERR_4088. The payment-method endpoints themselves respond normally and a token row is written — what is missing is the mandate behind it, so the token cannot be charged. Treat the absence of a mandate_id on the first payment as the signal, not the status of that payment. Confirm the rail with your account manager before building against a stored instrument.

Creates and stores a payment method against a customer. In case of cards, this API should be used only by PCI compliant merchants.

Authorizations:
api_key
Request Body schema: application/json
required
payment_method
required
string (PaymentMethod)
Enum: "card" "card_redirect" "pay_later" "wallet" "bank_redirect" "bank_transfer" "crypto" "bank_debit" "reward" "real_time_payment" "upi" "voucher" "gift_card" "open_banking" "mobile_payment" "network_token"

Indicates the type of payment method. Eg: 'card', 'wallet', etc.

payment_method_type
string or null
Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" "paysera" "apple_pay" "atome" "bacs" "bancontact_card" "becs" "benefit" "bizum" "blik" "bluecode" "boleto" "bca_bank_transfer" "bni_va" "breadpay" "bri_va" "bhn_card_network" "card_redirect" "cimb_va" "classic" "credit" "crypto_currency" "cashapp" "dana" "danamon_va" "debit" "duit_now" "efecty" "eft" "eps" "flexiti" "fps" "evoucher" "giropay" "givex" "google_pay" "go_pay" "gcash" "ideal" "interac" "indomaret" "klarna" "kakao_pay" "local_bank_redirect" "mandiri_va" "knet" "mb_way" "mobile_pay" "momo" "momo_atm" "multibanco" "online_banking_thailand" "online_banking_czech_republic" "online_banking_finland" "online_banking_fpx" "online_banking_poland" "online_banking_slovakia" "oxxo" "pago_efectivo" "permata_bank_transfer" "open_banking_uk" "pay_bright" "payjustnow" "paypal" "paze" "pix" "pix_automatico_qr" "pix_automatico_push" "pay_safe_card" "przelewy24" "prompt_pay" "pse" "qris" "red_compra" "red_pagos" "samsung_pay" "sepa" "sepa_bank_transfer" "sepa_guarenteed_debit" "skrill" "sofort" "swish" "touch_n_go" "trustly" "twint" "upi_collect" "upi_intent" "upi_qr" "vipps" "viet_qr" "venmo" "walley" "we_chat_pay" "seven_eleven" "lawson" "mini_stop" "family_mart" "seicomart" "pay_easy" "local_bank_transfer" "mifinity" "open_banking_pis" "direct_carrier_billing" "instant_bank_transfer" "instant_bank_transfer_finland" "instant_bank_transfer_poland" "revolut_pay" "indonesian_bank_transfer" "open_banking" "network_token"

Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.

payment_method_issuer
string or null

The name of the bank/ provider issuing the payment method to the end user

payment_method_issuer_code
string or null
Enum: "jp_hdfc" "jp_icici" "jp_googlepay" "jp_applepay" "jp_phonepay" "jp_wechat" "jp_sofort" "jp_giropay" "jp_sepa" "jp_bacs"
object or null
metadata
object or null

You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.

customer_id
string or null [ 1 .. 64 ] characters

The unique identifier of the customer.

card_network
string or null

The card network

(AchBankTransfer (object or null)) or (BacsBankTransfer (object or null)) or (TrustlyBankTransfer (object or null)) or (SepaBankTransfer (object or null)) or (PixBankTransfer (object or null))

Deprecated - Use BankTransfer instead

any or null
(object or null) or (object or null) or (object or null)
client_secret
string or null

For Client based calls, SDK will use the client_secret in order to call /payment_methods Client secret will be generated whenever a new payment method is created

(object or null) or (object or null)
object or null

Responses

Request samples

Content type
application/json
{
  • "card": {
    },
  • "customer_id": "{{customer_id}}",
  • "payment_method": "card",
  • "payment_method_issuer": "Visa",
  • "payment_method_type": "credit"
}

Response samples

Content type
application/json
{
  • "merchant_id": "merchant_1671528864",
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "payment_method_id": "card_rGK4Vi5iSW70MY7J2mIg",
  • "payment_method": "card",
  • "payment_method_type": "ach",
  • "card": {
    },
  • "recurring_enabled": true,
  • "installment_payment_enabled": true,
  • "payment_experience": [
    ],
  • "metadata": { },
  • "created": "2023-01-18T11:04:09.922Z",
  • "bank_transfer": {
    },
  • "last_used_at": "2024-02-24T11:04:09.922Z",
  • "client_secret": "string"
}

Payment Method - Retrieve [available on rails that support recurring]

Available on rails that support recurring — one that can store an instrument and charge it again. No rail enabled today both declares mandate support and implements it, so no MANDATE is created: setup_future_usage, an explicit mandate_data block and a zero-amount setup each complete with 200 succeeded and return mandate_id: null, and the later off-session charge is then refused with ERR_4088. The payment-method endpoints themselves respond normally and a token row is written — what is missing is the mandate behind it, so the token cannot be charged. Treat the absence of a mandate_id on the first payment as the signal, not the status of that payment. Confirm the rail with your account manager before building against a stored instrument.

Retrieves a payment method of a customer.

Authorizations:
api_key
path Parameters
method_id
required
string

The unique identifier for the Payment Method

Responses

Response samples

Content type
application/json
{
  • "merchant_id": "merchant_1671528864",
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "payment_method_id": "card_rGK4Vi5iSW70MY7J2mIg",
  • "payment_method": "card",
  • "payment_method_type": "ach",
  • "card": {
    },
  • "recurring_enabled": true,
  • "installment_payment_enabled": true,
  • "payment_experience": [
    ],
  • "metadata": { },
  • "created": "2023-01-18T11:04:09.922Z",
  • "bank_transfer": {
    },
  • "last_used_at": "2024-02-24T11:04:09.922Z",
  • "client_secret": "string"
}

Payment Method - Delete [available on rails that support recurring]

Available on rails that support recurring — one that can store an instrument and charge it again. No rail enabled today both declares mandate support and implements it, so no MANDATE is created: setup_future_usage, an explicit mandate_data block and a zero-amount setup each complete with 200 succeeded and return mandate_id: null, and the later off-session charge is then refused with ERR_4088. The payment-method endpoints themselves respond normally and a token row is written — what is missing is the mandate behind it, so the token cannot be charged. Treat the absence of a mandate_id on the first payment as the signal, not the status of that payment. Confirm the rail with your account manager before building against a stored instrument.

Deletes a payment method of a customer.

Authorizations:
api_key
path Parameters
method_id
required
string

The unique identifier for the Payment Method

Responses

Response samples

Content type
application/json
{
  • "payment_method_id": "card_rGK4Vi5iSW70MY7J2mIg",
  • "deleted": true
}

Payment Method - Update [available on rails that support recurring]

Available on rails that support recurring — one that can store an instrument and charge it again. No rail enabled today both declares mandate support and implements it, so no MANDATE is created: setup_future_usage, an explicit mandate_data block and a zero-amount setup each complete with 200 succeeded and return mandate_id: null, and the later off-session charge is then refused with ERR_4088. The payment-method endpoints themselves respond normally and a token row is written — what is missing is the mandate behind it, so the token cannot be charged. Treat the absence of a mandate_id on the first payment as the signal, not the status of that payment. Confirm the rail with your account manager before building against a stored instrument.

Update an existing payment method of a customer.

This is a partial update: every field you omit keeps the value already stored. The card number itself cannot be changed here. Send a new expiry to carry a saved card past its expiry date and keep a recurring series running, and save a new payment method to replace the number.

Authorizations:
api_keypublishable_key
path Parameters
method_id
required
string

The unique identifier for the Payment Method

Request Body schema: application/json
required
object or null
object or null
client_secret
string or null <= 128 characters

This is a 15 minute expiry token which shall be used from the client to authenticate and perform sessions from the SDK

Responses

Request samples

Content type
application/json
{
  • "card": {
    },
  • "wallet": {
    },
  • "client_secret": "secret_k2uj3he2893eiu2d"
}

Response samples

Content type
application/json
{
  • "merchant_id": "merchant_1671528864",
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "payment_method_id": "card_rGK4Vi5iSW70MY7J2mIg",
  • "payment_method": "card",
  • "payment_method_type": "ach",
  • "card": {
    },
  • "recurring_enabled": true,
  • "installment_payment_enabled": true,
  • "payment_experience": [
    ],
  • "metadata": { },
  • "created": "2023-01-18T11:04:09.922Z",
  • "bank_transfer": {
    },
  • "last_used_at": "2024-02-24T11:04:09.922Z",
  • "client_secret": "string"
}

Mandates

The customer's standing authorization behind a stored instrument.

Mandates - Customer Mandates List [available on rails that support recurring]

Available on rails that support recurring — one that can store an instrument and charge it again. No rail enabled today both declares mandate support and implements it, so no MANDATE is created: setup_future_usage, an explicit mandate_data block and a zero-amount setup each complete with 200 succeeded and return mandate_id: null, and the later off-session charge is then refused with ERR_4088. The payment-method endpoints themselves respond normally and a token row is written — what is missing is the mandate behind it, so the token cannot be charged. Treat the absence of a mandate_id on the first payment as the signal, not the status of that payment. Confirm the rail with your account manager before building against a stored instrument.

Lists all the mandates for a particular customer id.

Authorizations:
api_key
path Parameters
customer_id
required
string

The unique identifier for the customer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Mandates - List Mandates [available on rails that support recurring]

Available on rails that support recurring — one that can store an instrument and charge it again. No rail enabled today both declares mandate support and implements it, so no MANDATE is created: setup_future_usage, an explicit mandate_data block and a zero-amount setup each complete with 200 succeeded and return mandate_id: null, and the later off-session charge is then refused with ERR_4088. The payment-method endpoints themselves respond normally and a token row is written — what is missing is the mandate behind it, so the token cannot be charged. Treat the absence of a mandate_id on the first payment as the signal, not the status of that payment. Confirm the rail with your account manager before building against a stored instrument.

Lists the mandates on your account.

Authorizations:
api_key
query Parameters
limit
integer or null <int64>

The maximum number of Mandate Objects to include in the response

offset
integer or null <int64>

The starting point within the list of objects

mandate_status
string or null
Enum: "active" "inactive" "pending" "revoked"

The status of mandate

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Mandates - Revoke Mandate [available on rails that support recurring]

Available on rails that support recurring — one that can store an instrument and charge it again. No rail enabled today both declares mandate support and implements it, so no MANDATE is created: setup_future_usage, an explicit mandate_data block and a zero-amount setup each complete with 200 succeeded and return mandate_id: null, and the later off-session charge is then refused with ERR_4088. The payment-method endpoints themselves respond normally and a token row is written — what is missing is the mandate behind it, so the token cannot be charged. Treat the absence of a mandate_id on the first payment as the signal, not the status of that payment. Confirm the rail with your account manager before building against a stored instrument.

Revokes a mandate created using the Payments/Create API

Authorizations:
api_key
path Parameters
mandate_id
required
string

The identifier for a mandate

Responses

Response samples

Content type
application/json
{
  • "mandate_id": "string",
  • "status": "active",
  • "error_code": "E0001",
  • "error_message": "Failed while verifying the card"
}

Mandates - Retrieve Mandate [available on rails that support recurring]

Available on rails that support recurring — one that can store an instrument and charge it again. No rail enabled today both declares mandate support and implements it, so no MANDATE is created: setup_future_usage, an explicit mandate_data block and a zero-amount setup each complete with 200 succeeded and return mandate_id: null, and the later off-session charge is then refused with ERR_4088. The payment-method endpoints themselves respond normally and a token row is written — what is missing is the mandate behind it, so the token cannot be charged. Treat the absence of a mandate_id on the first payment as the signal, not the status of that payment. Confirm the rail with your account manager before building against a stored instrument.

Retrieves a mandate created using the Payments/Create API

Authorizations:
api_key
path Parameters
mandate_id
required
string

The identifier for mandate

Responses

Response samples

Content type
application/json
{
  • "mandate_id": "string",
  • "status": "active",
  • "payment_method_id": "string",
  • "payment_method": "string",
  • "payment_method_type": "string",
  • "card": {
    },
  • "customer_acceptance": {
    }
}

Subscriptions

Recurring billing schedules, run by a billing processor.

Subscription - Create and Confirm [available with a billing processor]

Available with a billing processor connected. Subscriptions are billed by a billing processor — a connector class separate from the rails that move the money — and billing_processor_id is required on every subscription. No billing processor is connected today, so a subscription cannot be created and the call is refused for the missing billing_processor_id. This is independent of your payment rail: connecting one is an account configuration step rather than a rail feature, so it is not unlocked by a card or mandate-capable rail. Ask your account manager.

Creates and confirms a subscription in a single request.

Authorizations:
api_key
header Parameters
X-Profile-Id
required
string

Profile ID for authentication

Request Body schema: application/json
required
plan_id
string or null

Identifier for the associated plan_id.

item_price_id
required
string

Identifier for the associated item_price_id for the subscription.

coupon_code
string or null

Identifier for the coupon code for the subscription.

customer_id
required
string (CustomerId)

A type for customer_id that can be used for customer ids

object or null
object or null
required
object (PaymentDetails)
merchant_reference_id
string or null

Merchant specific Unique identifier.

Responses

Request samples

Content type
application/json
{
  • "billing": {
    },
  • "customer_id": "cust_123456789",
  • "description": "Hello this is description",
  • "item_price_id": "standard-plan-USD-Monthly",
  • "merchant_reference_id": "mer_ref_123456789",
  • "payment_details": {
    },
  • "shipping": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "merchant_reference_id": "string",
  • "status": "active",
  • "plan_id": "string",
  • "item_price_id": "string",
  • "profile_id": "string",
  • "client_secret": "string",
  • "merchant_id": "string",
  • "coupon_code": "string",
  • "customer_id": "string",
  • "payment": {
    },
  • "amount": 0,
  • "currency": "AED",
  • "invoice": {
    }
}

Subscription - Create [available with a billing processor]

Available with a billing processor connected. Subscriptions are billed by a billing processor — a connector class separate from the rails that move the money — and billing_processor_id is required on every subscription. No billing processor is connected today, so a subscription cannot be created and the call is refused for the missing billing_processor_id. This is independent of your payment rail: connecting one is an account configuration step rather than a rail feature, so it is not unlocked by a card or mandate-capable rail. Ask your account manager.

Creates a subscription that requires separate confirmation.

Authorizations:
api_key
header Parameters
X-Profile-Id
required
string

Profile ID for authentication

Request Body schema: application/json
required
merchant_reference_id
string or null

Merchant specific Unique identifier.

item_price_id
required
string

Identifier for the associated item_price_id for the subscription.

plan_id
string or null

Identifier for the subscription plan.

coupon_code
string or null

Optional coupon code applied to the subscription.

customer_id
required
string (CustomerId)

A type for customer_id that can be used for customer ids

required
object (CreateSubscriptionPaymentDetails)
object or null
object or null

Responses

Request samples

Content type
application/json
{
  • "customer_id": "cust_123456789",
  • "item_price_id": "standard-plan-USD-Monthly",
  • "payment_details": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "merchant_reference_id": "string",
  • "status": "active",
  • "plan_id": "string",
  • "item_price_id": "string",
  • "profile_id": "string",
  • "client_secret": "string",
  • "merchant_id": "string",
  • "coupon_code": "string",
  • "customer_id": "string",
  • "payment": {
    },
  • "amount": 0,
  • "currency": "AED",
  • "invoice": {
    }
}

Subscription - Get Estimate [available with a billing processor]

Available with a billing processor connected. Subscriptions are billed by a billing processor — a connector class separate from the rails that move the money — and billing_processor_id is required on every subscription. No billing processor is connected today, so a subscription cannot be created and the call is refused for the missing billing_processor_id. This is independent of your payment rail: connecting one is an account configuration step rather than a rail feature, so it is not unlocked by a card or mandate-capable rail. Ask your account manager.

Gets pricing estimate for a subscription.

Authorizations:
api_key
query Parameters
plan_id
required
string

Plan ID for estimation

customer_id
string or null

Customer ID for personalized pricing

coupon_id
string or null

Coupon ID to apply discount

trial_days
integer or null <int32> >= 0

Number of trial days

header Parameters
X-Profile-Id
required
string

Profile ID for authentication

Responses

Response samples

Content type
application/json
{
  • "amount": 0,
  • "currency": "AED",
  • "plan_id": "string",
  • "item_price_id": "string",
  • "coupon_code": "string",
  • "customer_id": "string",
  • "line_items": [
    ]
}

Subscription - Get Items [available with a billing processor]

Available with a billing processor connected. Subscriptions are billed by a billing processor — a connector class separate from the rails that move the money — and billing_processor_id is required on every subscription. No billing processor is connected today, so a subscription cannot be created and the call is refused for the missing billing_processor_id. This is independent of your payment rail: connecting one is an account configuration step rather than a rail feature, so it is not unlocked by a card or mandate-capable rail. Ask your account manager.

Retrieves available subscription items.

Authorizations:
api_keypublishable_key
query Parameters
limit
integer or null <int32> >= 0

Number of items to retrieve

offset
integer or null <int32> >= 0

Number of items to skip

product_id
string or null

Filter by product ID

item_type
required
string (SubscriptionItemType)
Enum: "plan" "addon"

Filter by subscription item type plan or addon

header Parameters
X-Profile-Id
required
string

Profile ID for authentication

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Subscription - List [available with a billing processor]

Available with a billing processor connected. Subscriptions are billed by a billing processor — a connector class separate from the rails that move the money — and billing_processor_id is required on every subscription. No billing processor is connected today, so a subscription cannot be created and the call is refused for the missing billing_processor_id. This is independent of your payment rail: connecting one is an account configuration step rather than a rail feature, so it is not unlocked by a card or mandate-capable rail. Ask your account manager.

Lists the subscriptions on a profile.

Authorizations:
api_key
query Parameters
limit
integer or null <int64>

Number of records to return

offset
integer or null <int64>

Offset for pagination

header Parameters
X-Profile-Id
required
string

Profile ID for authentication

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Subscription - Retrieve [available with a billing processor]

Available with a billing processor connected. Subscriptions are billed by a billing processor — a connector class separate from the rails that move the money — and billing_processor_id is required on every subscription. No billing processor is connected today, so a subscription cannot be created and the call is refused for the missing billing_processor_id. This is independent of your payment rail: connecting one is an account configuration step rather than a rail feature, so it is not unlocked by a card or mandate-capable rail. Ask your account manager.

Retrieves subscription details by ID.

Authorizations:
api_key
path Parameters
subscription_id
required
string

The unique identifier for the subscription

header Parameters
X-Profile-Id
required
string

Profile ID for authentication

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "merchant_reference_id": "string",
  • "status": "active",
  • "plan_id": "string",
  • "item_price_id": "string",
  • "profile_id": "string",
  • "client_secret": "string",
  • "merchant_id": "string",
  • "coupon_code": "string",
  • "customer_id": "string",
  • "payment": {
    },
  • "amount": 0,
  • "currency": "AED",
  • "invoice": {
    }
}

Subscription - Cancel Subscription [available with a billing processor]

Available with a billing processor connected. Subscriptions are billed by a billing processor — a connector class separate from the rails that move the money — and billing_processor_id is required on every subscription. No billing processor is connected today, so a subscription cannot be created and the call is refused for the missing billing_processor_id. This is independent of your payment rail: connecting one is an account configuration step rather than a rail feature, so it is not unlocked by a card or mandate-capable rail. Ask your account manager.

Cancel the subscription

Authorizations:
api_key
path Parameters
subscription_id
required
string

The unique identifier for the subscription

header Parameters
X-Profile-Id
required
string

Profile ID for authentication

Request Body schema: application/json
required
cancel_option
string or null
Enum: "immediately" "end_of_term" "specific_date"
cancel_at
string or null

Optional date when the subscription should be cancelled (if not provided, cancels immediately)

unbilled_charges_option
string or null
Enum: "invoice" "delete"
credit_option_for_current_term_charges
string or null
Enum: "none" "prorate" "full"
account_receivables_handling
string or null
Enum: "no_action" "schedule_payment_collection" "write_off"
refundable_credits_handling
string or null
Enum: "no_action" "schedule_refund"
cancel_reason_code
string or null

Reason code for canceling the subscription

Responses

Request samples

Content type
application/json
{
  • "cancel_option": "immediately",
  • "credit_option_for_current_term_charges": "prorate",
  • "refundable_credits_handling": "schedule_refund",
  • "unbilled_charges_option": "invoice"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "merchant_reference_id": "string",
  • "profile_id": "string",
  • "merchant_id": "string",
  • "customer_id": "string",
  • "cancelled_at": "string"
}

Subscription - Confirm [available with a billing processor]

Available with a billing processor connected. Subscriptions are billed by a billing processor — a connector class separate from the rails that move the money — and billing_processor_id is required on every subscription. No billing processor is connected today, so a subscription cannot be created and the call is refused for the missing billing_processor_id. This is independent of your payment rail: connecting one is an account configuration step rather than a rail feature, so it is not unlocked by a card or mandate-capable rail. Ask your account manager.

Confirms a previously created subscription.

Authorizations:
api_keypublishable_key
path Parameters
subscription_id
required
string

The unique identifier for the subscription

header Parameters
X-Profile-Id
required
string

Profile ID for authentication

Request Body schema: application/json
required
client_secret
string or null

This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK

required
object (ConfirmSubscriptionPaymentDetails)

Responses

Request samples

Content type
application/json
{
  • "payment_details": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "merchant_reference_id": "string",
  • "status": "active",
  • "plan_id": "string",
  • "item_price_id": "string",
  • "profile_id": "string",
  • "client_secret": "string",
  • "merchant_id": "string",
  • "coupon_code": "string",
  • "customer_id": "string",
  • "payment": {
    },
  • "amount": 0,
  • "currency": "AED",
  • "invoice": {
    }
}

Subscription - Pause Subscription [available with a billing processor]

Available with a billing processor connected. Subscriptions are billed by a billing processor — a connector class separate from the rails that move the money — and billing_processor_id is required on every subscription. No billing processor is connected today, so a subscription cannot be created and the call is refused for the missing billing_processor_id. This is independent of your payment rail: connecting one is an account configuration step rather than a rail feature, so it is not unlocked by a card or mandate-capable rail. Ask your account manager.

Pause the subscription

Authorizations:
api_key
path Parameters
subscription_id
required
string

The unique identifier for the subscription

header Parameters
X-Profile-Id
required
string

Profile ID for authentication

Request Body schema: application/json
required
pause_option
string or null
Enum: "immediately" "end_of_term" "specific_date"
pause_at
string or null

Optional date when the subscription should be paused (if not provided, pauses immediately)

Responses

Request samples

Content type
application/json
{
  • "pause_option": "immediately"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "merchant_reference_id": "string",
  • "profile_id": "string",
  • "merchant_id": "string",
  • "customer_id": "string",
  • "paused_at": "string"
}

Subscription - Resume Subscription [available with a billing processor]

Available with a billing processor connected. Subscriptions are billed by a billing processor — a connector class separate from the rails that move the money — and billing_processor_id is required on every subscription. No billing processor is connected today, so a subscription cannot be created and the call is refused for the missing billing_processor_id. This is independent of your payment rail: connecting one is an account configuration step rather than a rail feature, so it is not unlocked by a card or mandate-capable rail. Ask your account manager.

Resume the subscription

Authorizations:
api_key
path Parameters
subscription_id
required
string

The unique identifier for the subscription

header Parameters
X-Profile-Id
required
string

Profile ID for authentication

Request Body schema: application/json
required
resume_option
string or null
Enum: "immediately" "specific_date"
resume_date
string or null

Optional date when the subscription should be resumed (if not provided, resumes immediately)

charges_handling
string or null
Enum: "invoice_immediately" "add_to_unbilled_charges"
unpaid_invoices_handling
string or null
Enum: "no_action" "schedule_payment_collection"

Responses

Request samples

Content type
application/json
{
  • "resume_option": "immediately",
  • "unpaid_invoices_handling": "schedule_payment_collection"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "merchant_reference_id": "string",
  • "profile_id": "string",
  • "merchant_id": "string",
  • "customer_id": "string",
  • "next_billing_at": "string"
}

Subscription - Update [available with a billing processor]

Available with a billing processor connected. Subscriptions are billed by a billing processor — a connector class separate from the rails that move the money — and billing_processor_id is required on every subscription. No billing processor is connected today, so a subscription cannot be created and the call is refused for the missing billing_processor_id. This is independent of your payment rail: connecting one is an account configuration step rather than a rail feature, so it is not unlocked by a card or mandate-capable rail. Ask your account manager.

Updates an existing subscription.

Authorizations:
api_key
path Parameters
subscription_id
required
string

The unique identifier for the subscription

header Parameters
X-Profile-Id
required
string

Profile ID for authentication

Request Body schema: application/json
required
plan_id
required
string

Identifier for the associated plan_id.

item_price_id
required
string

Identifier for the associated item_price_id for the subscription.

Responses

Request samples

Content type
application/json
{
  • "item_price_id": "cbdemo_enterprise-suite-monthly",
  • "plan_id": "cbdemo_enterprise-suite"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "merchant_reference_id": "string",
  • "status": "active",
  • "plan_id": "string",
  • "item_price_id": "string",
  • "profile_id": "string",
  • "client_secret": "string",
  • "merchant_id": "string",
  • "coupon_code": "string",
  • "customer_id": "string",
  • "payment": {
    },
  • "amount": 0,
  • "currency": "AED",
  • "invoice": {
    }
}

Manual capture

Authorize now and capture, extend or reverse later.

Payments - Cancel Post Capture [available on rails with manual capture]

Available on rails with manual capture — one that authorizes now and captures later. The rails enabled today capture as they authorize (automatic, sequential_automatic), so there is no open authorization to capture, extend or reverse afterwards; build against automatic capture unless a manual-capture rail is enabled for your account.

A Payment could can be cancelled when it is in one of these statuses: succeeded, partially_captured, partially_captured_and_capturable.

Authorizations:
api_key
path Parameters
payment_id
required
string

The identifier for payment

Request Body schema: application/json
required
cancellation_reason
string or null

The reason for the payment cancel

Responses

Request samples

Content type
application/json
Example
{
  • "cancellation_reason": "requested_by_customer"
}

Response samples

Content type
application/json
{
  • "payment_id": "pay_examplexxxxxxxxxxxxxxxxxxx",
  • "status": "requires_confirmation",
  • "amount": 6540,
  • "net_amount": 6540,
  • "shipping_cost": 6540,
  • "amount_capturable": 6540,
  • "amount_received": 6540,
  • "client_secret": "pay_EXAMPLE_PAYMENT_ID_secret_EXAMPLE_CLIENT_SECRET",
  • "created": "2022-09-10T10:11:12Z",
  • "modified_at": "2022-09-10T10:11:12Z",
  • "currency": "AED",
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "customer": {
    },
  • "description": "It's my first payment request",
  • "mandate_id": "mandate_iwer89rnjef349dni3",
  • "setup_future_usage": "off_session",
  • "capture_method": "automatic",
  • "payment_method": "card",
  • "return_url": "https://tensorrail.com",
  • "next_action": {
    },
  • "error_code": "E0001",
  • "error_message": "Failed while verifying the card",
  • "error_reason": "param payAmount invalid, more than 100",
  • "payment_method_type": "ach",
  • "metadata": { },
  • "reference_id": "993672945374576J",
  • "payment_link": {
    },
  • "expires_on": "2022-09-10T10:11:12Z",
  • "payment_method_id": "string",
  • "merchant_order_reference_id": "Custom_Order_id_123",
  • "order_tax_amount": 0
}

Payments - Capture [available on rails with manual capture]

Available on rails with manual capture — one that authorizes now and captures later. The rails enabled today capture as they authorize (automatic, sequential_automatic), so there is no open authorization to capture, extend or reverse afterwards; build against automatic capture unless a manual-capture rail is enabled for your account.

Captures the funds for a previously authorized payment intent where capture_method was set to manual and the payment is in a requires_capture state.

Upon successful capture, the payment status usually transitions to succeeded. The amount_to_capture can be specified in the request body; it must be less than or equal to the payment's amount_capturable. If omitted, the full capturable amount is captured.

A payment must be in a capturable state (e.g., requires_capture). Attempting to capture an already succeeded (and fully captured) payment or one in an invalid state will lead to an error.

Authorizations:
api_key
path Parameters
payment_id
required
string

The identifier for payment

Request Body schema: application/json
required
merchant_id
string or null

The unique identifier for the merchant. This is usually inferred from the API key.

amount_to_capture
integer or null <int64>

The amount to capture, in the lowest denomination of the currency. If omitted, the entire amount_capturable of the payment will be captured. Must be less than or equal to the current amount_capturable.

refund_uncaptured_amount
boolean or null

Decider to refund the uncaptured amount. (Currently not fully supported or behavior may vary by connector).

statement_descriptor_suffix
string or null

A dynamic suffix that appears on your customer's credit card statement. This is concatenated with the (shortened) descriptor prefix set on your account to form the complete statement descriptor. The combined length should not exceed connector-specific limits (typically 22 characters).

statement_descriptor_prefix
string or null

An optional prefix for the statement descriptor that appears on your customer's credit card statement. This can override the default prefix set on your merchant account. The combined length of prefix and suffix should not exceed connector-specific limits (typically 22 characters).

object or null

Merchant connector details used to make payments.

all_keys_required
boolean or null

If true, returns stringified connector raw response body

Responses

Request samples

Content type
application/json
Example
{
  • "amount_to_capture": 654
}

Response samples

Content type
application/json
{
  • "payment_id": "pay_examplexxxxxxxxxxxxxxxxxxx",
  • "status": "requires_confirmation",
  • "amount": 6540,
  • "net_amount": 6540,
  • "shipping_cost": 6540,
  • "amount_capturable": 6540,
  • "amount_received": 6540,
  • "client_secret": "pay_EXAMPLE_PAYMENT_ID_secret_EXAMPLE_CLIENT_SECRET",
  • "created": "2022-09-10T10:11:12Z",
  • "modified_at": "2022-09-10T10:11:12Z",
  • "currency": "AED",
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "customer": {
    },
  • "description": "It's my first payment request",
  • "mandate_id": "mandate_iwer89rnjef349dni3",
  • "setup_future_usage": "off_session",
  • "capture_method": "automatic",
  • "payment_method": "card",
  • "return_url": "https://tensorrail.com",
  • "next_action": {
    },
  • "error_code": "E0001",
  • "error_message": "Failed while verifying the card",
  • "error_reason": "param payAmount invalid, more than 100",
  • "payment_method_type": "ach",
  • "metadata": { },
  • "reference_id": "993672945374576J",
  • "payment_link": {
    },
  • "expires_on": "2022-09-10T10:11:12Z",
  • "payment_method_id": "string",
  • "merchant_order_reference_id": "Custom_Order_id_123",
  • "order_tax_amount": 0
}

Disputes

Chargebacks raised against a payment, and the evidence you file against them.

Disputes - Accept Dispute [available on rails that report disputes]

Available on rails that report disputes. The rails enabled today raise payment events only, so nothing raises a dispute against a payment taken on them and these endpoints answer with an empty list rather than an incomplete one. They switch on with a rail that reports disputes.

Concede a dispute rather than contesting it. This is final: the disputed amount stays with the customer and the dispute moves to dispute_accepted.

Authorizations:
api_key
path Parameters
dispute_id
required
string

The identifier for dispute

Responses

Response samples

Content type
application/json
{
  • "dispute_id": "string",
  • "payment_id": "string",
  • "amount": "string",
  • "currency": "AED",
  • "dispute_stage": "pre_dispute",
  • "dispute_status": "dispute_opened",
  • "challenge_required_by": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "is_already_refunded": true
}

Disputes - Dispute Totals [available on rails that report disputes]

Available on rails that report disputes. The rails enabled today raise payment events only, so nothing raises a dispute against a payment taken on them and these endpoints answer with an empty list rather than an incomplete one. They switch on with a rail that reports disputes.

Counts your disputes by status over a time range. start_time is required.

Authorizations:
api_key
query Parameters
start_time
required
string <date-time>

Count disputes received at or after this time. Required

end_time
string or null <date-time>

Count disputes received at or before this time. Defaults to now

Responses

Response samples

Content type
application/json
{
  • "status_with_count": {
    }
}

Disputes - Submit Dispute Evidence [available on rails that report disputes]

Available on rails that report disputes. The rails enabled today raise payment events only, so nothing raises a dispute against a payment taken on them and these endpoints answer with an empty list rather than an incomplete one. They switch on with a rail that reports disputes.

Contest a dispute by submitting your evidence. The file-shaped fields take a file_id returned by POST /files; the rest are free text. Submitting forwards the evidence to the rail the dispute arrived on.

Authorizations:
api_key
Request Body schema: application/json
required
dispute_id
required
string

Dispute Id

access_activity_log
string or null

Logs showing the usage of service by customer

billing_address
string or null

Billing address of the customer

cancellation_policy
string or null

File Id of cancellation policy

cancellation_policy_disclosure
string or null

Details of showing cancellation policy to customer before purchase

cancellation_rebuttal
string or null

Details telling why customer's subscription was not cancelled

customer_communication
string or null

File Id of customer communication

customer_email_address
string or null

Customer email address

customer_name
string or null

Customer name

customer_purchase_ip
string or null

IP address of the customer

customer_signature
string or null

Fild Id of customer signature

product_description
string or null

Product Description

receipt
string or null

File Id of receipt

refund_policy
string or null

File Id of refund policy

refund_policy_disclosure
string or null

Details of showing refund policy to customer before purchase

refund_refusal_explanation
string or null

Details why customer is not entitled to refund

service_date
string or null

Customer service date

service_documentation
string or null

File Id service documentation

shipping_address
string or null

Shipping address of the customer

shipping_carrier
string or null

Delivery service that shipped the product

shipping_date
string or null

Shipping date

shipping_documentation
string or null

File Id shipping documentation

shipping_tracking_number
string or null

Tracking number of shipped product

invoice_showing_distinct_transactions
string or null

File Id showing two distinct transactions when customer claims a payment was charged twice

recurring_transaction_agreement
string or null

File Id of recurring transaction agreement

uncategorized_file
string or null

Any additional supporting file

uncategorized_text
string or null

Any additional evidence statements

Responses

Request samples

Content type
application/json
{
  • "dispute_id": "string",
  • "access_activity_log": "string",
  • "billing_address": "string",
  • "cancellation_policy": "string",
  • "cancellation_policy_disclosure": "string",
  • "cancellation_rebuttal": "string",
  • "customer_communication": "string",
  • "customer_email_address": "string",
  • "customer_name": "string",
  • "customer_purchase_ip": "string",
  • "customer_signature": "string",
  • "product_description": "string",
  • "receipt": "string",
  • "refund_policy": "string",
  • "refund_policy_disclosure": "string",
  • "refund_refusal_explanation": "string",
  • "service_date": "string",
  • "service_documentation": "string",
  • "shipping_address": "string",
  • "shipping_carrier": "string",
  • "shipping_date": "string",
  • "shipping_documentation": "string",
  • "shipping_tracking_number": "string",
  • "invoice_showing_distinct_transactions": "string",
  • "recurring_transaction_agreement": "string",
  • "uncategorized_file": "string",
  • "uncategorized_text": "string"
}

Response samples

Content type
application/json
{
  • "dispute_id": "string",
  • "payment_id": "string",
  • "amount": "string",
  • "currency": "AED",
  • "dispute_stage": "pre_dispute",
  • "dispute_status": "dispute_opened",
  • "challenge_required_by": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "is_already_refunded": true
}

Disputes - Attach Evidence to Dispute [available on rails that report disputes]

Available on rails that report disputes. The rails enabled today raise payment events only, so nothing raises a dispute against a payment taken on them and these endpoints answer with an empty list rather than an incomplete one. They switch on with a rail that reports disputes.

Upload an evidence file and bind it to a dispute in one multipart/form-data request, as an alternative to POST /files followed by POST /disputes/evidence. Send dispute_id, evidence_type and the file part.

Authorizations:
api_key
Request Body schema: multipart/form-data
required
dispute_id
required
string

The dispute to attach the evidence to.

evidence_type
required
string (EvidenceType)
Enum: "cancellation_policy" "customer_communication" "customer_signature" "receipt" "refund_policy" "service_documentation" "shipping_documentation" "invoice_showing_distinct_transactions" "recurring_transaction_agreement" "uncategorized_file"
file
required
string <binary>

The file itself. Its type is detected from the content, not from the part's declared type, so a format with no recognisable signature is rejected.

Responses

Response samples

Content type
application/json
{
  • "file_id": "string"
}

Disputes - Delete Evidence attached to a Dispute [available on rails that report disputes]

Available on rails that report disputes. The rails enabled today raise payment events only, so nothing raises a dispute against a payment taken on them and these endpoints answer with an empty list rather than an incomplete one. They switch on with a rail that reports disputes.

Detach one evidence block from a dispute before it is submitted.

Authorizations:
api_key
Request Body schema: application/json
required
dispute_id
required
string

Id of the dispute

evidence_type
required
string (EvidenceType)
Enum: "cancellation_policy" "customer_communication" "customer_signature" "receipt" "refund_policy" "service_documentation" "shipping_documentation" "invoice_showing_distinct_transactions" "recurring_transaction_agreement" "uncategorized_file"

Responses

Request samples

Content type
application/json
{
  • "dispute_id": "string",
  • "evidence_type": "cancellation_policy"
}

Disputes - Retrieve Dispute Evidence [available on rails that report disputes]

Available on rails that report disputes. The rails enabled today raise payment events only, so nothing raises a dispute against a payment taken on them and these endpoints answer with an empty list rather than an incomplete one. They switch on with a rail that reports disputes.

Lists the evidence currently attached to a dispute, with the file metadata for each block.

Authorizations:
api_key
path Parameters
dispute_id
required
string

The identifier for dispute

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Disputes - List Dispute Filters [available on rails that report disputes]

Available on rails that report disputes. The rails enabled today raise payment events only, so nothing raises a dispute against a payment taken on them and these endpoints answer with an empty list rather than an incomplete one. They switch on with a rail that reports disputes.

Returns the facet values that actually occur across your disputes, for building a list view: the currencies, statuses and stages present, and the rails disputes have arrived on.

Authorizations:
api_key

Responses

Response samples

Content type
application/json
{
  • "currency": [
    ],
  • "dispute_status": [
    ],
  • "dispute_stage": [
    ],
  • "merchant_connector_id": [
    ]
}

Disputes - List Disputes [available on rails that report disputes]

Available on rails that report disputes. The rails enabled today raise payment events only, so nothing raises a dispute against a payment taken on them and these endpoints answer with an empty list rather than an incomplete one. They switch on with a rail that reports disputes.

Lists all the Disputes for a merchant

Authorizations:
api_key
query Parameters
dispute_id
string or null

The identifier for dispute

payment_id
string or null

The payment_id against which the dispute was raised

limit
integer or null <int32>

The maximum number of Dispute Objects to include in the response

offset
integer or null <int32>

The starting point within the list of objects

profile_id
string or null

The identifier for the business profile

dispute_status
string or null
Enum: "dispute_opened" "dispute_expired" "dispute_accepted" "dispute_cancelled" "dispute_challenged" "dispute_won" "dispute_lost"

Comma-separated list of dispute statuses to filter by

dispute_stage
string or null
Enum: "pre_dispute" "dispute" "pre_arbitration" "arbitration" "dispute_reversal"

Comma-separated list of dispute stages to filter by

reason
string or null

The reason for the dispute

currency
string or null
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BZD" "CAD" "CDF" "CHF" "CLF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "INR" "IQD" "IRR" "ISK" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRU" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLE" "SLL" "SOS" "SRD" "SSP" "STD" "STN" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VES" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "YER" "ZAR" "ZMW" "ZWL"

Comma-separated list of currencies to filter by

merchant_connector_id
string or null

The rail (merchant connector account) the dispute arrived on. Values come from GET /disputes/filter

start_time
string or null <date-time>

Return disputes received at or after this time

end_time
string or null <date-time>

Return disputes received at or before this time. Defaults to now

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Disputes - Retrieve Dispute [available on rails that report disputes]

Available on rails that report disputes. The rails enabled today raise payment events only, so nothing raises a dispute against a payment taken on them and these endpoints answer with an empty list rather than an incomplete one. They switch on with a rail that reports disputes.

Retrieves a dispute

Authorizations:
api_key
path Parameters
dispute_id
required
string

The identifier for dispute

query Parameters
force_sync
boolean or null

Decider to enable or disable the connector call for dispute retrieve request

Responses

Response samples

Content type
application/json
{
  • "dispute_id": "string",
  • "payment_id": "string",
  • "amount": "string",
  • "currency": "AED",
  • "dispute_stage": "pre_dispute",
  • "dispute_status": "dispute_opened",
  • "challenge_required_by": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "is_already_refunded": true
}

Files - Create [available on rails that report disputes]

Available on rails that report disputes. The rails enabled today raise payment events only, so nothing raises a dispute against a payment taken on them and these endpoints answer with an empty list rather than an incomplete one. They switch on with a rail that reports disputes.

Upload an evidence file against one of your disputes and get back a file_id to reference from POST /disputes/evidence.

This is a multipart/form-data request with three parts: purpose (always dispute_evidence), dispute_id, and file. The content type is detected from the file's own bytes rather than the part's declared type, so a format with no recognisable signature — plain text, for one — is rejected with "File content type not found".

Authorizations:
api_key
Request Body schema: multipart/form-data
required
purpose
required
string

What the file is for. dispute_evidence is the only accepted value.

dispute_id
required
string

The dispute this evidence belongs to. Required, and it must resolve to one of your disputes.

file
required
string <binary>

The file itself. Its type is detected from the content, not from the part's declared type, so a format with no recognisable signature is rejected.

Responses

Response samples

Content type
application/json
{
  • "file_id": "string"
}

Files - Retrieve [available on rails that report disputes]

Available on rails that report disputes. The rails enabled today raise payment events only, so nothing raises a dispute against a payment taken on them and these endpoints answer with an empty list rather than an incomplete one. They switch on with a rail that reports disputes.

Download a file you previously uploaded. The response is the file's own bytes, served with the content type detected at upload.

Authorizations:
api_key
path Parameters
file_id
required
string

The identifier for the file

Responses

Files - Delete [available on rails that report disputes]

Available on rails that report disputes. The rails enabled today raise payment events only, so nothing raises a dispute against a payment taken on them and these endpoints answer with an empty list rather than an incomplete one. They switch on with a rail that reports disputes.

Delete an uploaded file. A file already submitted as evidence stays with the dispute.

Authorizations:
api_key
path Parameters
file_id
required
string

The identifier for the file

Responses

Card payments

The card-specific half of the payment flow: session tokens, 3-D Secure, authorization top-ups and completion.

Card Issuer - List [available on card rails]

Available on card rails. Card acceptance switches on when a card acquirer is enabled for your account — ask your account manager. No rail enabled today takes cards. The card shape does not change when it does: the card is captured in the secure-fields widget assigned to your account and sent as payment_method_data.psp_token. A raw card number is refused in every mode, sandbox included, with ERR_2029, because no card number reaches TensorRail.

Lists card issuers with optional search filter

Authorizations:
api_keyjwt_key
query Parameters
query
string or null

Optional search term to filter issuers by name

limit
integer or null <int32> >= 0

Maximum number of results to return

Responses

Response samples

Content type
application/json
{
  • "issuers": [
    ]
}

Payments - Session token [available on card rails]

Available on card rails. Card acceptance switches on when a card acquirer is enabled for your account — ask your account manager. No rail enabled today takes cards. The card shape does not change when it does: the card is captured in the secure-fields widget assigned to your account and sent as payment_method_data.psp_token. A raw card number is refused in every mode, sandbox included, with ERR_2029, because no card number reaches TensorRail.

Creates a session object or a session token for wallets like Apple Pay, Google Pay, etc. These tokens are used by TensorRail's SDK to initiate these wallets' SDK.

Authorizations:
publishable_key
Request Body schema: application/json
required
payment_id
required
string

The identifier for the payment

client_secret
string or null

This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK

wallets
required
Array of strings (PaymentMethodType)
Items Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" "paysera" "apple_pay" "atome" "bacs" "bancontact_card" "becs" "benefit" "bizum" "blik" "bluecode" "boleto" "bca_bank_transfer" "bni_va" "breadpay" "bri_va" "bhn_card_network" "card_redirect" "cimb_va" "classic" "credit" "crypto_currency" "cashapp" "dana" "danamon_va" "debit" "duit_now" "efecty" "eft" "eps" "flexiti" "fps" "evoucher" "giropay" "givex" "google_pay" "go_pay" "gcash" "ideal" "interac" "indomaret" "klarna" "kakao_pay" "local_bank_redirect" "mandiri_va" "knet" "mb_way" "mobile_pay" "momo" "momo_atm" "multibanco" "online_banking_thailand" "online_banking_czech_republic" "online_banking_finland" "online_banking_fpx" "online_banking_poland" "online_banking_slovakia" "oxxo" "pago_efectivo" "permata_bank_transfer" "open_banking_uk" "pay_bright" "payjustnow" "paypal" "paze" "pix" "pix_automatico_qr" "pix_automatico_push" "pay_safe_card" "przelewy24" "prompt_pay" "pse" "qris" "red_compra" "red_pagos" "samsung_pay" "sepa" "sepa_bank_transfer" "sepa_guarenteed_debit" "skrill" "sofort" "swish" "touch_n_go" "trustly" "twint" "upi_collect" "upi_intent" "upi_qr" "vipps" "viet_qr" "venmo" "walley" "we_chat_pay" "seven_eleven" "lawson" "mini_stop" "family_mart" "seicomart" "pay_easy" "local_bank_transfer" "mifinity" "open_banking_pis" "direct_carrier_billing" "instant_bank_transfer" "instant_bank_transfer_finland" "instant_bank_transfer_poland" "revolut_pay" "indonesian_bank_transfer" "open_banking" "network_token"

The list of the supported wallets

object or null

Merchant connector details used to make payments.

Responses

Request samples

Content type
application/json
{
  • "payment_id": "string",
  • "client_secret": "string",
  • "wallets": [
    ],
  • "merchant_connector_details": {
    }
}

Response samples

Content type
application/json
{
  • "payment_id": "string",
  • "client_secret": "string",
  • "session_token": [
    ]
}

Payments - External 3DS Authentication [available on card rails]

Available on card rails. Card acceptance switches on when a card acquirer is enabled for your account — ask your account manager. No rail enabled today takes cards. The card shape does not change when it does: the card is captured in the secure-fields widget assigned to your account and sent as payment_method_data.psp_token. A raw card number is refused in every mode, sandbox included, with ERR_2029, because no card number reaches TensorRail.

External 3DS Authentication is performed and returns the AuthenticationResponse

Authorizations:
publishable_key
path Parameters
payment_id
required
string

The identifier for payment

Request Body schema: application/json
required
client_secret
string or null

Client Secret

object or null

SDK Information if request is from SDK

device_channel
required
string (DeviceChannel)
Enum: "APP" "BRW"

Device Channel indicating whether request is coming from App or Browser

threeds_method_comp_ind
required
string (ThreeDsCompletionIndicator)
Enum: "Y" "N" "U"

Indicates if 3DS method data was successfully completed or not

Responses

Request samples

Content type
application/json
{
  • "client_secret": "string",
  • "sdk_information": {
    },
  • "device_channel": "APP",
  • "threeds_method_comp_ind": "Y"
}

Response samples

Content type
application/json
{
  • "trans_status": "Y",
  • "acs_url": "string",
  • "challenge_request": "string",
  • "challenge_request_key": "string",
  • "acs_reference_number": "string",
  • "acs_trans_id": "string",
  • "three_dsserver_trans_id": "string",
  • "acs_signed_content": "string",
  • "three_ds_requestor_url": "string",
  • "three_ds_requestor_app_url": "string",
  • "error_message": "string"
}

Payments - Complete Authorize [available on card rails]

Available on card rails. Card acceptance switches on when a card acquirer is enabled for your account — ask your account manager. No rail enabled today takes cards. The card shape does not change when it does: the card is captured in the secure-fields widget assigned to your account and sent as payment_method_data.psp_token. A raw card number is refused in every mode, sandbox included, with ERR_2029, because no card number reaches TensorRail.

Authorizations:
publishable_key
path Parameters
payment_id
required
string

The identifier for payment

Request Body schema: application/json
required
object or null
client_secret
string or null

Client Secret

threeds_method_comp_ind
string or null
Enum: "Y" "N" "U"

Indicates if 3DS method data was successfully completed or not

Responses

Request samples

Content type
application/json
{
  • "shipping": {
    },
  • "client_secret": "string",
  • "threeds_method_comp_ind": "Y"
}

Response samples

Content type
application/json
{
  • "payment_id": "pay_examplexxxxxxxxxxxxxxxxxxx",
  • "status": "requires_confirmation",
  • "amount": 6540,
  • "net_amount": 6540,
  • "shipping_cost": 6540,
  • "amount_capturable": 6540,
  • "amount_received": 6540,
  • "client_secret": "pay_EXAMPLE_PAYMENT_ID_secret_EXAMPLE_CLIENT_SECRET",
  • "created": "2022-09-10T10:11:12Z",
  • "modified_at": "2022-09-10T10:11:12Z",
  • "currency": "AED",
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "customer": {
    },
  • "description": "It's my first payment request",
  • "mandate_id": "mandate_iwer89rnjef349dni3",
  • "setup_future_usage": "off_session",
  • "capture_method": "automatic",
  • "payment_method": "card",
  • "return_url": "https://tensorrail.com",
  • "next_action": {
    },
  • "error_code": "E0001",
  • "error_message": "Failed while verifying the card",
  • "error_reason": "param payAmount invalid, more than 100",
  • "payment_method_type": "ach",
  • "metadata": { },
  • "reference_id": "993672945374576J",
  • "payment_link": {
    },
  • "expires_on": "2022-09-10T10:11:12Z",
  • "payment_method_id": "string",
  • "merchant_order_reference_id": "Custom_Order_id_123",
  • "order_tax_amount": 0
}

Payments - Extended Authorization [available on card rails]

Available on card rails. Card acceptance switches on when a card acquirer is enabled for your account — ask your account manager. No rail enabled today takes cards. The card shape does not change when it does: the card is captured in the secure-fields widget assigned to your account and sent as payment_method_data.psp_token. A raw card number is refused in every mode, sandbox included, with ERR_2029, because no card number reaches TensorRail.

Extended authorization is available for payments currently in the requires_capture status Call this endpoint to increase the authorization validity period

Authorizations:
api_key
path Parameters
payment_id
required
string

The identifier for payment

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Payments - Incremental Authorization [available on card rails]

Available on card rails. Card acceptance switches on when a card acquirer is enabled for your account — ask your account manager. No rail enabled today takes cards. The card shape does not change when it does: the card is captured in the secure-fields widget assigned to your account and sent as payment_method_data.psp_token. A raw card number is refused in every mode, sandbox included, with ERR_2029, because no card number reaches TensorRail.

Authorized amount for a payment can be incremented if it is in status: requires_capture

Authorizations:
api_key
path Parameters
payment_id
required
string

The identifier for payment

Request Body schema: application/json
required
amount
required
integer <int64>

The total amount including previously authorized amount and additional amount

reason
string or null

Reason for incremental authorization

Responses

Request samples

Content type
application/json
{
  • "amount": 6540,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "payment_id": "pay_examplexxxxxxxxxxxxxxxxxxx",
  • "status": "requires_confirmation",
  • "amount": 6540,
  • "net_amount": 6540,
  • "shipping_cost": 6540,
  • "amount_capturable": 6540,
  • "amount_received": 6540,
  • "client_secret": "pay_EXAMPLE_PAYMENT_ID_secret_EXAMPLE_CLIENT_SECRET",
  • "created": "2022-09-10T10:11:12Z",
  • "modified_at": "2022-09-10T10:11:12Z",
  • "currency": "AED",
  • "customer_id": "cus_examplexxxxxxxxxxxxxxxxxxx",
  • "customer": {
    },
  • "description": "It's my first payment request",
  • "mandate_id": "mandate_iwer89rnjef349dni3",
  • "setup_future_usage": "off_session",
  • "capture_method": "automatic",
  • "payment_method": "card",
  • "return_url": "https://tensorrail.com",
  • "next_action": {
    },
  • "error_code": "E0001",
  • "error_message": "Failed while verifying the card",
  • "error_reason": "param payAmount invalid, more than 100",
  • "payment_method_type": "ach",
  • "metadata": { },
  • "reference_id": "993672945374576J",
  • "payment_link": {
    },
  • "expires_on": "2022-09-10T10:11:12Z",
  • "payment_method_id": "string",
  • "merchant_order_reference_id": "Custom_Order_id_123",
  • "order_tax_amount": 0
}

Payments - Post Session Tokens [available on card rails]

Available on card rails. Card acceptance switches on when a card acquirer is enabled for your account — ask your account manager. No rail enabled today takes cards. The card shape does not change when it does: the card is captured in the secure-fields widget assigned to your account and sent as payment_method_data.psp_token. A raw card number is refused in every mode, sandbox included, with ERR_2029, because no card number reaches TensorRail.

Authorizations:
publishable_key
path Parameters
payment_id
required
string

The identifier for payment

Request Body schema: application/json
required
client_secret
string or null

It's a token used for client side verification.

payment_method_type
required
string (PaymentMethodType)
Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" "paysera" "apple_pay" "atome" "bacs" "bancontact_card" "becs" "benefit" "bizum" "blik" "bluecode" "boleto" "bca_bank_transfer" "bni_va" "breadpay" "bri_va" "bhn_card_network" "card_redirect" "cimb_va" "classic" "credit" "crypto_currency" "cashapp" "dana" "danamon_va" "debit" "duit_now" "efecty" "eft" "eps" "flexiti" "fps" "evoucher" "giropay" "givex" "google_pay" "go_pay" "gcash" "ideal" "interac" "indomaret" "klarna" "kakao_pay" "local_bank_redirect" "mandiri_va" "knet" "mb_way" "mobile_pay" "momo" "momo_atm" "multibanco" "online_banking_thailand" "online_banking_czech_republic" "online_banking_finland" "online_banking_fpx" "online_banking_poland" "online_banking_slovakia" "oxxo" "pago_efectivo" "permata_bank_transfer" "open_banking_uk" "pay_bright" "payjustnow" "paypal" "paze" "pix" "pix_automatico_qr" "pix_automatico_push" "pay_safe_card" "przelewy24" "prompt_pay" "pse" "qris" "red_compra" "red_pagos" "samsung_pay" "sepa" "sepa_bank_transfer" "sepa_guarenteed_debit" "skrill" "sofort" "swish" "touch_n_go" "trustly" "twint" "upi_collect" "upi_intent" "upi_qr" "vipps" "viet_qr" "venmo" "walley" "we_chat_pay" "seven_eleven" "lawson" "mini_stop" "family_mart" "seicomart" "pay_easy" "local_bank_transfer" "mifinity" "open_banking_pis" "direct_carrier_billing" "instant_bank_transfer" "instant_bank_transfer_finland" "instant_bank_transfer_poland" "revolut_pay" "indonesian_bank_transfer" "open_banking" "network_token"

Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.

payment_method
required
string (PaymentMethod)
Enum: "card" "card_redirect" "pay_later" "wallet" "bank_redirect" "bank_transfer" "crypto" "bank_debit" "reward" "real_time_payment" "upi" "voucher" "gift_card" "open_banking" "mobile_payment" "network_token"

Indicates the type of payment method. Eg: 'card', 'wallet', etc.

Responses

Request samples

Content type
application/json
{
  • "client_secret": "string",
  • "payment_method_type": "ach",
  • "payment_method": "card"
}

Response samples

Content type
application/json
{
  • "payment_id": "string",
  • "next_action": {
    },
  • "status": "requires_confirmation"
}

3DS Decision - Execute [available on card rails]

Available on card rails. Card acceptance switches on when a card acquirer is enabled for your account — ask your account manager. No rail enabled today takes cards. The card shape does not change when it does: the card is captured in the secure-fields widget assigned to your account and sent as payment_method_data.psp_token. A raw card number is refused in every mode, sandbox included, with ERR_2029, because no card number reaches TensorRail.

Authorizations:
api_key
Request Body schema: application/json
required
routing_id
required
string

The ID of the routing algorithm to be executed.

required
object (PaymentData)

Represents the payment data used in the 3DS decision rule.

object or null

Represents metadata about the payment method used in the 3DS decision rule.

object or null

Represents data about the customer's device used in the 3DS decision rule.

object or null

Represents data about the issuer used in the 3DS decision rule.

object or null

Represents data about the acquirer used in the 3DS decision rule.

Responses

Request samples

Content type
application/json
{
  • "routing_id": "string",
  • "payment": {
    },
  • "payment_method": {
    },
  • "customer_device": {
    },
  • "issuer": {
    },
  • "acquirer": {
    }
}

Response samples

Content type
application/json
{
  • "decision": "no_three_ds"
}