Enable Google Pay for PSPs

Commerce Cloud Digital will provide the API interface and will work directly with key PSPs to enable Google Pay. Each PSP determines whether to support this capability.

The PSP sets up an endpoint that can accept the request from Digital. The Digital server makes a call to the PSP to enable them to authorize the payment. The PSP puts the request into a format that they can accept, if necessary. The PSP returns the response in the correct format to the Digital server.

Alternatively, PSPs can use custom code in a cartridge.

Each PSP determines which integration method (standard API or updated cartridge) they wish to support.

To handle Google Pay payments, the merchant sends a request to the PSP. The PSP handles the request, and returns a response and an HTTPS status.

Google Pay Request

In the request for authorization from the PSP, the following is passed. For Google Pay, the merchant should request only the fields that are required to process the transaction.

Note: The addition of properties to the available properties doesn't require you to update your implementation of Google Pay; however, if there are changes to any existing properties you must update your Google Pay implementation.
Property Type Required Notes Description Digital Mapping
_v string enumeration required Only "1" currently supported Digital request document version number  
merchant_account_id string required 256 characters maximum PSP merchant account identifier configuration data
session_id string required 256 characters maximum Digital unique shopper session ID session.sessionID
order_no string required 256 characters maximum Digital storefront order number order.orderNo
payment.payment_id hex encoded string required 28 characters maximum Digital unique payment ID paymentTransaction.UUID
payment.type string enumeration required   The type of payment to authorize  
payment.amount number required between 1 and 999999999999 Amount to auth in cents or equivalent minor unit paymentTransaction.amount.value * 10 ^ currency.defaultFractionDigits
payment.currency string required 3 characters   paymentTransaction.amount.currency
payment.token base64 encoded string required   Google Pay payment token not stored on Digital
client.ip_address string   40 characters maximum IP address of shopper browser request.httpRemoteAddress
client.user_agent string   2000 characters maximum User agent of shopper browser request.httpUserAgent
client.accept_header string   2000 characters maximum Accept header of shopper browser request.httpHeaders.accept
customer_info.customer_no string   256 characters maximum Digital shopper customer number order.customerNo
customer_info.email string   256 characters maximum Digital shopper email address order.customerEmail
customer_info.customer_name string   256 characters maximum Digital shopper name order.customerName
shipping_address.first_name string   256 characters maximum Google Pay provided shipping contact name order.defaultShipment.shippingAddress.firstName
shipping_address.last_name string   256 characters maximum Google Pay provided shipping contact name order.defaultShipment.shippingAddress.lastName
shipping_address.address1 string   256 characters maximum Google Pay provided shipping contact street address order.defaultShipment.shippingAddress.address1
shipping_address.city string   256 characters maximum Google Pay provided shipping contact city order.defaultShipment.shippingAddress.city
shipping_address.state_code string   256 characters maximum Google Pay provided shipping contact state order.defaultShipment.shippingAddress.stateCode
shipping_address.postal_code string   256 characters maximum Google Pay provided shipping contact postal code order.defaultShipment.shippingAddress.postalCode
shipping_address.country_code string   256 characters maximum Google Pay provided shipping contact country order.defaultShipment.shippingAddress.countryCode
billing_address.first_name string   256 characters maximum Google Pay provided billing contact name order.billingAddress.firstName
billing_address.last_name string   256 characters maximum Google Pay provided billing contact name order.billing Address.lastName
billing_address.address1 string   256 characters maximum Google Pay provided billing contact street address order.billing Address.address1
billing_address.city string   256 characters maximum Google Pay provided billing contact city order.billing Address.city
billing_address.state_code string   256 characters maximum Google Pay provided billing contact state order.billing Address.stateCode
billing_address.postal_code string   256 characters maximum Google Pay provided billing contact postal code order.billing Address.postalCode
billing_address.country_code string   256 characters maximum Google Pay provided billing contact country order.billing Address.countryCode

Response

The response is as follows:

Property Description Digital Mapping Notes
_v Digital response document version number    
transaction_id PSP unique transaction identifier paymentTransaction.transactionID  
status Enum of possible logical statuses order.paymentStatus Possible values are:
  • authorized (HTTP 200)
  • refused (HTTP 200)
  • error (HTTP not 200)
custom Contains custom data.
reason_code Enum of possible reasons for status   Logged on the Digital side For "refused" or "error" status
message Optional detail message   Logged on the Digital side

A sample response for authorization appears as follows:

HTTP 200
{
    "_v" : "1",
    "transaction_id" : "8989127187123781",
    "status" : "authorized"
}     

A sample response for refusal appears as follows:

HTTP 200
{
    "_v" : "1",
    "transaction_id" : "7123781898912718",
    "status" : "refused",
    "reason_code" : "declined"
}  

A sample response for an error appears as follows:

HTTP 400
{
    "_v" : "1",
    "status" : "error",
    "reason_code" : "invalid",
    "message" : "Missing required field: payment.token.payment_data"
}

A sample response that includes customization appears as follows:

{
    "_v" : "1",
    "transaction_id" : "8989127187123781",
    "status" : "authorized",
    "custom" : {
        "auth_code" : 1,
        "card_type" : "Visa",
        "masked_number" : "XXXX-XXXX-XXXX-1111",
        "fraud" : {
            "score" : 51,
            "status" : "REVIEW"
        }
    }
}    

HTTPS Statuses

The HTTPS statuses include:

Status Description Notes Example Cases
200 OK Request handled normally Possible statuses are:
  • authorized
  • refused

Omit message property

Successful authorization

Over credit limit

Insufficient funds

Fraud suspected

3xx Redirects Digital will follow redirects PSP should avoid in practice PSP operations need
400 Bad Request Request could not be handled Error status only

Malformed document

Missing required property, including merchant account identifier

Invalid property value

401 Unauthorized Request was not authorized Unauthorized HTTP request, not unauthorized payment

Authorization: Basic header missing

Authorization: Basic header not authorized

403 Forbidden Credentials are not permitted access Need correct PSP credentials

Authorization: Basic header authorized but not permitted use of this API

Merchant account identifier not permitted use of this API

404 Not Found Incorrect URL   Digital bug or configuration error
405 Method Not Allowed Incorrect HTTP method used Should always be POST Digital bug
500 Internal Server Error Unknown error on PSP side Digital will retry at least once PSP bug

Reason Codes

Code Status Notes
parse error 400 Bad Request responses
invalid error 400 Bad Request responses

Include message property if possible

billing_address refused Invalid billing postal address
shipping_address refused Invalid shipping postal address
shipping_contact refused Invalid shipping contact
pin_required refused PIN required
pin_incorrect refused PIN incorrect
pin_lockout refused PIN lockout
declined refused All other declined transactions
fraud refused All fraud related refusals
canceled refused All canceled transactions

Related Links

Google Pay

Google Pay Process

Google Pay Supported Hardware

Google Pay Supported Locales

Enable Google Pay in Your Storefront

Configuring Google Pay in Business Manager

Google Pay Button Injection

Enable Google Pay Using a Cartridge

Google Pay Payment Authorization

Google Pay Integration into Digital Processes