Authorization and capture
Learn how to separate payment authorization from capture to hold funds without immediately charging.
Overview
Authorization and capture is a two-step process for processing payments. This approach is ideal for businesses that need to verify availability of funds before actually charging the customer, such as for pre-orders or hotel reservations.
Two-step process
- Authorization: Reservepay verifies that the customer has sufficient funds and places a hold on the amount. The funds are not yet transferred to your account.
- Capture: You confirm the transaction and the funds are officially transferred from the customer to your account.
How to use authorization and capture
To use this two-step process, you must set the capture parameter to false when initiating a payment flow.
Step 1: Authorize a payment
When calling the /merchants/initiate-payment-flow endpoint, set capture: false.
await fetch('https://api.reservepay.com/merchants/initiate-payment-flow', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Api-Version': '2025-04-01',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '10000',
currency: 'THB',
payment_session_id: 'sess_1234567890',
capture: false, // Set to false for authorization only
return_url: 'https://example.com/return'
})
})
Once the customer completes the payment flow, the payment status will transition to AUTHORIZED.
Step 2: Capture the payment
To complete the transaction and transfer the funds, call the /merchants/capture-payment endpoint with the payment_id.
await fetch('https://api.reservepay.com/merchants/capture-payment', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Api-Version': '2025-04-01',
'Content-Type': 'application/json'
},
body: JSON.stringify({
payment_id: 'pay_1234567890'
})
})
Releasing an authorization
If you decide not to proceed with the transaction, you should release the hold on the customer's funds by reversing the authorization. Use the /merchants/reverse-payment endpoint for this purpose.
Important considerations
- Expiration: Authorizations typically expire after a certain period (e.g., 7 days). If you don't capture the payment before it expires, the hold will be released automatically.
Dive deeper into these advanced integration topics to unlock Reservepay's full potential with our in-depth guides.
Issue refunds, void transactions before they settle, and reverse authorizations when needed.
Read the guideSeparate authorization from capture to hold funds without charging. Perfect for pre-orders or reservations
Read the guideSubmit orders to unlock powerful analytics and strengthen your case during disputes.
Build profiles by attaching customer data. Gain insights, reduce fraud risk, and create experiences that drive loyalty.
Read the guideSend payouts to your primary bank account or to your contacts via bank account, mobile number or national ID.
Read the guideStay informed about payment events with real-time webhooks. Automate your order processing, and more...
Read the guide