v1
latestOpenAPI 3.0.22026-07-26123510445.2 KBPayment Intents
Confirm a PaymentIntent
Confirms a payment intent for processing
post/v2/payment_intents/{id}/confirm
Path parameters
idstring required
Example:PI1925112193204883441
The unique ID of a payment intent.
Headers
x-on-behalf-ofstring
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 API. If omitted or empty, the request is executed using the master account. More information at Connected Accounts.
x-idempotency-keystring uuid
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.
x-client-idstring required
The API client id generated by UQPAY
Request body
Example request
{
"payment_method": {
"card": {
"billing": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone_number": "12025550123",
"address": {
"country_code": "SG",
"city": "Singapore",
"street": "444 Orchard Rd, Midpoint Orchard, Singapore ",
"postcode": "924011"
}
}
}
},
"ip_address": "212.121.222.123",
"browser_info": {
"accept_header": "*/*",
"browser": {
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"
},
"device_id": "00000000-000000000000000",
"language": "en-US",
"location": {
"lat": "-37.81892",
"lon": "144.95913"
},
"mobile": {
"device_model": "Apple IPHONE 7",
"os_version": "IOS 14.5"
},
"screen_color_depth": 24,
"screen_height": 1080,
"screen_width": 1920,
"timezone": "-2"
}
}Response
Payment intent confirmed successfully
Example response
{
"payment_intent_id": "b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e6",
"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"
},
"metadata": {
"key1": "value1",
"key2": "value2"
},
"create_time": "2024-03-01T00:00:00+08:00",
"update_time": "2024-03-01T00:00:00+08:00"
},
"customer_id": "cus_asyknf3wlfxhs1s6plamk80i8v",
"cancel_time": "2024-03-01T00:00:00+08:00",
"cancellation_reason": "Order cancelled",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"next_action": {
"redirect_to_url": {
"url": "https://example.checkout-page.com",
"return_url": "https://example.payment-result-page.com"
},
"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"
},
"display_bank_details": {
"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": "2024-03-01T00:00:00+08:00",
"update_time": "2024-03-01T00:00:00+08:00",
"latest_payment_attempt": {
"attempt_id": "24fc62b4-90d1-42e3-96ab-dd54ccc648b3",
"create_time": "2024-03-01T00:00:00+08:00",
"update_time": "2024-03-01T00:00:00+08:00",
"complete_time": "2024-03-01T00:00:00+08:00",
"cancellation_reason": "Order cancelled",
"auth_code": "A12B3C",
"arn": "74537604221222132710572",
"rrn": "123456789012",
"advice_code": "01",
"authentication_data": {
"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": {
"card": {
"card_name": "john doe",
"card_number": "541333******4047",
"brand": "visa",
"bin": "541333",
"last4": "4047",
"expiry_month": "12",
"expiry_year": "2027",
"billing": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone_number": "12025550123",
"address": {
"country_code": "SG",
"city": "Singapore",
"street": "444 Orchard Rd, Midpoint Orchard, Singapore ",
"postcode": "924011"
}
}
}
},
"attempt_status": "INITIATED"
}
}