Capture

This endpoint is used to capture a previously authorized payment transaction. It requires a JSON payload containing transaction details, capture information, and device information.

The URL for this endpoint is https://api.firstoken.co/v1/payments/:id/capture

Request Headers

  • Content-Type: application/json

  • x-api-key: <Your API Key>

id: string

The unique identifier of the transaction to be captured.

Request Body

The request body should be a JSON object with the following structure:

Example of the JSON request
{
  "transaction_info": {
    "type": "capture",
    "reference_code": "123456789"
  },
  "capture_info": {
    "amount_details": {
      "total_amount": 1000,
      "currency": "MXN"
    },
    "installments": 1
  },
    "device_info": {
        "ip_address": "12.7.8.120"
    }
}

Response

The response will be a JSON object with the following structure:

Example of the JSON response

In case of an error, the response will have a status of fail and a descriptive message. The data object provides more details about the specific issues encountered.

Last updated

Was this helpful?