ApplePaySessionpaymentIntents()->create(...)payment_method_data.type = apple_paypayment_method_data.apple_pay.encrypted_payment_data = Apple Pay tokenconfirm = trueauto_capture = truePaymentIntent first.ApplePaySession1. Frontend loads Apple Pay SDK
2. Frontend calls merchant backend to get Apple Pay configuration
3. Frontend checks Apple Pay availability
4. Frontend creates ApplePaySession
5. Frontend calls merchant backend for merchant validation
6. User authorizes payment in Apple Pay sheet
7. Frontend receives Apple Pay token
8. Frontend sends token + order data to merchant backend
9. Merchant backend calls paymentIntents.create(...)
10. Merchant backend sets confirm=true and auto_capture=true
11. Frontend completes Apple Pay session with success or failurePOST /api/payment/apple-pay/configurationPOST /api/payment/apple-pay/validatePOST /api/paymentPOST /api/payment/apple-pay/configurationPOST /api/payment/apple-pay/validatePOST /api/paymentPOST /api/v1/payment_method_configurationsPOST /api/v1/payment_methods/apple_pay/merchant_sessionpaymentIntents()->create()https://openapi.useepay.comhttps://openapi1.uat.useepay.com{
"currency": "USD",
"host": "demo.example.com",
"merchant_name": "Your Store Name",
"os_type": "WEB",
"amount": 31.58
}{
"display_name": "Your Store Name",
"host": "demo.example.com",
"merchant_identifier": "merchant.com.example.useepay",
"merchant_id": "5000000000xxxxx",
"validationURL": "https://apple-pay-gateway.apple.com/paymentservices/startSession"
}{
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@example.com",
"phone": "+1 3235550123",
"shippingAddress": {
"address": "123 Main St",
"city": "Los Angeles",
"state": "CA",
"zipCode": "90001",
"country": "US"
},
"billingAddress": {
"address": "123 Main St",
"city": "Los Angeles",
"state": "CA",
"zipCode": "90001",
"country": "US"
},
"paymentMethods": ["apple_pay"],
"items": [
{
"name": "Product A",
"description": "Product description",
"price": 19.99,
"quantity": 1
}
],
"totals": {
"subtotal": "19.99",
"shipping": "9.99",
"tax": "1.60",
"totalAmount": "31.58",
"currency": "USD"
},
"payment_method_data": {
"type": "apple_pay",
"apple_pay": {
"merchant_identifier": "merchant.com.example.useepay",
"encrypted_payment_data": {
"version": "EC_v1",
"data": "...",
"signature": "...",
"header": {
"ephemeralPublicKey": "...",
"publicKeyHash": "...",
"transactionId": "..."
}
}
}
}
}1. Receive order data and payment_method_data from frontend
2. Verify payment_method_data.type == "apple_pay"
3. Read merchant_identifier
4. Read encrypted_payment_data
5. Build payment create parameters
6. Set payment_method_data.type = "apple_pay"
7. Set payment_method_data.apple_pay.encrypted_payment_data
8. Set confirm = true
9. Set auto_capture = true
10. Call UseePay paymentIntents.create(paymentParams)
11. Return create result to frontendpaymentParams = {
amount: 31.58,
currency: "USD",
merchant_order_id: "ORD_1710000000_1234",
return_url: "https://merchant.example.com/payment/callback",
order: ...,
customer: ...,
device_data: ...,
payment_method_types: ["apple_pay"],
payment_method_data: {
type: "apple_pay",
billing: ...,
apple_pay: {
merchant_identifier: "merchant.com.example.useepay",
encrypted_payment_data: ...
}
},
confirm: true,
auto_capture: true
}{
"success": true,
"data": {
"id": "pi_xxx",
"status": "succeeded",
"merchant_order_id": "ORD_xxx"
},
"timestamp": "2026-03-20T10:00:00+08:00"
}{
"success": false,
"data": {
"error": {
"message": "Payment creation failed",
"code": 400
}
},
"timestamp": "2026-03-20T10:00:00+08:00"
}/api/paymentpaymentIntents.create(...)confirm=true and auto_capture=true{
"payment_method_data": {
"type": "apple_pay",
"apple_pay": {
"merchant_identifier": "...",
"encrypted_payment_data": {}
}
}
}domainNamemerchantIdentifierPOST /api/payment/apple-pay/configurationPOST /api/payment/apple-pay/validatePOST /api/payment/api/paymentconfirm=true and auto_capture=truepaymentIntents.create(...)confirm=true and auto_capture=true