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
In case of sandbox environment you should use this URL: https://api.firstoken-staging.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.
transaction_info: {object}
type
Type of transaction. Possible values: capture.
reference_code
Unique reference code for the transaction.
capture_info: {object}
amount_details
total_amount
Total amount to be captured.
currency
Currency code (e.g., MXN for Mexican Peso).
installments
Number of installments for the capture.
device_info: {object}
ip_address
IP address of the device making the request.
status
Status of the response. Possible values: success, error.
message
Message describing the result of the capture.
data {object}
transaction_info {object}
type
Type of transaction response. Possible values: capture_response.
reference_code
Unique reference code for the transaction.
transaction_id
Unique transaction ID.
request_id
Unique request ID.
status
Status of the transaction. Possible values: Pending, Captured, Declined.
reconciliation_id
Reconciliation ID for the transaction.
created_at
Timestamp of when the transaction was created.
order_info {object}
amount_details {object}
total_amount
Total amount captured.
currency
Currency code.
Request Body
The request body should be a JSON object with the following structure:
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.