Currently authorization and capture flow is only available for Cards payment.
In addition to one-time automatic payments, Xendit Components also support an authorization and capture flow (manual capture). This allows you to:
Authorize a customer’s payment method during checkout.
Capture the funds later (e.g., after confirming stock, shipping, or service fulfillment).
This flow is commonly used by eCommerce, marketplaces, travel, and on-demand services.
How it works
Create a Payment Session with
capture_method: MANUALin your serverMount Xendit Components in your client app with this guideline
End user complete the payment on your hosted page
Payment is AUTHORIZED (funds held, not yet captured)
You receive
payment_session.completedCapture the payment via Payment API v3 when ready
Xendit sends
payment.capturewebhook
How to integrate
Refer to the Xendit Components integration guide for the implementation.
When your customer is ready to proceed with a payment, your system should create a Payment Session with capture_method: MANUAL using the example payload below. This will authorize the payment first (placing a hold on the funds) and allow you to capture the payment at a later time.
Request - POST /sessions
{
"reference_id": "{{$YOUR_REFERENCE_ID}}",
"session_type": "PAY",
"mode": "COMPONENTS",
"capture_method": "MANUAL",
"amount": 10000,
"currency": "IDR",
"country": "ID",
"customer": {
"reference_id": "{{$randomUUID}}",
"type": "INDIVIDUAL",
"email": "customer@yourdomain.com",
"mobile_number": "+628123456789",
"individual_detail": {
"given_names": "John",
"surname": "Doe"
}
},
"components_configuration": {
"origins": ["https://example.com"]
}
}{
"payment_session_id": "ps-69649592c951f34f173f803a",
"created": "2026-01-12T06:32:50.550Z",
"updated": "2026-01-12T06:32:50.550Z",
"status": "ACTIVE",
"reference_id": "{{$YOUR_REFERENCE_ID}}",
"currency": "IDR",
"amount": 10000,
"country": "ID",
"expires_at": "2026-01-12T07:02:50.059Z",
"session_type": "PAY",
"capture_method": "MANUAL",
"mode": "COMPONENTS",
"locale": "en",
"business_id": "62440e322008e87fb29c1fd0",
"customer_id": "cust-138123c0-50de-49bb-b804-ead0e1e35914",
"capture_method": "AUTOMATIC",
"components_sdk_key": "session-907388bd5ccd790edb241bed00c80000-pl-MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE8zNjokzwdcj/11UkV77757+zQCQAc/Hsez5Ue2+UVEVXCKmQlVhpKGBHY1G5TPWIVUs4JdK8xLA9OihdACCRv7Z66B/caBfhU6V+pTXjiZ/OBcCYUP/cm4mkn5qHZ6N8-UQiUzNWiQad32u5F+pHrumyTsAPwCbojrBaEj+kNpsstysk7G6B4i+r7pgTMye860bMB1KVsLbBSMLYRB9gsb7x/5RJV0Y04yQ+sHBzHOLq3ab9g3g+IQ6C2YElXdvWf",
"components_configuration": {
"origins": ["https://example.com"]
}
}You can refer to the Xendit Components client-side documentation for client-app integration using the returned components_sdk_key.
Upon successful authorization, Xendit will send a payment_session.completed webhook. The webhook contains the payment_id with status AUTHORIZED. You should store the payment_id,mark the order as authorized, and capture the payment once the order or service is confirmed.
How to capture an authorized payment
To capture an authorized payment, use the Payment API v3 capture endpoint with the payment_id obtained from the authorization step.
Request - POST /payments/{payment_id}/capture
{
"capture_amount": 10000
}