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-Key
header 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
Private API key to be provided in the format Api-Key <key>
.
Api-Key vSUmxsXx.V81oYvOWFMcIywaOu57Utx6VSCmG11lo
Auto 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.
POST /b/pbl/v2/auto-debit/ HTTP/1.1
Host: betabulk.ottu.net
Authorization: Api-Key vSUmxsXx.V81oYvOWFMcIywaOu57Utx6VSCmG11lo
Content-Type: application/json
Accept: */*
Content-Length: 84
{
"session_id": "5e4788a84a9ce8a6bc1a83dcac11a1ff2822be82",
"token": "9261815648110746"
}
{
"pg_params": "text",
"agreement": {
"id": "text",
"amount_variability": "fixed",
"start_date": "2025-06-27",
"expiry_date": "2025-06-27",
"max_amount_per_cycle": "text",
"cycle_interval_days": 1,
"total_cycles": 1,
"frequency": "irregular",
"type": "recurring",
"seller": {
"name": "text",
"short_name": "text",
"category_code": "text"
},
"extra_params": {
"payment_processing_day": 1
}
},
"amount": "text",
"amount_details": {
"currency_code": "text",
"amount": "text",
"total": "text",
"fee": "text",
"exchange_rate": "text"
},
"capture_delivery_address": true,
"capture_delivery_location": true,
"card_acceptance_criteria": {
"min_expiry_time": 1
},
"currency_code": "text",
"customer_address_city": "text",
"customer_address_country": "text",
"customer_address_line1": "text",
"customer_address_line2": "text",
"customer_address_postal_code": "text",
"customer_address_state": "text",
"customer_email": "text",
"customer_first_name": "text",
"customer_id": "text",
"customer_last_name": "text",
"customer_phone": "text",
"extra": null,
"fee": "text",
"gateway_account": "text",
"gateway_name": "text",
"gateway_response": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"initiator": {
"id": 1,
"first_name": "text",
"last_name": "text",
"username": "text",
"email": "name@gmail.com",
"phone": "text"
},
"is_sandbox": true,
"message": "text",
"order_no": "text",
"paid_amount": 1,
"payment_type": "one_off",
"reference_number": "text",
"refunded_amount": 1,
"remaining_amount": 1,
"result": "pending",
"session_id": "text",
"settled_amount": 1,
"signature": "text",
"state": "text",
"token": {
"brand": "text",
"customer_id": "text",
"cvv_required": true,
"expiry_month": "text",
"expiry_year": "text",
"is_expired": true,
"is_preferred": true,
"name_on_card": "text",
"number": "text",
"pg_code": "text",
"pg": "knet",
"token": "text",
"agreements": null
},
"transaction_log_id": 1,
"timestamp_utc": "2025-06-27T11:17:55.297Z",
"transactions": [
{
"amount": "text",
"currency_code": "text",
"order_no": "text",
"session_id": "text",
"state": "paid"
}
],
"voided_amount": 1
}
Last updated