Void Authorization API
Copy page
Copy page as Markdown for LLMs
Open in ChatGPT
Ask questions about this page
Open in Claude
Ask questions about this page
The void authorization operation allows merchants to cancel previously authorized amounts before they are captured. This operation completely cancels the authorization, making the funds available again on the customer's payment method.
Void operations must be performed within 7 days of the authorization and only before the authorization has been captured
API Endpoints
https://sbpaymentservices.payfort.com/FortAPI/paymentApi
Request Format
- Method:
POST
- Content-Type:
application/json
- Submission: Server-to-server HTTPS POST
Request Parameters
Parameter |
---|
command String Max: 20 Required Operation command for void authorization request. Value: VOID_AUTHORIZATION Example. VOID_AUTHORIZATION |
access_code String Max: 20 Required Merchant access code obtained from Amazon Payment Services dashboard under Integration Settings. Example. zx0IPmPy5jp1vAz8Kpg7 |
merchant_identifier String Max: 20 Required Unique merchant identifier assigned by Amazon Payment Services during account setup. Example. CycHZxVj |
merchant_reference String Max: 40 Required Unique order reference from the original authorization. You can send merchant_reference and/or fort_id to identify the transaction. Example. ORD-2024-001234 Special chars: - _ . |
language String Max: 2 Required Response language for messages and notifications. Values: en , ar Example. en |
signature String Max: 200 Required SHA-256 hash signature for request authentication and integrity validation. Example. a1b2c3d4e5f6789012345678901234567890abcdef123456789012345678901234 |
fort_id Integer Max: 20 Optional Unique transaction reference from Amazon Payment Services. Alternative to merchant_reference for transaction identification. Example. 149295435400084008 |
order_description String Max: 150 Optional Human-readable description of the void operation or order details. Example. Premium Wireless Headphones - Order Cancelled by Customer Special chars: ' / . _ - # : $ Space |
You can send merchant_reference
and/or fort_id
in the void authorization request to identify the original authorization. At least one of these parameters is required.
Check signature calculation section to learn how to calculate the signature.
{
"command": "VOID_AUTHORIZATION",
"access_code": "zx0IPmPy5jp1vAz8Kpg7",
"merchant_identifier": "CycHZxVj",
"merchant_reference": "ORD-2024-001234",
"language": "en",
"fort_id": "149295435400084008",
"signature": "a1b2c3d4e5f6789012345678901234567890abcdef123456789012345678901234",
"order_description": "Premium Wireless Headphones - Order Cancelled by Customer"
}
{
"command": "VOID_AUTHORIZATION",
"access_code": "zx0IPmPy5jp1vAz8Kpg7",
"merchant_identifier": "CycHZxVj",
"merchant_reference": "ORD-2024-001234",
"language": "en",
"fort_id": "149295435400084008",
"signature": "b2c3d4e5f6789012345678901234567890abcdef123456789012345678901234a",
"order_description": "Premium Wireless Headphones - Order Cancelled by Customer",
"response_message": "Success",
"response_code": "08000",
"status": "04"
}
Response Parameters
Parameter |
---|
command String Max: 20 Operation command from the request. Value: VOID_AUTHORIZATION Example. VOID_AUTHORIZATION |
access_code String Max: 20 Merchant access code used in the request. Example. zx0IPmPy5jp1vAz8Kpg7 |
merchant_identifier String Max: 20 Merchant identifier used in the request. Example. CycHZxVj |
merchant_reference String Max: 40 Unique order reference from the request. Example. ORD-2024-001234 |
language String Max: 2 Language used for the response messages. Example. en |
signature String Max: 200 Response signature for verification and security validation. Example. b2c3d4e5f6789012345678901234567890abcdef123456789012345678901234a |
fort_id Integer Max: 20 Unique transaction reference generated by Amazon Payment Services. Example. 149295435400084008 |
order_description String Max: 150 Description of the voided authorization or transaction. Example. Premium Wireless Headphones - Order Cancelled by Customer |
response_message String Max: 150 Human-readable response description in requested language. Example. Success |
response_code String Max: 5 Numeric response code indicating void result. First 2 digits represent status, last 3 represent message. Example. 08000 |
status String Max: 2 Two-digit status code indicating void transaction state. Example. 04 |
Response Codes
The response of void authorization will be returned to your configured notification URL. For a complete list of response codes and their descriptions, please refer to our Error Codes Documentation.
Testing The Integration
Use the sandbox environment for development and testing:
- Sandbox URL:
https://sbpaymentservices.payfort.com/FortAPI/paymentApi
- Test Scenarios: Test void operations with various authorization states
- Test Cards: Use our comprehensive Testing Cards
Go-Live Process
When ready to move to production, follow our Go-Live checklist
If you prefer using your account dashboard, you can void authorizations by navigating to the "Order Transaction Management" tab. For more information, see our voiding payment guide.