payment_method_configurations to get Google Pay configurationpaymentIntents()->create(...)payment_method_data.type = google_paypayment_method_data.google_pay.encrypted_payment_data = Google Pay tokenconfirm = trueauto_capture = truepayment/create response returns status = requires_customer_action, the merchant must present the URL in next_action.redirect.url to the consumer and wait for the consumer to complete the 3D Secure verificationpayment_method_configurations1. Frontend loads Google Pay SDK
2. Frontend calls merchant backend to get Google Pay configuration
3. Merchant backend calls UseePay payment_method_configurations
4. Frontend gets allowedAuthMethods and allowedCardNetworks
5. Frontend calls Google Pay SDK isReadyToPay(...)
6. Frontend renders Google Pay button
7. User clicks Google Pay button
8. Frontend calls loadPaymentData(...)
9. Frontend receives Google Pay token
10. Frontend sends token + order data to merchant backend
11. Merchant backend calls paymentIntents.create(...)
12. Merchant backend sets confirm=true and auto_capture=true
13. If status=requires_customer_action, redirect the customer to next_action.redirect.urltokenizationSpecification must declare PAYMENT_GATEWAY and use UseePayallowedPaymentMethods, it must explicitly declare tokenizationSpecification.type = PAYMENT_GATEWAYparameters.gateway = useepay{
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "useepay",
"gatewayMerchantId": "your_gateway_merchant_id"
}
}payment_method_configurations must be requested firstallowed_card_auth_methodsallowed_card_networksallowedAuthMethods = allowed_card_auth_methodsallowedCardNetworks = allowed_card_networksPOST /api/payment/google-pay/configurationPaymentsClientisReadyToPay(...)payment_method_data.google_pay.encrypted_payment_dataloadPaymentData(...), it receives the Google Pay payment token.{
"payment_method_data": {
"type": "google_pay",
"google_pay": {
"encrypted_payment_data": "Google Pay payment token"
}
}
}payment_method_data.google_pay.encrypted_payment_datapayment_method_data.encrypted_payment_dataconfirm = trueauto_capture = truePOST /api/payment/google-pay/configurationPOST /api/paymentPOST /api/payment/google-pay/configurationPOST /api/paymentPOST /api/v1/payment_method_configurationspaymentIntents()->create()https://openapi.useepay.comhttps://openapi1.uat.useepay.compayment_method_data.type == "google_pay"payment_method_data.google_pay.encrypted_payment_datapayment_method_data.type = "google_pay"payment_method_data.google_pay.encrypted_payment_dataconfirm = trueauto_capture = truepaymentIntents()->create(...){
"payment_method_data": {
"type": "google_pay",
"google_pay": {
"encrypted_payment_data": "Google Pay payment token"
}
},
"confirm": true,
"auto_capture": true
}payment/create response returns:{
"status": "requires_customer_action",
"next_action": {
"redirect": {
"url": "https://..."
}
}
}next_action.redirect.url and wait for the consumer to complete the 3D Secure verification.tokenizationSpecification does not declare PAYMENT_GATEWAY / useepaytype = PAYMENT_GATEWAYgateway = useepayallowedAuthMethods and allowedCardNetworks are not fetched firstpayment_method_configurations and instead hardcodes the parameters, device availability checks may fail or the payment sheet may behave unexpectedly.isReadyToPay check is not performed{
"payment_method_data": {
"type": "google_pay",
"google_pay": {
"encrypted_payment_data": "..."
}
}
}{
"payment_method_data": {
"encrypted_payment_data": "..."
}
}confirm and auto_capture are not setconfirm = trueauto_capture = truerequires_customer_action is not handledstatus = requires_customer_action, the merchant must continue the flow by sending the consumer to next_action.redirect.url to complete 3D Secure verification.tokenizationSpecification.type = PAYMENT_GATEWAY when rendering Google PaytokenizationSpecification.parameters.gateway = useepay when rendering Google PayPOST /api/payment/google-pay/configurationPOST /api/v1/payment_method_configurationsallowedAuthMethods and allowedCardNetworkspayment_method_data.google_pay.encrypted_payment_dataconfirm=true when creating the paymentauto_capture=true when creating the paymentrequires_customer_action, the frontend or merchant page handles next_action.redirect.urltokenizationSpecification must declare PAYMENT_GATEWAY and use useepaypayment_method_configurations must be requested to get allowedAuthMethods and allowedCardNetworkspayment_method_data.google_pay.encrypted_payment_data to create the paymentrequires_customer_action, the merchant must continue the flow with next_action.redirect.url