Test Auto-Debit
This endpoint will take a session id and check for it's related payment if it's possible to be auto charged or not.
if possible it will charge the payment and return the operation response.
📝 NOTE Optional fields may not be represented in response body.
Authentication Notes
The Api-Key is already automatically added to the headers, so no authentication type required.
If you want to choose your preferred authentication type, follow these steps:
- Deselect the
Api-Keyheader and choose one of the following:- For
ApiKeyAuth, use:Api-Key vSUmxsXx.V81oYvOWFMcIywaOu57Utx6VSCmG11lo. - For
BasicAuth, provide your valid username and password. - For
JWT Auth, include your token in the format:Bearer <your_token>.
- For
HTTP API Key Authentication
API-Key authentication for private use only.
Example API-Key
vSUmxsXx.V81oYvOWFMcIywaOu57Utx6VSCmG11lo
Example Header:
Authorization: Api-Key vSUmxsXx.V81oYvOWFMcIywaOu57Utx6VSCmG11lo
Private API key to be provided in the format Api-Key <key>.
Api-Key vSUmxsXx.V81oYvOWFMcIywaOu57Utx6VSCmG11loAuto debit serializer should take session_id and consumer payment token then validate if session id is valid if session id is valid then validate if payment gateway supports auto debit if payment gateway supports auto debit then validate if payment gateway has implemented auto debit if payment gateway has implemented auto debit then charge the token and return charge response from client auto_debit method which should be implemented in client
A unique identifier for each payment transaction, used to maintain the session state during the payment process.
The pg_params field contains the details received
from the payment gateway callback these details are
provided to us by the gateway after a user has completed
a payment transaction additionally, pg_params
can include information obtained from an inquiry
request made to the payment gateway status check API.
Denotes the total sum of the payment transaction, which encompasses the cost of the procured items or services, excluding any supplementary fees or charges.
By enabling this, you will ask for user's address. If enabled, capture delivery coordinates should also be active.
By enabling this, you will ask for user's delivery location on a map.
The specified currency represents the denomination of the transaction.Nevertheless, it doesn't necessarily mandate payment in this exact currency.Due to potential currency conversions or exchanges, the final charge may be in a different currency.
The city of the customer's billing address. This field may be used to send the billing address to the payment gateway.
The country of the customer's billing address, formatted as a two-letter ISO country code (e.g., 'US' for United States, 'CA' for Canada). This field may be used to send the billing address to the payment gateway.
The first line of the customer's billing street address. This field may be used to send the billing address to the payment gateway.
The second line of the customer's billing street address, if available. This field may be used to provide additional address information, such as an apartment or suite number.
The postal code of the customer's billing address. This field may be used to send the billing address to the payment gateway.
The state or region of the customer's billing address. This field may be used to send the billing address to the payment gateway.
The email address of the customer that is used to send payment notifications and receipts, and can be used for fraud prevention. This field is mandatory and is always sent to the payment gateway. It may also be included in the invoice, receipt, email, and displayed on the payment page.
The first name of the recipient of the payment. This field is used for various communications such as the invoice, receipt, email, SMS, or displayed on the payment page. It may also be sent to the payment gateway if necessary.
The customer ID is a unique identifier for the customer within the merchant's system. It is also used as a merchant identifier for the customer and plays a critical role in tokenization. All the customer's cards will be associated with this ID.
The last name of the recipient of the payment. This field is used for various communications such as the invoice, receipt, email, SMS, or displayed on the payment page. It may also be sent to the payment gateway if necessary.
Customer phone number associated with the payment. This might be sent to the payment gateway and depending on the gateway, it may trigger a click to pay process on the payment page. The phone number will also be included in the invoice, receipt, email, and displayed on the payment page.
The extra information for the payment details, which the merchant has sent it in key value form.
The fee denotes the sum the customer pays in their chosen payment currency. This may vary from the transaction's designated currency. The fee is computed once to maintain precision and uniformity throughout the payment procedure.
This code corresponds to the payment gateway and plays an essential role in facilitating payment transactions.
The name of the payment gateway service being utilized.
Indicates whether the operation was performed in a test environment or not.
This represents the message, either transmitted by the Payment Gateway (PG) or established by Ottu, that provides a detailed illustration of the payment's current status.
The unique identifier assigned to this payment transaction. It is used for tracking purposes and is set by the merchant or the system.
The paid amount encompasses fees or captured amounts from authorized transactions. This total is derived from the specified 'amount' field, converting foreign currencies to the default as necessary. This might result in minor variations due to fluctuations in exchange rates.
Type of payment. Choose one_off for payments that occur only once without future commitments. Choose auto_debit for payments that are automatically deducted, such as recurring subscriptions, installments, or unscheduled auto-debits.
Choose save_card if you want to perform a card tokenization operation.
NOTE: If auto_debit is selected:
agreementandcustomer_idparameters will also be mandatory.- Only PG codes supporting tokenization can be selected.
As a side effect, the card used for the payment will be associated with the supplied
agreement.id. This card will be locked, preventing the customer from deleting it from the system until an alternate card is chosen for auto-debit payments.
NOTE: If save_card is selected:
- The amount must be zero for the save card operation.
- The selected MID(pg_code) must support tokenization to enable the save card operation.
- Please note that the save card operation is considered successful without any funds being charged.
- Once a card is created, Ottu will send a webhook containing the card details to the merchant's webhook URL.
one_off- One Offauto_debit- Auto Debitsave_card- Save Card
An auto-generated internal identifier for this payment transaction. While this field may be used for tracking and reporting purposes, it is recommended to use the session_id field instead, as it provides the same functionality and more.
The total refunded amount for the payment transaction.
The residual amount due. Together with the editable amount, it indicates the outstanding balance of a transaction awaiting settlement.
Indicates the outcome of the operation. success denotes a successful operation.
A unique identifier for each payment transaction, used to maintain the session state during the payment process.
The amount that has been paid or authorized in its original currency, excluding any fees.
Signature Field: A cryptographic hash used to guarantee data integrity and authenticity during client-server exchanges. This hash ensures that the API payload has not been tampered with, and can only be verified by authorized parties.
The current state of the payment transaction, it helps to understand the progress of the payment.
Identifies the transaction log associated with the payment transaction. A transaction log is created for each record that is dispatched during a bulk dispatch process.
This field represents the timestamp at which ottu processed the transaction.While this often corresponds to the payment time,it's important to note that it might not always be the case.Payments can be acknowledged at a later time,so this timestamp might not align precisely with the actual payment time.
The total voided amount for the payment transaction.
Last updated