- WooCommerce
- Magento
- Shopify Soon
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 available for card payments only; every other payment method captures at the time of payment. Use it when you need to verify that funds are available before 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 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 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 reverse-payment endpoint for this purpose.
Important considerations
- Capture window: You have 7 days from the payment's
created_atto capture or reverse it. This is the same on test and live accounts. The card issuer can release its hold sooner, so a late capture can still fail. Checkcapturableandreversibleonfind-paymentfor the current answer. expires_atis not the capture deadline:expires_atis when an unfinished payment expires if the customer doesn't complete it. Once a payment isAUTHORIZED,expires_atno longer matters, and the 7-day capture window applies.- Full capture only: Capture the full authorized amount. You can't increase or extend an authorization, so a longer hold needs a new payment from the customer.
- When the window closes: The payment stays
AUTHORIZED, butcapturableandreversiblebecomefalseand no webhook is sent.capture-paymentthen returnsNOT_CAPTURABLEandreverse-paymentreturnsNOT_REVERSIBLE. Reverse any payment you won't capture while you still can, so the customer's funds are released quickly.
For payment statuses, see Payment lifecycle.
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 guideBuild your own POS, or work with our app by sending commands or using deep links.
Read the guideBuild 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 guideFilter payments and payouts, export CSVs, read balance holds, and reconcile daily statements.
Read the guideLook up what each Reservepay failure code means when a payment is declined.
Read the guideNo account yet?
Start integrating all these amazing features into your app or website by creating your own merchant account today. It's free to sign up and only takes a few minutes to get started.
