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 StringMax: 20RequiredOperation command for void authorization request. Value: VOID_AUTHORIZATIONExample. VOID_AUTHORIZATION | 
| access_code StringMax: 20RequiredMerchant access code obtained from Amazon Payment Services dashboard under Integration Settings. Example. zx0IPmPy5jp1vAz8Kpg7 | 
| merchant_identifier StringMax: 20RequiredUnique merchant identifier assigned by Amazon Payment Services during account setup. Example. CycHZxVj | 
| merchant_reference StringMax: 40RequiredUnique 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 StringMax: 2RequiredResponse language for messages and notifications. Values: en,arExample. en | 
| signature StringMax: 200RequiredSHA-256 hash signature for request authentication and integrity validation. Example. a1b2c3d4e5f6789012345678901234567890abcdef123456789012345678901234 | 
| fort_id IntegerMax: 20OptionalUnique transaction reference from Amazon Payment Services. Alternative to merchant_reference for transaction identification. Example. 149295435400084008 | 
| order_description StringMax: 150OptionalHuman-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 StringMax: 20Operation command from the request. Value: VOID_AUTHORIZATIONExample. VOID_AUTHORIZATION | 
| access_code StringMax: 20Merchant access code used in the request. Example. zx0IPmPy5jp1vAz8Kpg7 | 
| merchant_identifier StringMax: 20Merchant identifier used in the request. Example. CycHZxVj | 
| merchant_reference StringMax: 40Unique order reference from the request. Example. ORD-2024-001234 | 
| language StringMax: 2Language used for the response messages. Example. en | 
| signature StringMax: 200Response signature for verification and security validation. Example. b2c3d4e5f6789012345678901234567890abcdef123456789012345678901234a | 
| fort_id IntegerMax: 20Unique transaction reference generated by Amazon Payment Services. Example. 149295435400084008 | 
| order_description StringMax: 150Description of the voided authorization or transaction. Example. Premium Wireless Headphones - Order Cancelled by Customer | 
| response_message StringMax: 150Human-readable response description in requested language. Example. Success | 
| response_code StringMax: 5Numeric response code indicating void result. First 2 digits represent status, last 3 represent message. Example. 08000 | 
| status StringMax: 2Two-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.