curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-client-id: <x-client-id>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"merchant_capture_order_id": "<string>",
"amount_to_capture": "<string>",
"final_capture": true
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture"
payload = {
"merchant_capture_order_id": "<string>",
"amount_to_capture": "<string>",
"final_capture": True
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-client-id": "<x-client-id>",
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-client-id': '<x-client-id>',
'x-auth-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
merchant_capture_order_id: '<string>',
amount_to_capture: '<string>',
final_capture: true
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchant_capture_order_id' => '<string>',
'amount_to_capture' => '<string>',
'final_capture' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <api-key>",
"x-client-id: <x-client-id>",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture"
payload := strings.NewReader("{\n \"merchant_capture_order_id\": \"<string>\",\n \"amount_to_capture\": \"<string>\",\n \"final_capture\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("x-auth-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-client-id", "<x-client-id>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_capture_order_id\": \"<string>\",\n \"amount_to_capture\": \"<string>\",\n \"final_capture\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-client-id"] = '<x-client-id>'
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_capture_order_id\": \"<string>\",\n \"amount_to_capture\": \"<string>\",\n \"final_capture\": true\n}"
response = http.request(request)
puts response.read_body{
"payment_intent_id": "b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e6",
"amount": "10.12",
"currency": "SGD",
"intent_status": "SUCCEEDED",
"current_funds_action": {},
"capture_records": [
{
"capture_id": "<string>",
"merchant_capture_order_id": "<string>",
"capture_sequence": 123,
"capture_amount": "<string>",
"currency": "<string>",
"capture_mode": "final",
"channel_capture_status": 0,
"arn": "<string>",
"channel_capture_time": "2023-11-07T05:31:56Z",
"request_time": "2023-11-07T05:31:56Z",
"complete_time": "2023-11-07T05:31:56Z"
}
],
"authorization_type": "authorization",
"authorization_expires_at": "2023-11-07T05:31:56Z",
"available_to_capture": "<string>",
"available_to_void": "<string>",
"description": "<string>",
"available_payment_method_types": [
"<string>"
],
"captured_amount": "10.12",
"customer": {
"id": "cus_hkduz3gvz1feg25e87fjcahsxq",
"external_customer_id": "CUS_1715740800123",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone_number": "+1 123456789",
"address": {
"country_code": "SG",
"city": "Singapore",
"street": "444 Orchard Rd, Midpoint Orchard, Singapore ",
"postcode": "924011",
"state": ""
},
"metadata": {
"key1": "value1",
"key2": "value2"
},
"create_time": "2025-03-21T17:17:32+08:00",
"update_time": "2025-03-21T17:17:32+08:00"
},
"customer_id": "cus_asyknf3wlfxhs1s6plamk80i8v",
"cancel_time": "2023-11-07T05:31:56Z",
"cancellation_reason": "Order cancelled",
"client_secret": "eyJhbGciOiJI***********ujNdZ1DF9CqWEfF1jphxI",
"merchant_order_id": "1bf70d90-9ed0-48ce-9370-9bd7ef6ab9ee",
"metadata": {},
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": {
"url": "https://example.checkout-page.com",
"return_url": "https://example.payment-result-page.com"
},
"redirect_iframe": {
"iframe": "<string>"
},
"display_qr_code": {
"qr_code_url": "https://sg-acquiring-bucket-sandbox.s3.ap-southeast-1.amazonaws.com/payment/20250829/qrcode_PA1961262701099356160?X-Amz-Algorithm=AWS4-HMAC-SHA256\\u0026X-Amz-Credential=ASIAY******f987429",
"expires_at": "2023-11-07T05:31:56Z"
},
"display_bank_details": {
"bank_name": "<string>",
"account_number": "GB71950018692652646598",
"routing_number": "012345678"
}
},
"return_url": "https://127.0.0.1:8080/api/v1/callback",
"create_time": "2024-03-01T00:00:00+08:00",
"complete_time": "2023-11-07T05:31:56Z",
"update_time": "2024-03-01T00:00:00+08:00",
"latest_payment_attempt": {
"attempt_id": "24fc62b4-90d1-42e3-96ab-dd54ccc648b3",
"amount": "9.98",
"currency": "SGD",
"authorization_type": "authorization",
"refunded_amount": "0.00",
"create_time": "2025-03-21T17:17:32+08:00",
"update_time": "2025-03-21T17:17:32+08:00",
"complete_time": "2023-11-07T05:31:56Z",
"cancellation_reason": "Order cancelled",
"auth_code": "A12B3C",
"arn": "74537604221222132710572",
"rrn": "123456789012",
"advice_code": "01",
"authentication_data": {
"cvv_result": "M",
"avs_result": "Y",
"three_ds": {
"three_ds_version": "2.2.0",
"eci": "05",
"cavv": "AAABCZIhcQAAAABZlyFxAAAAAAA=",
"three_ds_authentication_status": "Y",
"three_ds_cancellation_reason": "01"
}
},
"payment_method": {
"type": "card",
"card": {
"card_name": "john doe",
"card_number": "541333******4047",
"network": "visa",
"authorization_type": "authorization",
"brand": "visa",
"bin": "541333",
"last4": "4047",
"card_type": "credit",
"expiry_month": "12",
"expiry_year": "2027",
"billing": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"address": {
"country_code": "SG",
"city": "Singapore",
"street": "444 Orchard Rd, Midpoint Orchard, Singapore ",
"postcode": "924011",
"state": ""
},
"phone_number": "12025550123"
},
"auto_capture": true
}
},
"failure_code": "",
"attempt_status": "INITIATED"
},
"capture_id": "<string>",
"merchant_capture_order_id": "<string>"
}Capture a PaymentIntent
Request collection of funds for a payment that was previously authorized and is awaiting capture.
The PaymentIntent must be in REQUIRES_CAPTURE. Omit amount_to_capture to capture the full available amount; a smaller final amount is supported only for eligible pre-authorizations. Each authorization accepts one final capture.
The response acknowledges the capture request. Retrieve the PaymentIntent to check its payment state. See Capture amount rules.
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-client-id: <x-client-id>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"merchant_capture_order_id": "<string>",
"amount_to_capture": "<string>",
"final_capture": true
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture"
payload = {
"merchant_capture_order_id": "<string>",
"amount_to_capture": "<string>",
"final_capture": True
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-client-id": "<x-client-id>",
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-client-id': '<x-client-id>',
'x-auth-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
merchant_capture_order_id: '<string>',
amount_to_capture: '<string>',
final_capture: true
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchant_capture_order_id' => '<string>',
'amount_to_capture' => '<string>',
'final_capture' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <api-key>",
"x-client-id: <x-client-id>",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture"
payload := strings.NewReader("{\n \"merchant_capture_order_id\": \"<string>\",\n \"amount_to_capture\": \"<string>\",\n \"final_capture\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("x-auth-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-client-id", "<x-client-id>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_capture_order_id\": \"<string>\",\n \"amount_to_capture\": \"<string>\",\n \"final_capture\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{id}/capture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-client-id"] = '<x-client-id>'
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_capture_order_id\": \"<string>\",\n \"amount_to_capture\": \"<string>\",\n \"final_capture\": true\n}"
response = http.request(request)
puts response.read_body{
"payment_intent_id": "b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e6",
"amount": "10.12",
"currency": "SGD",
"intent_status": "SUCCEEDED",
"current_funds_action": {},
"capture_records": [
{
"capture_id": "<string>",
"merchant_capture_order_id": "<string>",
"capture_sequence": 123,
"capture_amount": "<string>",
"currency": "<string>",
"capture_mode": "final",
"channel_capture_status": 0,
"arn": "<string>",
"channel_capture_time": "2023-11-07T05:31:56Z",
"request_time": "2023-11-07T05:31:56Z",
"complete_time": "2023-11-07T05:31:56Z"
}
],
"authorization_type": "authorization",
"authorization_expires_at": "2023-11-07T05:31:56Z",
"available_to_capture": "<string>",
"available_to_void": "<string>",
"description": "<string>",
"available_payment_method_types": [
"<string>"
],
"captured_amount": "10.12",
"customer": {
"id": "cus_hkduz3gvz1feg25e87fjcahsxq",
"external_customer_id": "CUS_1715740800123",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone_number": "+1 123456789",
"address": {
"country_code": "SG",
"city": "Singapore",
"street": "444 Orchard Rd, Midpoint Orchard, Singapore ",
"postcode": "924011",
"state": ""
},
"metadata": {
"key1": "value1",
"key2": "value2"
},
"create_time": "2025-03-21T17:17:32+08:00",
"update_time": "2025-03-21T17:17:32+08:00"
},
"customer_id": "cus_asyknf3wlfxhs1s6plamk80i8v",
"cancel_time": "2023-11-07T05:31:56Z",
"cancellation_reason": "Order cancelled",
"client_secret": "eyJhbGciOiJI***********ujNdZ1DF9CqWEfF1jphxI",
"merchant_order_id": "1bf70d90-9ed0-48ce-9370-9bd7ef6ab9ee",
"metadata": {},
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": {
"url": "https://example.checkout-page.com",
"return_url": "https://example.payment-result-page.com"
},
"redirect_iframe": {
"iframe": "<string>"
},
"display_qr_code": {
"qr_code_url": "https://sg-acquiring-bucket-sandbox.s3.ap-southeast-1.amazonaws.com/payment/20250829/qrcode_PA1961262701099356160?X-Amz-Algorithm=AWS4-HMAC-SHA256\\u0026X-Amz-Credential=ASIAY******f987429",
"expires_at": "2023-11-07T05:31:56Z"
},
"display_bank_details": {
"bank_name": "<string>",
"account_number": "GB71950018692652646598",
"routing_number": "012345678"
}
},
"return_url": "https://127.0.0.1:8080/api/v1/callback",
"create_time": "2024-03-01T00:00:00+08:00",
"complete_time": "2023-11-07T05:31:56Z",
"update_time": "2024-03-01T00:00:00+08:00",
"latest_payment_attempt": {
"attempt_id": "24fc62b4-90d1-42e3-96ab-dd54ccc648b3",
"amount": "9.98",
"currency": "SGD",
"authorization_type": "authorization",
"refunded_amount": "0.00",
"create_time": "2025-03-21T17:17:32+08:00",
"update_time": "2025-03-21T17:17:32+08:00",
"complete_time": "2023-11-07T05:31:56Z",
"cancellation_reason": "Order cancelled",
"auth_code": "A12B3C",
"arn": "74537604221222132710572",
"rrn": "123456789012",
"advice_code": "01",
"authentication_data": {
"cvv_result": "M",
"avs_result": "Y",
"three_ds": {
"three_ds_version": "2.2.0",
"eci": "05",
"cavv": "AAABCZIhcQAAAABZlyFxAAAAAAA=",
"three_ds_authentication_status": "Y",
"three_ds_cancellation_reason": "01"
}
},
"payment_method": {
"type": "card",
"card": {
"card_name": "john doe",
"card_number": "541333******4047",
"network": "visa",
"authorization_type": "authorization",
"brand": "visa",
"bin": "541333",
"last4": "4047",
"card_type": "credit",
"expiry_month": "12",
"expiry_year": "2027",
"billing": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"address": {
"country_code": "SG",
"city": "Singapore",
"street": "444 Orchard Rd, Midpoint Orchard, Singapore ",
"postcode": "924011",
"state": ""
},
"phone_number": "12025550123"
},
"auto_capture": true
}
},
"failure_code": "",
"attempt_status": "INITIATED"
},
"capture_id": "<string>",
"merchant_capture_order_id": "<string>"
}Authorizations
The API token for login provided by UQPAY.
Headers
Specifies the sub-account on whose behalf the request is made. This should be set to the account_id, which can be retrieved via the List Connected Accounts. If omitted or empty, the request is executed using the master account.
More information at Connected Accounts.
A unique identifier (UUID) used to maintain operation idempotency, ensuring that repeated executions of the same operation do not result in unintended effects or duplication. It helps preserve data consistency in the face of network errors, retries, or failures.
The API client id generated by UQPAY
Path Parameters
The unique ID of a payment intent.
"PI1925112193204883441"
Body
Your capture reference, unique within the account. Defaults to the PaymentIntent merchant_order_id when omitted. Reusing a recorded reference is rejected; use the same X-Idempotency-Key for transport retries.
64Omit to capture the full available amount. Must be positive and respect currency precision. Ordinary authorization requires the full authorized amount; pre-authorization permits a smaller final amount only when supported by your channel. Empty or null values are rejected.
Only final capture is supported. Omit or set to true. Each authorization accepts one capture; any remaining pre-authorized amount is released by the system.
true Response
Capture request accepted
Unique identifier for the PaymentIntent
36"b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e6"
Payment amount. This is the order amount you would like to charge your customer.
"10.12"
Three-letter currency code
"SGD"
Status of this PaymentIntent.
REQUIRES_PAYMENT_METHOD: The PaymentIntent is waiting for the confirm request.REQUIRES_CUSTOMER_ACTION: The PaymentIntent is waiting for further customer action of authentication, e.g. 3DS verification and QR code scan. Please check thenext_action.REQUIRES_CAPTURE: The PaymentIntent is waiting for your capture to complete the payment.PENDING: The PaymentIntent is pending the final result from the provider. No further action is required.SUCCEEDED: The PaymentIntent has succeeded. The payment is complete.CANCELLED: The PaymentIntent has been canceled by your request. The payment is closed.FAILED: The PaymentIntent has failed.PARTIALLY_CAPTURED: A partially captured authorization has an outstanding balance; do not submit another capture.EXPIRED: The pre-authorization expired and was released.
PARTIALLY_CAPTURED, EXPIRED, REQUIRES_PAYMENT_METHOD, REQUIRES_CUSTOMER_ACTION, REQUIRES_CAPTURE, PENDING, SUCCEEDED, CANCELLED, FAILED "SUCCEEDED"
Refund or authorization-release details, when available in Retrieve or List PaymentIntents.
Capture records returned by Retrieve and List PaymentIntents.
Show child attributes
Show child attributes
Authorization mode for this payment.
authorization, pre_authorization Pre-authorization expiry. Null when no expiry is recorded. Use the returned time rather than a fixed holding period.
Remaining pre-authorized amount available for capture. A final capture consumes the available authorization; inspect capture_records for channel processing results.
Remaining pre-authorized amount, equal to available_to_capture. A positive value alone does not mean cancellation is permitted.
Descriptor while creating a PaymentIntent.
255Available payment method types for this PaymentIntent.
Aggregate capture amount recorded on the PaymentIntent. Capture acceptance can update this value before channel completion; check capture_records for processing results.
"10.12"
Snapshot of the customer associated with this PaymentIntent. Returned when customer or customer_id was supplied at creation time. The customer's unique identifier is exposed at the top level as customer_id; the id field is not included inside this object.
Show child attributes
Show child attributes
ID of the customer associated with this PaymentIntent. Empty for guest checkout.
36"cus_asyknf3wlfxhs1s6plamk80i8v"
Cancellation timestamp; an empty string when no cancellation time is recorded.
Reason for canceling this PaymentIntent.
"Order cancelled"
PaymentIntent's client secret for browser or app. Returned by PaymentIntent create API or PaymentIntent retrieve API. The provided client_secret is valid for 60 minutes.
"eyJhbGciOiJI***********ujNdZ1DF9CqWEfF1jphxI"
The merchant reference id created in merchant's system that corresponds to this PaymentIntent
36"1bf70d90-9ed0-48ce-9370-9bd7ef6ab9ee"
Metadata associated with the payment. Returns null when no metadata is set.
Show child attributes
Show child attributes
Null when no next action is available; otherwise follow the returned action instructions.
Show child attributes
Show child attributes
The web page URL or application scheme URI to redirect the customer after payment authentication.
"https://127.0.0.1:8080/api/v1/callback"
Time at which this PaymentIntent was created.
"2024-03-01T00:00:00+08:00"
Completion timestamp; an empty string when no completion time is recorded.
Last time at which this PaymentIntent was updated or operated on.
"2024-03-01T00:00:00+08:00"
Latest PaymentAttempt; null when no payment attempt is available.
- Latest payment attempt
- No payment attempt
Show child attributes
Show child attributes
Identifier of the accepted capture.
Merchant capture reference used for this request.

