Payment Void

A void cancels a payment request that was submitted but not yet processed by the processor. A void request is declined when the payment request has already been sent to the processor

POST /v1/payments/:id/void

curl –X POST https://api.firstoken.dev/v1/payments/:id/void' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR API KEY' \
--data '{
    "transaction_info": {
        "type": "payment_void",
        "reference_code": "123456789"
    },
    "device_info": {
        "ip_address": "12.7.8.120"
    }
}'
Example of the JSON response
{
    "status": "success",
    "message": "Payment void successful",
    "data": {
        "transaction_info": {
            "type": "payment_void_response",
            "reference_code": "123456789",
            "transaction_id": "0001709059532202519905",
            "request_id": "7090595336766133304951",
            "status": "Voided",
            "created_at": "2024-02-27T18:45:34Z"
        }
    }
}

Last updated

Was this helpful?