POST/autopay/settlement

Settle / Confirm Payment

This endpoint is the official closure of a successful transaction. AutoPay will invoke this service only when a charge has been APPROVED by the financial network.

Your goal here is to receive the confirmation and register the payment in your ERP, database, or accounting system.

Recommended Business Rules

  1. Idempotency: Due to network intermittency, you may receive this confirmation more than once for the same transaction. Your system must validate if the payment was already settled and respond with 200 OK without duplicating the record.
  2. Amount Validation: Verify that transaction.amount.total matches what you expected to charge.
  3. Fast Response: This process is synchronous. Respond as quickly as possible (< 3s) to complete the cycle.

Request

  • Name
    reference
    Type
    string
    is Required
    REQUIRED
    Description

    AutoPay reference provided by the client/merchant. This reference must be unique and active per merchant.

    Example:ACC00012345
    Max length:32
    Min length:32
  • Name
    id
    Type
    string
    is Required
    REQUIRED
    Description

    Unique identifier of the confirmed AutoPay registered in the notification record.

    Example:2972c13d-6315-4da3-80d7-64c24eb232ad
    Format:uuid
    Max length:36
    Min length:36
  • Name
    transaction
    Type
    object
    is Required
    REQUIRED
    Description

    Transaction data

Solicitud

POST
/autopay/settlement
curl -X POST {{baseURl}}/autopay/settlement \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic <base64(username:password)>" \
  -d '{
    "reference": "ACC00012345",
    "id": "2972c13d-6315-4da3-80d7-64c24eb232ad",
    "transaction": {
      "status": {
        "status": "APPROVED",
        "reason": "00",
        "message": "Approved",
        "date": "2021-09-24T11:51:31-05:00"
      },
      "date": "2021-09-24T11:51:31-05:00",
      "transactionDate": "2021-09-24T11:51:31-05:00",
      "internalReference": 41,
      "reference": "ON1434012-PN1433129",
      "paymentMethod": "CR_VS",
      "franchise": "visa",
      "franchiseName": "Visa",
      "issuerName": "BANCO DE GUAYAQUIL, S.A.",
      "amount": {
        "taxes": [
          {
             "kind": "airportTax",
             "amount": 63,
             "base": 0
          },
          {
             "kind": "valueAddedTax",
             "amount": 158.47,
             "base": 0
          }
        ],
        "currency": "USD",
        "total": 1161.12
      },
      "conversion": {
        "from": {
            "currency": "USD",
            "total": 1161.12
        },
        "to": {
            "currency": "USD",
             "total": 1161
        },
        "factor": 1
      },
      "authorization": "739877",
      "receipt": "713329175945",
      "type": "AUTH_ONLY",
      "refunded": false,
      "lastDigits": "0032",
      "provider": "CREDIBANCO",
      "discount": null,
      "processorFields": {
          "id": "08c0284b20510c8db8dcb29137374718",
          "b24": "XX"
      },
      "additional": {
         "merchantCode": "123456",
         "terminalNumber": "12345678",
         "bin": "411076",
         "expiration": "1220"
      }
    }
  }'

Response

AutoPay successfully registered.

  • Name
    status
    Type
    Status
    is Required
    REQUIRED
    Description

    Structure used to define response statuses.

  • Name
    id
    Type
    string
    is Required
    REQUIRED
    Description

    Unique identifier of the confirmed AutoPay registered in the notification record.

    Example:2972c13d-6315-4da3-80d7-64c24eb232ad
    Format:uuid
    Max length:36
    Min length:36

Response

POST
/autopay/settlement
{
  "status": {
    "status": "OK",
    "reason": "00",
    "message": "Successful response",
    "date": "2025-09-29T17:09:29-05:00"
  },
  "id": "2972c13d-6315-4da3-80d7-64c24eb232ad"
}