1.
Contact UseePay support to enable Google Pay for your merchant account
3.
The frontend requests Google Pay configuration from the merchant backend
4.
The merchant backend calls UseePay payment_method_configurations to get Google Pay configuration
5.
The frontend sends the token and order data to the merchant backend
6.
The merchant backend directly calls paymentIntents()->create(...)
7.
The merchant backend passes:
payment_method_data.type = google_pay
payment_method_data.google_pay.encrypted_payment_data = Google Pay token
and sets:
confirm = true
auto_capture = true
8.
If the payment/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 verification
Loading the Google Pay SDK
Getting Google Pay configuration
Using the Google Pay SDK to check whether Google Pay is available on the current page
Rendering the Google Pay button
Launching the Google Pay payment sheet
Receiving the Google Pay payment token
Sending the token and order data to the merchant backend
1.
Validate payment_method_data.type == "google_pay"
2.
Read payment_method_data.google_pay.encrypted_payment_data
3.
Build the payment creation parameters
4.
Set payment_method_data.type = "google_pay"
5.
Set payment_method_data.google_pay.encrypted_payment_data
8.
Call paymentIntents()->create(...)
1.
The page has loaded the Google Pay SDK
2.
The frontend declares tokenizationSpecification.type = PAYMENT_GATEWAY when rendering Google Pay
3.
The frontend declares tokenizationSpecification.parameters.gateway = useepay when rendering Google Pay
4.
The merchant backend supports POST /api/payment/google-pay/configuration
5.
The merchant backend has called POST /api/v1/payment_method_configurations
6.
The frontend has obtained allowedAuthMethods and allowedCardNetworks
7.
The frontend has used the Google Pay SDK to check whether the current page is available
8.
The frontend has successfully received the Google Pay payment token
9.
The backend has placed the token into payment_method_data.google_pay.encrypted_payment_data
10.
The backend has set confirm=true when creating the payment
11.
The backend has set auto_capture=true when creating the payment
12.
If the response returns requires_customer_action, the frontend or merchant page handles next_action.redirect.url
1.
The Google Pay SDK must be loaded
2.
When rendering Google Pay, tokenizationSpecification must declare PAYMENT_GATEWAY and use useepay
3.
payment_method_configurations must be requested to get allowedAuthMethods and allowedCardNetworks
4.
The Google Pay SDK must be used to check whether Google Pay is available on the current page
5.
After receiving the payment token, it must be placed into payment_method_data.google_pay.encrypted_payment_data to create the payment
The frontend is responsible for getting the token
The backend is responsible for directly creating the payment with the token
The token is used once at payment creation time
If the payment result is requires_customer_action, the merchant must continue the flow with next_action.redirect.url