1. Direct debit
API
English
  • Español
  • English
  • Introduction
    • Kambia API
    • Credentials
    • Authentication
    • Verification
      POST
  • Services
    • Code catalog
    • Payout
      • Notifications
      • Create payout
      • Get payout
    • Direct debit
      • Affiliation
        POST
      • Charge
        POST
  1. Direct debit

Charge

Developing
POST
/{{api_version}}/autodebit/{{merchant_id}}/charge
Description
Creates charge orders for enrolled customers.
Authentication
See the section here
Duplicates and confirmation
If the same document repeats within the request, already has a pending charge from another request sent today, or already has an active charge order at the bank (within its retry window), the record isn't saved: it shows up in duplicates (207 response). To force it, resend it with confirm: true and an idempotency_key:
If it already had a pending charge from today, also send resolution: sum if it's another debt (added to the pending amount) or replace if it corrects an earlier request (replaces the pending amount). With replace, also send expected_previous_amount with the previous_amount we returned. Without resolution, the record goes back to duplicates.
If it only had an active order at the bank, confirm: true is enough: nothing is added.
Resending the same confirmation with the same idempotency_key is safe: the amount isn't added twice.
A pending charge from a previous day doesn't count as a duplicate: today's request replaces it.
Notices that don't stop the charge
not_ready_to_send: saved charges that wouldn't go into today's bank file because of the enrollment status, with the reason.
recently_charged: people the bank already charged in the last 7 days, with that charge's date and amount. The new charge still goes out; check whether it's the same one.

Request

Body Params application/jsonRequired

Examples

Responses

🟢202Accepted
application/json
Bodyapplication/json

🟢207Possible duplicate or error
Response Response Example
202 - Accepted
{
    "status_code": 202,
    "message": "Charge record(s) processed successfully",
    "data": {
        "processed": 2,
        "total": 2,
        "duplicates": [],
        "not_ready_to_send": [],
        "recently_charged": [],
        "warnings": []
    }
}
Modified at 2026-10-02 17:56:45
Previous
Affiliation
Built with