Payment Request

The final step in Google Pay Direct is to send the Google Pay Token to DNA as part of a Payment Request. A full range of fields available in this request can be seen here however for an Google Pay only request, please see the following example:

Payment Request Code Example

"auth": {
"access_token": "S3zz29FZM!UN1OkArVpks89l7-nES0IW4QplhLcwuVJ9fstysIn6vwOa$7WDIHGV",
"expires_in": 7200,
"refresh_token": "tgIfmoulVaWsJia=Qzv-gt038p*JCWvTdaf8Dz9NOBBS8.2k79dG3j-5vJLbGGi_",
"scope": "payment integration_hosted integration_embedded integration_seamless",
"token_type": "Bearer"
"currency": "GBP",
"description": "Car Service",
"paymentSettings": {
"returnUrl": "",
"failureReturnUrl": "",
"callbackUrl": "",
"failureCallbackUrl": "https://testmerchant/order/1123/fail",
"terminalId": "8911a14f-61a3-4449-a1c1-7a314ee5774c"
"customerDetails": {
"accountDetails": {
"accountId": "uuid000001"
"billingAddress": {
"firstName": "John",
"lastName": "Doe",
"addressLine1": "Fulham Rd",
"postalCode": "SW6 1HS",
"city": "London",
"country": "GB"
"email": "",
"invoiceId": "1639037527510",
"amount": 24,
"paymentMethod": "googlepay",
"cardDetails": {
"cryptogram": "{\"signature\":\"MEYCIQD+O+UV9ft619UUNoWvIWT4mLAgrgGQXYFK2IIGOmLLzgIhAJciGUvVI2eHadA44zR48LQqMFnN7t+sI3h67nqCj306\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIyLNgkZZbiiKMV7JEXlSC7y93PBSSPPqkICJv6dDRFcZQREvCwOn++1y7GAiTGA+DZHfi+KmaCiAaalEamipKw\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1639711023495\\\"}\",\"signatures\":[\"MEYCIQCXGvRFL9LidQD9YnrwyN9D7GUUbaKg7v9+U3KmDTyR/wIhANIkwo7qzKgR2V2F2gj5/1KByDRhAgle5Q2Lw/35iUkV\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"UbvBAK7r+aSGjsuncFTDESEoRtyoBGAvLfGNFyIhNYfCgDV7yhtnaFMNs6eXSh2medC1rWTtnn9geI33xvad4MePO/wJ2RswFwMTYPc1AosEO+mJ1eYUq6D9DR1Uf/ZZL5qaxVvk+xmIKhKcGv8IVbwzok+aFoHtaYkRrqbJDck+iCgRkFxjxvsUbpReBX8gu7hrYf2/n1/ebNjf0rvjkjfGBNelWCGVxJzgf7eJS5GGlRcvJl7IqDTw5XDEuRm4EBzkDgTpLMSVRRtyafaLf12BJa6qiMqKFEVRYnbCj2rnq9W9TpurCBbNNAQVsiF5QEfliV98DXbfRlO4JlnFy9WlE2rMzi4g2Vz2KLE4hSzO9EsL0UcUGvUEZYycnqNRCwg7FX8l0uw5qBx7izv1i1oIA3ywExNRjx6AXmYiow2nL1pAGFjzl2dCj4P/VZ5W/7g/9bjVIjUWOi1AFcbOGK2zLaiSF2C9QjN0z0a4iwFeDzQ93IPLJYlt+bEdQNw6LIGKtZWEE54J3IJvaLfKwFVwb7AtQDGyrKDmNTPOkOfNW+TfY8uesqu3JNDYL/wQv9Rk1wZiVtgzIuFxVHwsaM6w4BJ25P9Wz7FFcp3ZIY/mHkM\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BPpWoZzgZ+meT+6dRs1yAdCwJg7Rh/JcktbNkUcncptxQOFcUXy83KCcp1/on3TJYolyD0hKgSLOMJQkAtblnZE\\\\u003d\\\",\\\"tag\\\":\\\"qD/WuLmyw3nTr8trLSA+lEQgum/e7SXOm1mEocfPxs8\\\\u003d\\\"}\"}",
"cardholderName": "John Doe"

Payment Request

Most of these fields are documented elsewhere, however the key new components of this request are in the table below.

Payment Request
Field NameStateData TypeDescription
paymentMethodMandatoryStringThis must be set to googlepay
cardDetailsMandatoryObjectSee the cardDetails table.


Card Details
Field NameStateData TypeDescription
cryptogramMandatoryObjectThe cryptogram contains the token Object ONLY.

This contains the data received from Google in earlier steps. It should be passed in as shown in the example above.
cardholderNameOptionalStringThe name of the shopper.

Payment Response Code Example

You will receive a response at the returnUrl specified in the paymentSettings block above and as documented in the Ecommerce section.

Google Pay Direct Response example
"accountId": "uuid000001",
"amount": 24,
"authCode": "802258",
"authDateTimeUTC": "2021-12-09T08:12:32.003851795Z",
"avsHouseNumberResult": "Not Checked",
"avsPostcodeResult": "Not Checked",
"cardExpiryDate": "12/26",
"cardPanStarred": "***************1111",
"cardSchemeId": 11,
"cardSchemeName": "VISA",
"cardTokenId": "3UGTOmzrP+Y8onM5wsQCc2eIjeZDpoBKqP3Mem80Re0fMQ==",
"cardholderName": "John Doe",
"cscResult": "Not Set",
"currency": "GBP",
"errorCode": 0,
"id": "96eec0f7-f95e-42c1-b8d0-261f7365b0b9",
"invoiceId": "1639037527510",
"message": "Completed successfully",
"payerAuthenticationResult": "-/-",
"paymentMethod": "googlepay",
"responseCode": "00",
"rrn": "e70f5f64-ed7b-42a6-9a9a-e6cfcc5b3a3b",
"settled": false,
"status": "succeeded",
"success": true

Payment Response Fields

These fields are documented below. None of these are specific to Google Pay.

Field NameData TypeDescription
accountIdStringUnique reference for the store processing the transaction, as passed in the request.
amountDecimalTotal amount of the order including decimal places where applicable. 'Whole' amounts (e.g. '1') on a GBP account represents £1.00.
authCodeStringAuthorisation code issued for the transaction.
authDateTimeUTCStringDate and time of when the transaction was authorised with the acquirer.
avsHouseNumberResultStringConfirms the result of the Address Verification System (AVS) house number check.
NotSetHouse Number check was not requested.
NotCheckedHouse Number could not be checked.
MatchedHouse Number matched.
NotMatchedHouse Number did not match.
PartialMatchHouse Number partially matched.
avsPostcodeResultStringConfirms the result of the Address Verification System (AVS) post code check.
NotSetPost Code check was not requested.
NotCheckedPost Code could not be checked.
MatchedPost Code matched.
NotMatchedPost Code did not match.
PartialMatchPost Code partially matched.
cardExpiryDateStringExpiry date for the card used in the transaction. Provided in the “MM/YY” format.
cardholderNameStringCardholder name as entered on the payment form.

Country where the card was issued. This information will only be returned when this can be determined.

This information is subject to change and as such we recommend only using this data as a guide.

cardPanStarredStringStarred PAN for the card used in the transaction - for example ************9909.
cardSchemeIdIntegerOptomany Card Scheme ID for the card used in the transaction.
cardSchemeNameStringName of the Card scheme for the card used in the transaction.
cardTokenIdStringOptomany Token ID for the card presented.
charitableDonationDecimalAmount of any charitable donation awarded by the consumer during the transaction process.
cscResultStringConfirms the result of the Card Security Code (CSC) validation check.
NotSetCSC check was not requested.
NotCheckedCSC could not be checked.
MatchedCSC matched.
NotMatchedCSC did not match.

Currency of the transaction.

GBPPound Sterling
errorCodeIntegerProvides additional detail should an error have occurred with the transaction.
0No error occurred.
A full list of Error Codes can be found here.

Unique transaction ID.

This ID should be stored as it is required for later transaction actions.

invoiceIdStringOrder/invoice/transaction/basket number generated by the host website, as passed in the request.
messageStringMessage confirming the processing result of the transaction request.
optomanyTerminalIdStringOptomany Terminal ID used when authorising the transaction.



Result of the Payer Authentication process provided in the following formatenrollment result/authentication result

The possible results are detailed below.






Not enrolled.


Not authenticated.






Unable to check.


Unable to authenticate.


Challenge Required*


Authentication Rejected*


Not Attempted


Not Attempted

* 3D Secure v2 Only

As an example an enrolled card which has been fully authenticated will be returned as Y/Y


Payment method used for the transaction.

googlepayGoogle Pay
responseCodeStringReturned by the acquirer detailing the result of the transaction. A full list of Response Codes can be found here.
rrnStringUnique reference allocated by Optomany to the authorisation.
schemeReferenceDataStringReference data from the card scheme, returned in the authorisation response.

This data may not always be present.
settledBooleanConfirms whether the transaction has been submitted for overnight settlement.
trueTransaction settled.
falseTransaction not settled.
signatureStringSignature generated for the transaction, for more information on this see Validating the Signature.
successBooleanConfirms whether the transaction has been successful.
trueTransaction approved.
falseTransaction not approved.