Skip to main content

TensorRail API (v1)

Download OpenAPI specification:Download

The TensorRail API for accepting and managing payments.

Base URL. https://api.tensorrail.com, one base URL for test and live.

Before you start. You need a test key from your dashboard. Every account has test keys, so you can build and test your integration before you go live. Test or live is chosen by the key, not the URL: a test key never moves money and a live key does, and endpoints, requests and responses are the same in both.

Authentication. Send your secret key in the api-key header on every request from your server. The /v1 resources take the same key as Authorization: Bearer <key>. Never put a secret key in a browser or a mobile app.

curl https://api.tensorrail.com/payments/list \
  -H "api-key: YOUR_TEST_KEY"

Errors. Every error has the same shape: one error object with a type, a 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" } }

Idempotency. Send an Idempotency-Key header on POST /payments and POST /refunds, and retry with the same key. A repeated key returns the original resource, even when the body differs, so use one key per operation.

Payment methods. One API covers every payment method category: UPI, bank transfer, mobile money, crypto, cards, wallets and pay later. Methods are enabled per account: GET /account/payment_methods returns the ones enabled on yours, and your dashboard shows the same. GET /v1/capabilities lists what the platform supports, the same answer for every caller. To add a method or a market, ask us. An endpoint that depends on a feature of the payment method, such as refunds or cards, opens its description with that condition.

Guides. Quickstart, Authentication, Errors and retries, Error catalog, Testing and sandbox and Handle webhooks.

Payments

Create, confirm, read and cancel a payment.

Create a payment

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" … 152 more

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).

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.
(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 (Upi (object or null)) or (Voucher (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" … 8 more

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" … 109 more

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

allowed_payment_method_types
Array of strings or null (PaymentMethodType)
Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" … 109 more

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.

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

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

Reserved. Has no effect on merchant responses.

(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 shown on the customer's statement

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
{
}

Response samples

Content type
application/json
Example
{
}

List payments

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
{
}

Update a payment

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" … 152 more

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).

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.
(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 (Upi (object or null)) or (Voucher (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" … 8 more

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" … 109 more

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

allowed_payment_method_types
Array of strings or null (PaymentMethodType)
Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" … 109 more

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.

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

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

Reserved. Has no effect on merchant responses.

(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 shown on the customer's statement

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
{
}

Response samples

Content type
application/json
{
}

Retrieve a payment

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 in the browser to act on this one payment

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
{
}

Cancel a payment

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

all_keys_required
boolean or null

Reserved. Has no effect on merchant responses.

Responses

Request samples

Content type
application/json
Example
{
}

Response samples

Content type
application/json
{
}

Confirm a payment

Confirms a payment intent that was previously created with confirm: false. This authorizes the payment.

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" … 152 more

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).

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.
(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 (Upi (object or null)) or (Voucher (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" … 8 more

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.

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" … 109 more

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

allowed_payment_method_types
Array of strings or null (PaymentMethodType)
Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" … 109 more

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.

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

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

Reserved. Has no effect on merchant responses.

(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 shown on the customer's statement

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
{
}

Response samples

Content type
application/json
{
}

Retrieve a poll status

Authorizations:
publishable_key
path Parameters
poll_id
required
string

The identifier for poll

Responses

Response samples

Content type
application/json
{
}

Card payments

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

List card issuers

Available on card rails. Cards are enabled per account; ask us. Card details are entered in card fields hosted by the card processor, and the token those fields return is sent as payment_method_data.psp_token. Raw card data sent to payment create or confirm is refused in every mode, sandbox included, with ERR_2029.

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
{
}

Create session tokens

Available on card rails. Cards are enabled per account; ask us. Card details are entered in card fields hosted by the card processor, and the token those fields return is sent as payment_method_data.psp_token. Raw card data sent to payment create or confirm is refused in every mode, sandbox included, with ERR_2029.

Creates the session tokens a wallet payment needs before it is confirmed.

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 in the browser to act on this one payment

wallets
required
Array of strings (PaymentMethodType)
Items Enum: "ach" "affirm" "afterpay_clearpay" "alfamart" "ali_pay" "ali_pay_hk" "alma" "amazon_pay" … 109 more

The list of the supported wallets

Responses

Request samples

Content type
application/json
{
}

Response samples

Content type
application/json
{
}

Start 3-D Secure authentication

Available on card rails. Cards are enabled per account; ask us. Card details are entered in card fields hosted by the card processor, and the token those fields return is sent as payment_method_data.psp_token. Raw card data sent to payment create or confirm is refused in every mode, sandbox included, with ERR_2029.

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
{
}

Response samples

Content type
application/json
{
}

Complete an authorization

Available on card rails. Cards are enabled per account; ask us. Card details are entered in card fields hosted by the card processor, and the token those fields return is sent as payment_method_data.psp_token. Raw card data sent to payment create or confirm is refused in every mode, sandbox included, with ERR_2029.

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
{
}

Response samples

Content type
application/json
{
}

Extend an authorization

Available on card rails. Cards are enabled per account; ask us. Card details are entered in card fields hosted by the card processor, and the token those fields return is sent as payment_method_data.psp_token. Raw card data sent to payment create or confirm is refused in every mode, sandbox included, with ERR_2029.

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
{
}

Increase an authorized amount

Available on card rails. Cards are enabled per account; ask us. Card details are entered in card fields hosted by the card processor, and the token those fields return is sent as payment_method_data.psp_token. Raw card data sent to payment create or confirm is refused in every mode, sandbox included, with ERR_2029.

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
{
}

Response samples

Content type
application/json
{
}

Create post-session tokens

Available on card rails. Cards are enabled per account; ask us. Card details are entered in card fields hosted by the card processor, and the token those fields return is sent as payment_method_data.psp_token. Raw card data sent to payment create or confirm is refused in every mode, sandbox included, with ERR_2029.

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" … 109 more

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" … 8 more

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

Responses

Request samples

Content type
application/json
{
}

Response samples

Content type
application/json
{
}

Run a 3-D Secure decision

Available on card rails. Cards are enabled per account; ask us. Card details are entered in card fields hosted by the card processor, and the token those fields return is sent as payment_method_data.psp_token. Raw card data sent to payment create or confirm is refused in every mode, sandbox included, with ERR_2029.

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
{
}

Response samples

Content type
application/json
{
}

Customers

Create and manage the customers you attach payments to.

Create a customer

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
{
}

Response samples

Content type
application/json
{
}

List customers

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
[
]

Retrieve a customer

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
{
}

Update a customer

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
{
}

Response samples

Content type
application/json
{
}

Delete a customer

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
{
}

Payment methods

Instruments stored against a customer and charged again later.

List saved payment methods for a payment

Available on rails that support recurring. That is a rail that can store an instrument and charge it again. On a rail without mandate support 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 a later off-session charge is refused with ERR_4088. Treat a mandate_id on the first payment as the signal that the instrument can be charged again, not the status of that payment. Ask us to enable recurring for your account.

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 in the browser to act on this one payment

accepted_countries
Array of strings or null (CountryAlpha2)
Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" … 241 more

The two-letter ISO currency code

accepted_currencies
Array of strings or null (Currency)
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" … 152 more

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" … 7 more

Indicates whether the payment method is eligible for card netwotks

Responses

Response samples

Content type
application/json
{
}

List a customer's payment methods

Available on rails that support recurring. That is a rail that can store an instrument and charge it again. On a rail without mandate support 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 a later off-session charge is refused with ERR_4088. Treat a mandate_id on the first payment as the signal that the instrument can be charged again, not the status of that payment. Ask us to enable recurring for your account.

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 in the browser to act on this one payment

accepted_countries
Array of strings or null (CountryAlpha2)
Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" … 241 more

The two-letter ISO currency code

accepted_currencies
Array of strings or null (Currency)
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" … 152 more

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" … 7 more

Indicates whether the payment method is eligible for card netwotks

Responses

Response samples

Content type
application/json
{
}

Set a customer's default payment method

Available on rails that support recurring. That is a rail that can store an instrument and charge it again. On a rail without mandate support 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 a later off-session charge is refused with ERR_4088. Treat a mandate_id on the first payment as the signal that the instrument can be charged again, not the status of that payment. Ask us to enable recurring for your account.

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
{
}

Retrieve a payment method

Available on rails that support recurring. That is a rail that can store an instrument and charge it again. On a rail without mandate support 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 a later off-session charge is refused with ERR_4088. Treat a mandate_id on the first payment as the signal that the instrument can be charged again, not the status of that payment. Ask us to enable recurring for your account.

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
{
}

Delete a payment method

Available on rails that support recurring. That is a rail that can store an instrument and charge it again. On a rail without mandate support 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 a later off-session charge is refused with ERR_4088. Treat a mandate_id on the first payment as the signal that the instrument can be charged again, not the status of that payment. Ask us to enable recurring for your account.

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
{
}

Mandates

The customer's standing authorization behind a stored instrument.

List a customer's mandates

Available on rails that support recurring. That is a rail that can store an instrument and charge it again. On a rail without mandate support 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 a later off-session charge is refused with ERR_4088. Treat a mandate_id on the first payment as the signal that the instrument can be charged again, not the status of that payment. Ask us to enable recurring for your account.

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
[
]

List mandates

Available on rails that support recurring. That is a rail that can store an instrument and charge it again. On a rail without mandate support 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 a later off-session charge is refused with ERR_4088. Treat a mandate_id on the first payment as the signal that the instrument can be charged again, not the status of that payment. Ask us to enable recurring for your account.

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
[
]

Revoke a mandate

Available on rails that support recurring. That is a rail that can store an instrument and charge it again. On a rail without mandate support 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 a later off-session charge is refused with ERR_4088. Treat a mandate_id on the first payment as the signal that the instrument can be charged again, not the status of that payment. Ask us to enable recurring for your account.

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
{
}

Retrieve a mandate

Available on rails that support recurring. That is a rail that can store an instrument and charge it again. On a rail without mandate support 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 a later off-session charge is refused with ERR_4088. Treat a mandate_id on the first payment as the signal that the instrument can be charged again, not the status of that payment. Ask us to enable recurring for your account.

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
{
}

Manual capture

Authorize now and capture, extend or reverse later.

Cancel a captured payment

Available on rails with manual capture. That is a rail that authorizes now and captures later. A payment captured as it is authorized (automatic, sequential_automatic) leaves no open authorization to capture, extend or reverse, so build against automatic capture unless manual capture 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
{
}

Response samples

Content type
application/json
{
}

Capture a payment

Available on rails with manual capture. That is a rail that authorizes now and captures later. A payment captured as it is authorized (automatic, sequential_automatic) leaves no open authorization to capture, extend or reverse, so build against automatic capture unless manual capture 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
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

Whether to release the uncaptured remainder of the authorization. Behaviour depends on the payment method.

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).

all_keys_required
boolean or null

Reserved. Has no effect on merchant responses.

Responses

Request samples

Content type
application/json
Example
{
}

Response samples

Content type
application/json
{
}

Metadata updates

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

Update a payment's metadata

Available on rails that accept metadata updates. That is a rail that can carry a metadata change to a payment after it has been sent. Where the rail does not, 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 can still be modified, is stored and returned with the payment on every rail.

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
{
}

Response samples

Content type
application/json
{
}

Refunds

Return a captured payment in whole or in part.

List refunds

Available on rails that support refunds. A live refund needs a payment method that supports refunds. Your dashboard shows what is enabled for your account; ask us to enable more.

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

Identifier assigned by TensorRail. Routing is managed for your account; you do not choose or interpret this value.

merchant_connector_id
Array of strings or null

Rail identifiers to filter refunds by.

currency
Array of strings or null (Currency)
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" … 152 more

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
{
}

Response samples

Content type
application/json
{
}

Retrieve a refund

Available on rails that support refunds. A live refund needs a payment method that supports refunds. Your dashboard shows what is enabled for your account; ask us to enable more.

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
{
}

Update a refund

Available on rails that support refunds. A live refund needs a payment method that supports refunds. Your dashboard shows what is enabled for your account; ask us to enable more.

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
{
}

Response samples

Content type
application/json
{
}

Disputes

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

Accept a dispute

Available on rails that report disputes. Disputes raised against your payments appear in these endpoints with their evidence deadline; with none raised, lists are empty.

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
{
}

Get dispute totals

Available on rails that report disputes. Disputes raised against your payments appear in these endpoints with their evidence deadline; with none raised, lists are empty.

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
{
}

Submit dispute evidence

Available on rails that report disputes. Disputes raised against your payments appear in these endpoints with their evidence deadline; with none raised, lists are empty.

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
{
}

Response samples

Content type
application/json
{
}

Attach evidence to a dispute

Available on rails that report disputes. Disputes raised against your payments appear in these endpoints with their evidence deadline; with none raised, lists are empty.

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" … 2 more
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
{
}

Delete evidence from a dispute

Available on rails that report disputes. Disputes raised against your payments appear in these endpoints with their evidence deadline; with none raised, lists are empty.

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" … 2 more

Responses

Request samples

Content type
application/json
{
}

Retrieve dispute evidence

Available on rails that report disputes. Disputes raised against your payments appear in these endpoints with their evidence deadline; with none raised, lists are empty.

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
[
]

List dispute filters

Available on rails that report disputes. Disputes raised against your payments appear in these endpoints with their evidence deadline; with none raised, lists are empty.

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
{
}

List disputes

Available on rails that report disputes. Disputes raised against your payments appear in these endpoints with their evidence deadline; with none raised, lists are empty.

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" … 152 more

Comma-separated list of currencies to filter by

merchant_connector_id
string or null

The rail 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
[
]

Retrieve a dispute

Available on rails that report disputes. Disputes raised against your payments appear in these endpoints with their evidence deadline; with none raised, lists are empty.

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
{
}

Upload a file

Available on rails that report disputes. Disputes raised against your payments appear in these endpoints with their evidence deadline; with none raised, lists are empty.

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, such as plain text, 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
{
}

Retrieve a file

Available on rails that report disputes. Disputes raised against your payments appear in these endpoints with their evidence deadline; with none raised, lists are empty.

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

Delete a file

Available on rails that report disputes. Disputes raised against your payments appear in these endpoints with their evidence deadline; with none raised, lists are empty.

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

Account

What your own account can present at checkout.

List your account's payment methods

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 in the browser to act on this one payment

accepted_countries
Array of strings or null (CountryAlpha2)
Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" … 241 more

The two-letter ISO currency code

accepted_currencies
Array of strings or null (Currency)
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" … 152 more

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" … 7 more

Indicates whether the payment method is eligible for card netwotks

Responses

Response samples

Content type
application/json
{
}

API keys

The keys on your account and the scopes a key can carry.

List API keys

The keys on your account. A key's secret is never returned after it is created. Creating, rotating and revoking keys are done in the dashboard. Fields, filters and errors: API key management.

Authorizations:
secret_key

Responses

List scopes

Every scope a key can carry. No key needed. Fields, filters and errors: API key management.

Responses

Webhooks

Your webhook endpoint and the deliveries made to it.

List webhook delivery history

Delivery history for your account, paginated. Scope webhooks:read. Fields, filters and errors: Reporting API.

Authorizations:
secret_key

Responses

Retrieve your webhook endpoint

The URL your webhooks are sent to. Changing it is done in the dashboard. Scope webhooks:read. Fields, filters and errors: Webhook endpoint and deliveries.

Authorizations:
secret_key

Responses

List webhook deliveries

The events sent to your endpoint and whether each was delivered. Scope webhooks:read. Fields, filters and errors: Webhook endpoint and deliveries.

Authorizations:
secret_key

Responses

List a delivery's attempts

Every attempt made to deliver one event. Scope webhooks:read. Fields, filters and errors: Webhook endpoint and deliveries.

Authorizations:
secret_key
path Parameters
event_id
required
string

The event's id, from the deliveries list.

Responses

Retry a webhook delivery

Sends one event to your endpoint again. Scope webhooks:write. Fields, filters and errors: Webhook endpoint and deliveries.

Authorizations:
secret_key
path Parameters
event_id
required
string

The event's id, from the deliveries list.

Responses

Capabilities

What the platform supports: payment methods, markets and currencies.

List platform capabilities

The payment methods, markets and currencies the platform supports; the same answer for every caller. What your own account can use is GET /account/payment_methods. No key needed. Fields, filters and errors: Corridors and coverage.

Responses

List currencies

The currencies the API validates, the same for every caller. No key needed. Fields, filters and errors: Reporting API.

Responses

Ledger refunds

Refunds recorded against your balance first, with their ledger status. The same refunds as the Refunds section, seen from your balance.

List ledger refunds

Your refunds with their ledger status, paginated. Scope refunds:read. Fields, filters and errors: Refunds via the Reporting API.

Authorizations:
secret_key

Responses

Create a ledger refund

Refunds a payment and records it against your balance. Send an Idempotency-Key header. Scope refunds:write. Fields, filters and errors: Refunds via the Reporting API.

Authorizations:
secret_key

Responses

Retrieve a ledger refund

One refund by its ledger id. Scope refunds:read. Fields, filters and errors: Refunds via the Reporting API.

Authorizations:
secret_key
path Parameters
id
required
integer

The ledger refund id, as POST /v1/refunds returned it.

Responses

Balances and transactions

What you hold, per currency, and the transactions behind it.

Retrieve your balances

The pending, available and settled amounts for each currency you collect in. Scope settlements:read. Fields, filters and errors: Balances.

Authorizations:
secret_key

Responses

List transactions

The transactions recorded on your account, paginated. Scope payments:read. Fields, filters and errors: Reporting API.

Authorizations:
secret_key

Responses

Reports and exports

Reports, the audit log and CSV exports of your transactions.

List audit log entries

Who did what on your account, newest first. Scope payments:read. Fields, filters and errors: Reporting API.

Authorizations:
secret_key

Responses

Export transactions as CSV

Your transactions as a CSV file, in one response. Scope payments:read. Fields, filters and errors: CSV exports.

Authorizations:
secret_key

Responses

Retrieve an export job

An export job and its status. Scope payments:read. Fields, filters and errors: CSV exports.

Authorizations:
secret_key
path Parameters
id
required
string

The export job's id, as POST /v1/exports returned it.

Responses

Download an export

The file of a finished export job. Scope payments:read. Fields, filters and errors: CSV exports.

Authorizations:
secret_key
path Parameters
id
required
string

The export job's id, as POST /v1/exports returned it.

Responses

Run an analytics report

Daily volume and success rate over a date range. Scope analytics:read. Fields, filters and errors: Reporting API.

Authorizations:
secret_key

Responses

Start an export job

Starts an export that runs in the background; poll it, then download the file. Scope payments:read. Fields, filters and errors: CSV exports.

Authorizations:
secret_key

Responses