Skip to content

Transaction status query request

Request

To get information about a transaction status or transaction details, Merchant must know the payment token and send an HTTP GET request to https://checkout.overpay.io/ctp/api/checkouts/:payment_token, where payment_token should be replaced with the payment token that you have generated earlier.

Response

In the transaction section response parameters replicate token request parameters except for the additional ones:

Parameter Type Description
checkout object
token * required
string A payment token.
shop_id * required
integer Shop ID that a transaction was done for.
gateway_response * required
object A section that contains payment or authorization sections of payment or authorization transaction responses. Additionally, the parameter uid is added to the section. uid is the Overpay gateway assigned ID to the transaction. You will use uid either to search transactions in the Overpay backoffice or to send a transaction status query.
finished * required
boolean true or false. It's the token status parameter. It is true if the transaction was processed by an external payment system.
expired * required
boolean true or false. It's the token status parameter. It is true if a payment period allowed to pay has been expired.
test * required
boolean true or false. It is true if the transaction is a test one.
status * required
string If it is not error, it matches gateway response statuses.
message * required
string If status is error, it has error descriptions. Refers to gateway error response message. Otherwise, it equals to message in gateway_response.
order object
initial_amount integer The initial amount of the transaction without surcharge rates. The parameter is sent in the response if surcharge billing is enabled for the shop.
surcharge_amount integer The amount of surcharge rates applied to the transaction. The overall charged amount equals the sum of initial_amount and surcharge_amount values. The parameter is sent in the response if surcharge billing is enabled for the shop.
Response example
{
  "checkout":
  {
    "token": "3241e439f8c87d941d92621a4bdc030d4c9a69c67f3b0cfe12de4a13cc34aa51",
    "shop_id": 1,
    "transaction_type": "payment",
    "gateway_response": {
      "payment": {
        "uid": "1891-5fcb2bda3b",
        "auth_code":"654321",
        "bank_code":"05",
        "rrn":"999",
        "ref_id":"777888",
        "message":"Payment was approved",
        "gateway_id":317,
        "billing_descriptor":"TEST GATEWAY BILLING DESCRIPTOR",
        "status":"successful",
        "avs_cvc_verification": {
            "cvc_verification" : {
              "result_code": "M"
            },
            "avs_verification" : {
              "result_code": "M"
            }
        }
      }
    },
    "order": {
      "currency": "GBP",
      "amount": 4299,
      "description": "New description",
      "addtional_data" : {},
      "expired_at":null
    },
    "settings": {
      "success_url": "http://127.0.0.1:3003/success",
      "fail_url": "http://127.0.0.1:3003/fail",
      "decline_url": "http://127.0.0.1:3003/declined",
      "language": "en"
    },
    "customer": {
      "address": "Baker street 221b",
      "country": "GB",
      "city": "London",
      "email": "jake@example.com"
    },
    "finished": true,
    "expired": false,
    "test": true,
    "status": "successful",
    "message": "Successfully processed"
  }
}
Response example if surcharge billing is enabled for the shop
{
  "checkout": {
    "token": "c08bd9b031d54a2921d9c392873d9f2270e231b4b283f5a653617bc0b9644f10",
    "shop_id": 1673,
    "transaction_type": "payment",
    "gateway_response": {
      "payment": {
        "uid": "698d69b7-da39-40c7-8d42-bd5447c49b59",
        "type": "payment",
        "updated_at": "2024-07-02T14:11:44.256Z",
        "gateway": {
          "iframe": true
        },
        "avs_cvc_verification": {
          "avs_verification": {
            "result_code": "A"
          },
          "cvc_verification": {
            "result_code": "U"
          }
        },
        "auth_code": "654321",
        "bank_code": "05",
        "rrn": "999",
        "ref_id": "777888",
        "message": "Payment was approved",
        "amount": 737,
        "currency": "EUR",
        "billing_descriptor": "TEST GATEWAY BILLING DESCRIPTOR",
        "gateway_id": 3549,
        "status": "successful",
        "redirect_url": "https://gateway.overpay.io/process/698d69b7-da39-40c7-8d42-bd5447c49b59",
        "receipt_url": "https://backoffice.overpay.io/customer/transactions/698d69b7-da39-40c7-8d42-bd5447c49b59/49e2c5c9d6cbce7003f18a662ef7e9cd46f867bbcfc0fb3a3b52ad936bbeae32?language=en"
      }
    },
    "order": {
      "currency": "EUR",
      "amount": 737,
      "description": "Test description",
      "tracking_id": null,
      "additional_data": {
        "request_id": "9b41a3dd-171d-4e8a-93b4-5ab3583094e2",
        "vendor": {
          "name": "CTP",
          "token": "c08bd9b031d54a2921d9c392873d9f2270e231b4b283f5a653617bc0b9644f10"
        }
      },
      "expired_at": null,
      "initial_amount": 700,
      "surcharge_amount": 37
    },
    "settings": {
      "success_url": "http://127.0.0.1:4567/success",
      "fail_url": "http://127.0.0.1:4567/fail",
      "decline_url": "http://127.0.0.1:4567/decline",
      "verification_url": null,
      "language": "en",
      "customer_fields": {},
      "credit_card_fields": {},
      "auto_return": null,
      "button_text": null,
      "save_card_toggle": {
        "display": true,
        "customer_contract": false
      },
      "another_card_toggle": {
        "display": true
      },
      "auto_pay": null,
      "style": {
        "button_color": "#ff1a1a",
        "background_type": 2
      },
      "widget_version": 2
    },
    "customer": {
      "first_name": "John",
      "last_name": "Doe",
      "phone": null,
      "zip": null,
      "email": null,
      "birth_date": null,
      "device_id": "2e33f7fbdc05bb5b3ea8dbb927fe0494",
      "taxpayer_id": null
    },
    "finished": true,
    "expired": false,
    "shop": {
      "id": "1673",
      "name": "Good Point 2",
      "country": "",
      "url": null,
      "contact_email": "example@example.com",
      "contact_phone": "11111111111111",
      "brands": [
        "bank_transfer"
      ]
    },
    "merchant": {
      "id": "1253",
      "country": "LT"
    },
    "test": true,
    "status": "successful",
    "message": "Successfully processed",
    "version": null,
    "card_info": {},
    "job_id": "d156b448-9290-42ec-9021-6212f2e1547e",
    "payment_method": {
      "types": [
        "credit_card"
      ],
      "excluded_types": [],
      "data": {},
      "created_at": "2024-07-02T14:11:16Z",
      "updated_at": "2024-07-02T14:11:16Z",
      "id": 69877,
      "checkout_data_id": 75603
    }
  }
}