Guides
Search documentation... ⌘K
API references
Advanced features

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

  1. 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.
  2. 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.
Integrate further

Dive deeper into these advanced integration topics to unlock Reservepay's full potential with our in-depth guides.

Refunds, voids, and reversals

Issue refunds, void transactions before they settle, and reverse authorizations when needed.

Read the guide
Authorization and capture

Separate authorization from capture to hold funds without charging. Perfect for pre-orders or reservations

Read the guide
Order details

Submit orders to unlock powerful analytics and strengthen your case during disputes.

Coming soon
Customer intelligence

Build profiles by attaching customer data. Gain insights, reduce fraud risk, and create experiences that drive loyalty.

Read the guide
Sending funds

Send payouts to your primary bank account or to your contacts via bank account, mobile number or national ID.

Read the guide
Real-time notifications

Stay informed about payment events with real-time webhooks. Automate your order processing, and more...

Read the guide