Google Pay™

Learn how to accept Google Pay™ through EGMS.

Overview

The Google Pay API enables fast, simple checkout within your app/website, and gives you convenient access to hundreds of millions of cards saved to Google Accounts worldwide.

Supported payment card networks

VISA

MASTERCARD

How it works

Android

When a user taps the Google Pay payment button, they see a payment sheet that displays the payment methods saved to their Google Account, as well as optional fields such as a shipping address field. Users can quickly select a payment method, add an optional shipping address, or add new information.

The payment flow is as follows:

  1. The user taps the Google Pay payment button and sees a payment sheet with a list of supported payment methods.
  2. The user selects a payment method and Google Pay securely returns a payment token for that method to your app.
  3. Your app submits the payment token, along with details about the purchase, to its backend.
  4. To execute the payment, the backend processes the purchase and sends the payment token to the payment service provider.

Web

Web mode is compatible with iOS devices, Android devices, and PC browser devices.

When a user clicks the Google Pay payment button, they see a payment sheet that displays the payment methods saved to their Google Account, as well as optional fields such as a shipping address field. Users can quickly select a payment method, add an optional shipping address, or add new information.

The payment flow is as follows:

  1. The user clicks the Google Pay payment button and sees a payment sheet with a list of supported payment methods.
  2. The user selects a payment method and Google Pay securely returns a payment token for that method to your website.
  3. Your website submits the payment token, along with details about the purchase, to its backend.
  4. To execute the payment, the backend processes the purchase and sends the payment token to the payment service provider.

Get started

Terms and conditions

By using Google Pay, the merchant needs to review and adhere to Google Pay API Terms of Service and Acceptable Use Policy.

Set up a Google Account

The merchant needs to register on Google Pay and Wallet Console. After registering successfully, Google will generate a Merchant ID.

1. Enter the merchant name

2. Configure Business Profile

3. View the Merchant ID

How to design the UI style?

Once you've integrated the Google Pay API, you need to get approval for all of the places where you display or reference Google Pay within your UI in order to gain production access.

Android

These guidelines help you implement Google Pay within your apps. Please click here.

Web

The following guidelines show how to include the Google Pay brand within your websites. Please click here.

Integrate with Google Pay API

Android

Please follow the Android tutorial

About some key parameters, please follow the following descriptions.

Step 2: Request a payment token for your payment provider

private static JSONObject getGatewayTokenizationSpecification() throws JSONException {
    return new JSONObject() {{
      put("type", "PAYMENT_GATEWAY");
      put("parameters", new JSONObject() {{
        put("gateway", "cardinfolink");
        put("gatewayMerchantId", "{sid that is generated by EVONET}");
      }});
    }};
  }

📘

Note

If the acquirer's Google Pay Payment Gateway License is EVO Cloud, then the gateway is set as 'cardinfolink'. If other, then set as the acquirer's gatewayID.

Step 3: Define supported payment card networks

private static JSONArray getAllowedCardNetworks() {
  return new JSONArray()
      .put("MASTERCARD")
      .put("VISA");
}

📘

Note

Now EVONET supported payment card networks are VISA and MASTERCARD. The merchant can configure it according to the payment brands under the Google Pay Payment Brand.

Step 7: Create a PaymentDataRequest object

private static JSONObject getMerchantInfo() throws JSONException {
    return new JSONObject().put("merchantId", "{Merchant ID that is generated by Google}");
  }

Step 9: Handle the response object

public void onActivityResult(int requestCode, int resultCode, Intent data) {
    switch (requestCode) {
      // value passed in AutoResolveHelper
      case LOAD_PAYMENT_DATA_REQUEST_CODE:
        switch (resultCode) {

          case Activity.RESULT_OK:
            PaymentData paymentData = PaymentData.getFromIntent(data);
            handlePaymentSuccess(paymentData);
                   //Make a Payment
            break;

          case Activity.RESULT_CANCELED:
            // The user cancelled the payment attempt
            break;

          case AutoResolveHelper.RESULT_ERROR:
            Status status = AutoResolveHelper.getStatusFromIntent(data);
            handleError(status.getStatusCode());
            break;
        }

        // Re-enables the Google Pay payment button.
        googlePayButton.setClickable(true);
    }
  }

Web

Please follow the web tutorial

About some key parameters, please follow the following descriptions.

Step 2: Request a payment token for your payment provider

const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    'gateway': 'cardinfolink',
    'gatewayMerchantId': '{sid that is generated by EVONET}'
  }
};

📘

Note

If the acquirer's Google Pay Payment Gateway License is EVO Cloud, then the gateway is set as 'cardinfolink'. If other, then set as the acquirer's gatewayID.

Step 3: Define supported payment card networks

const allowedCardNetworks = [ "MASTERCARD", "VISA"];

📘

Note

Now EVONET supported payment card networks are VISA and MASTERCARD. The merchant can configure it according to the payment brands under the Google Pay Payment Brand.

Step 8: Create a PaymentDataRequest object

paymentDataRequest.merchantInfo = {
  merchantName: '{Merchant Name}'
  merchantId: '{Merchant ID that is generated by Google}'
};

Step 9: Register an event handler for user gestures

paymentsClient.loadPaymentData(paymentDataRequest).then(function(paymentData){
  // if using gateway tokenization, pass this token without modification
  paymentToken = paymentData.paymentMethodData.tokenizationData.token;
// Make a Payment

}).catch(function(err){
  // show error in developer console for debugging
  console.error(err);
});

Make a Payment

The merchant should call the POST Payment API. Please refer to the following field descriptions.

Post Payment Key Parameters Description

Field NameTypeField DefinitionPOST Payment RequestPOST Payment ResponsePOST PaymentMethod RequestPOST PaymentMethod ResponseSample Value
body.paymentMethod.typeString(32)This field is to indicate the type of payment method for this transaction.MGooglePay
body.paymentMethod.googlePayObjectThis field is to send Google Pay-related information for this transaction.M
body.paymentMethod.googlePay.encryptedDataString(5000)The Google Pay API returns payment methods in a signed and encrypted PaymentMethodToken payload. The returned payment methods are either cards that consist of PAN, or tokenized cards that consist of device PAN and cryptograms.
The message returned by Google in the PaymentData response is a UTF-8 encoded, serialized JSON object.
M
body.paymentMethod.GooglePay.paymentBrandString(32)This is used to indicate the card scheme which the card belongs to.MGet value from paymentData.paymentMethodData.info.cardNetwork
Enums of paymentData.paymentMethodData.info.cardNetwork are Visa and Mastercard
body.paymentMethod.GooglePay.tokenizeBooleanThis is used for merchant to indicate whether need to generate token after Payment completed.OSet as true
body.paymentMethod.GooglePay.tokenValidDaysString(3)The validity days defined by merchant for the User token.O
body.paymentMethod.cardObjectThis field is to send card related information for this transactionOOOO
body.paymentMethod.card.first6NoStringThe first 6 digits of the card number.MM
body.paymentMethod.card.last4NoStringThe last 4 digits of the card number,MM
body.paymentMethod.card.paymentBrandStringThis is used to indicate the card scheme which the card belongs to.OO
body.paymentMethod.tokenObjectThis is used to send token related Information for this transaction.OOO
body.paymentMethod.token.valueStringThe token value.MMM
body.paymentMethod.token.first6NoStringThe first 6 digits of the tokenized cards that consist of device PAN.
body.paymentMethod.token.last4NoStringThe last 4 digits of the tokenized cards consist of device PAN.

Sample Message without 3DS

Request

POST https://hkg-online-uat.everonet.com/g2/v1/payment/mer/S003992/evo.e-commerce.payment
{
    "allowAuthentication": false,
    "captureAfterHours":"0",
    "returnURL": "https://www.xunliandata.com",
    "webhook":"https://51c2d4c8-4112-4118-b15d-396ce0400c14.mock.pstmn.io",
    "metadata": "carol-meta data",
    "merchantTransInfo": {
        "merchantTransID": "T307211689914030690",
        "merchantOrderReference": "carolTest",
        "merchantTransTime": "2023-07-21T12:33:50+08:00"
    },
    "transAmount": {
        "currency": "HKD",
        "value": "200"
    },
    "paymentMethod": {
        "type": "GooglePay",
        "googlePay": {
            "encryptedData":"{\"signature\":\"MEUCIDwWDR8IOl4eGUS5cVokG5lIG3uUatONR7dJxSySMG9RAiEA9Kz4F2k9TFZaVtaknzrrJgN+gmkcwJJVmDneqIfW1Bw\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEH+UC+nhqHcudLgEbRSkOfE1TbmKm/yPkpdgmV1euz0Era+clJple5fwT7bnuFIOxjkZNAhKgNPdJGqi11vsWJw\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1690592069337\\\"}\",\"signatures\":[\"MEQCIDdQFld3dOHL5Qy/GYfkYfWICpD2dP5znGMWNIAU5/NxAiArykpIE1ttivXR4GcW/jxYGAAxqCVvrT8vHV0maoz4DA\\u003d\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"R8I0i/zk8+B85y9KMYvsDhEA2inavbpyumQgDESeHOnrzokrUm2LdaoAnz1NbAcCNHrITz4e+NRRMoTxjSZGyX1Tg17cTqy2cBEUpTlo7BLGLfRXV5gEKxElvpNy3RYMYzSve3ava1v7Ut/mrQVvcM1SsISgp7qgRIytC2JiMlKt1JWGD6VfiDVjTvJzl0GFcfnAFBjAf+fFxgeJKwkB02Rrbd2AQFNgpHbn/4AmPBZgEnpakJS3WVkX9xIy+XAxurmSRnYDGaqJdL1x5NYpXH1HM4s7e0o8XIT8ECEbCXTIbNPz7kg/yrZejpfPmmKC7KREkRniz9SSsG3hS7OFfRBUrkVwhvWyYkMM8P8iYwZvukAqLTPlcaE99RU7w+Ad7XVPvcgk7XX8rZypUf9gElKM7OYB26K1P60ISarvYrJcS01xj6600oGyNl2qKw48xHW4fxpV7QMEnLqRwYCghPE4PJVUOTuvMJEqGaqTh04Tp+RtJuXo7kuqhRB1X/SXt1W1PumHoyLWSoMXClfJp8MPCWMbuFFq31h+aLoccGgNTjc6JC15erMqdpW19+fzNuhNwt+h8y06NeY\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BFEysZPe9xxyxxoMriiwaR/geYSLtGm1lvtoIr+w4cFVuJrEsAlvyDfW5IX1r3CnN+lr384DsacvHLIvF18JhJ8\\\\u003d\\\",\\\"tag\\\":\\\"bu5Fy2o5yCIboi8vZu6lu77ahD97xcyp9fIqbPWsEqg\\\\u003d\\\"}\"}",
            "paymentBrand":"Mastercard"
        }
    },
    "authentication":{
        "type":"threeDSPage",
        "browserInfo":{
            "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
            "javaEnabled": false,
            "language": "en",
            "screenHeight": "900",
            "screenWidth": "1440",
            "timeZoneOffset": "-480",
            "colorDepth": "24",
            "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
        }
    },
    "transInitiator": {
        "userCreateIP": "fill in buyer ip",
        "platform": "WEB"
    },
    "userInfo": {
        "reference":"fill in buyer id in your system",
        "email":"[email protected]",
        "name":"fill in buyer name"
    },
    "billingAddress": {
        "city":"city",
        "country":"country",
        "addressLine1":"addressLine1",
        "addressLine2":"addressLine2",
        "addressLine3":"addressLine3",
        "postalCode":"postalCode",
        "stateOrProvince":"stateOrProvince"
    },
        "tradeInfo": {
        "tradeType": "Sale of goods",
        "goodsName": "Macbook 12 inch M3 8G 256G SSD^1|Apple iPad Pro 11 inch^1",
        "totalQuantity": "2"
    }
}

Response

{
    "metadata": "carol-meta data",
    "payment": {
        "billingAmount": {
            "currency": "USD"
        },
        "evoTransInfo": {
            "evoTransID": "d4c36576004c4c86a32e179ad84f4f44",
            "evoTransTime": "2023-07-21T04:33:50Z",
            "retrievalReferenceNum": "320212351814",
            "traceNum": "351814"
        },
        "merchantTransInfo": {
            "merchantOrderReference": "carolTest",
            "merchantTransID": "T307211689914030690",
            "merchantTransTime": "2023-07-21T12:33:50+08:00"
        },
        "pspTransInfo": {
            "authorizationCode": "553434",
            "pspTransID": "MCS0003IS0721  ",
            "pspTransTime": "2023-07-21T04:33:50Z"
        },
        "status": "Captured",
        "transAmount": {
            "currency": "HKD",
            "value": "200.00"
        }
    },
    "paymentMethod": {
        "card": {
            "first6No": "555555",
            "fundingType": "credit",
            "issuingCountry": "THA",
            "last4No": "4444",
            "paymentBrand": "Mastercard"
        }
    },
    "pspData": {
        "merchantID": "100000000000002",
        "name": "Mastercard"
    },
    "result": {
        "code": "S0000",
        "message": "Success",
        "pspMessage": "Approved or completed successfully",
        "pspResponseCode": "00"
    }
}

Sample Message with 3DS

Request

POST https://hkg-online-uat.everonet.com/g2/v1/payment/mer/S003992/evo.e-commerce.payment
{
    "authenticationOnly": false,
    "captureAfterHours":"0",
    "returnURL": "https://www.baidu.com",
    "webhook": "https://e3d313d3-99ca-4b93-b1b0-4238aab7cd95.mock.pstmn.io",
    "metadata": "meta data",
    "merchantTransInfo": {
        "merchantTransID": "T307191689734475508",
        "merchantOrderReference": "carolTest",
        "merchantTransTime": "2023-07-19T10:41:15+08:00"
    },
    "storeInfo": {
        "mcc": "0742"
    },
    "transAmount": {
        "currency": "USD",
        "value": "100"
    },
    "paymentMethod": {
        "type": "GooglePay",
        "googlePay": {
            "encryptedData":"{\"signature\":\"MEYCIQDbxAKRC/TX7tpOZ2rUUyEUDPvgq3QMBDSnH96FA+aJYwIhAN16MBEWqTIhz+S9NEn9RHz+MAmlo/n1Hs61pmlAEg7H\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFrpXPK5OdJq7w2PUbS2qB5Eyz7ZfI6DqjLEPzDUbadBP5MHE8clBVmsuMIqSf1b7J5rn8wa6ET0l5BGY1KE9iw\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1690408352582\\\"}\",\"signatures\":[\"MEUCIQD3rISm1JBPKzezwaBDmgjY3kvB8MY2L5nxcUbcY6U8fQIgA0/Ro/jft1gjuPtL2Amxj5+tW5FFat0rgscrjHBXRh0\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"RjIbIhewkkOEwlHiSMwWPCLDFRmffkH0H39kCKmCZsuOV2OpXftqO4RlapApS9kfdVMfSWtPVzPZP4AMPUDE1RgWxeCTCyVwP1rnz9RtQY+ihDi+brdlGq2N2mjXq+HCkCJrCPs4fdQ04BTdJFDjcZiRieDkEoNAQFbEHIcC2te0VB+zOwjfl2T7ss7UmRNZv/7TCur17ZfDGU0bLsr98ov5ubfNHHJox3ufUjoF2zbuTONesbR1CCql8oR429e+5CP0gfasGlhnwIiQlrr/zfJ4GoIoCV0n1ENa+OPJodjdVW+w9B28EFmm0bZCpRU9r3mNPxQusipqubTdVwrgV71jabge6IbnvpA3S7o0tuEioEV0g2n4mu5hw3UVU/Zxi7Oj0eP9tBcPV4UPgtXn3csr1YVQcMfnfEBcWy+jtfGY6Ykaj0dAe1DZUlOuNkXlnj1GgffYDFM0x6Xr45C0phcLhmR4MzXfLSGxKv+bJbNqWd4ln0uiEyGPIkvqlfka4/ftAuZSKfx0keP/fpJcHDAC7SDlJkz6yIGfMstAFOsq/zNfkRy4WFTw/L+iP+SUgwROJOxuqEPI484\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BAbdLbioAtWB+x0i6QBxVhK8CpZ2qi/a6zVsyRDHZ3KVzsIiBfiATPKpaVBPLo1eMoAO1yWiwZ8nWvIYBvq4zdQ\\\\u003d\\\",\\\"tag\\\":\\\"wacQB6of8wYKvn8i2UgMD+rxoxf2qsuN26b8zr2uLqw\\\\u003d\\\"}\"}",
            "paymentBrand":"Visa"
        }
    },
    "authentication": {
        "type": "threeDSPage",
        "browserInfo": {
            "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
            "colorDepth": "24",
            "javaEnabled": false,
            "language": "en",
            "screenHeight": "900",
            "screenWidth": "1440",
            "timeZoneOffset": "-480",
            "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
        }
    },
    "transInitiator": {
        "platform": "WEB",
        "deviceType": "",
        "osVersion": ""
    }
}

Response

{
    "action": {
        "threeDSData": {
            "method": "GET",
            "url": "https://hkg-counter-uat.everonet.com/3ds?dGhyZWVEU1BzcD1ISVRSVVNUJmluc0NvZGU9OTA0NTE5MDAmb3JkZXJOdW09VDMwNzE5MTY4OTczNDQ3NTUwOCZzdG9yZU51bT1TMDAzOTkyJnRocmVlZHNJbnRlZ3JhdG9yT2lkPTExNTkwNzYmdGhyZWVEU0F1dGhVUkw9YUhSMGNITTZMeTl6YVhRdE0yUnpjeTFqY0hoNUxtaHBkSEoxYzNSd1lYa3VZMjl0TG5SM0wzUm9jbVZsWkhNdGFXNTBaV2R5WVhSdmNpOWhkWFJvTHpJdU1TNHcmcmV0dXJuVXJsPWFIUjBjSE02THk5M2QzY3VZbUZwWkhVdVkyOXQ="
        },
        "type": "threeDSRedirect"
    },
    "authentication": {
        "type": "threeDSPage"
    },
    "metadata": "meta data",
    "payment": {
        "evoTransInfo": {
            "evoTransID": "275bf8af82c049c3a0fcd4c961601d61",
            "evoTransTime": "2023-07-19T02:41:15Z",
            "retrievalReferenceNum": "320010346639",
            "traceNum": "346639"
        },
        "merchantTransInfo": {
            "merchantOrderReference": "carolTest",
            "merchantTransID": "T307191689734475508",
            "merchantTransTime": "2023-07-19T10:41:15+08:00"
        },
        "status": "Verifying",
        "transAmount": {
            "currency": "USD",
            "value": "100.00"
        }
    },
    "paymentMethod": {
        "card": {
            "first6No": "411111",
            "fundingType": "debit",
            "issuingCountry": "USA",
            "last4No": "1111",
            "paymentBrand": "Visa"
        }
    },
    "pspData": {
        "merchantID": "1000001",
        "name": "Visa"
    },
    "result": {
        "code": "S0000",
        "message": "Success"
    }
}

Do the 3DS Verification

GET https://hkg-counter-uat.everonet.com/3ds?dGhyZWVEU1BzcD1ISVRSVVNUJmluc0NvZGU9OTA0NTE5MDAmb3JkZXJOdW09VDMwNzE5MTY4OTczNDQ3NTUwOCZzdG9yZU51bT1TMDAzOTkyJnRocmVlZHNJbnRlZ3JhdG9yT2lkPTExNTkwNzYmdGhyZWVEU0F1dGhVUkw9YUhSMGNITTZMeTl6YVhRdE0yUnpjeTFqY0hoNUxtaHBkSEoxYzNSd1lYa3VZMjl0TG5SM0wzUm9jbVZsWkhNdGFXNTBaV2R5WVhSdmNpOWhkWFJvTHpJdU1TNHcmcmV0dXJuVXJsPWFIUjBjSE02THk5M2QzY3VZbUZwWkhVdVkyOXQ=

Recurring Payment

Post Payment/ Post Payment Method Key Parameters Description

Field NameTypeField DefinitionPOST Payment RequestPOST Payment ResponsePOST PaymentMethod RequestPOST PaymentMethod ResponseSample Value
body.paymentMethod.GooglePay.tokenizeBooleanThis is used for merchant to indicate whether need to generate token after Payment completed.OSet as true
body.paymentMethod.GooglePay.tokenValidDaysString(3)The validity days defined by merchant for the User token.Ocan leave empty
body.paymentMethod.tokenObjectThis is used to send token related Information for this transaction.OOO
body.paymentMethod.token.valueStringThe token value.MMM
body.paymentMethod.token.first6NoStringThe first 6 digits of the tokenized cards that consist of device PAN.
body.paymentMethod.token.last4NoStringThe last 4 digits of the tokenized cards consist of device PAN.
body.paymentMethod.isFirstCITTxnBooleanFor special scenarios, ASI can be used as the first CIT for Recurring.OO
body.paymentMethod.recurringProcessingModelString(20)This is to indicate whether a transaction is recurring or COF transaction.OO
body.paymentMethod.recurringReferenceString(64)The recurringReference that uniquely identifies the recurring transaction. Merchant will needs this to make future payments for the user.OOO

Mode1

Create a gatewayToken to make recurring payments

Call the POST Payment API to bind the card, make the first payment, and generate the gatewayToken and recurringReference. The first payment may execute the 3DS.

Request

POST https://hkg-online-uat.everonet.com/g2/v1/payment/mer/S003992/evo.e-commerce.payment
{
    "allowAuthentication": false,
    "authenticationOnly": false,
     "captureAfterHours":"0",
    "returnURL": "https://www.baidu.com",
    "metadata": "meta data",
    "merchantTransInfo": {
        "merchantTransID": "T307201689841309420",
        "merchantOrderReference": "asdfghjkl",
        "merchantTransTime": "2023-07-20T16:21:49+08:00"
    },
    "storeInfo": {
        "mcc": "0742"
    },
    "transAmount": {
        "currency": "HKD",
        "value": "300"
    },
    "paymentMethod": {
        "type": "GooglePay",
         "recurringProcessingModel":"Subscription",
        "googlePay": {
            "encryptedData":"{\"signature\":\"MEUCIQD6soTSNHuSXXD+cfKh/FUjBC5Hj3U8ny3Lzfuxa3NrBgIgIozPJpMCGyhgoTzPmIfv+xBpielf+zVcCl7EkYE9+oc\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDkShvMcT+wGaFFiT8wSiOrjm6kA3mEvwrAJfp/bEWLxbqE3VHP5MKIcSHIfzr/cjhSXXEJUKiEZIq3u29c41hg\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1690477874998\\\"}\",\"signatures\":[\"MEYCIQCMKlsAtSOW2apjVvAc4Pmsk8HwAza0VO45+5zeqBBFigIhAMvKoqgoZovJtjw+fgE2bEuogIWOf0na6f1eb1lX839b\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"VmxLJ/zQ5NtMtXcwEdenK3X6XUsapc4nuuixqGgBpxU0TOXrkYUqvLNkk8KhuXb+C/MEM467PBFuI/zX/9g897XYft+6Teti+Ho8phzphuyaRSYfFgisI4+UgbRk/XtFbDXncUlHEfEdlBaXzsormhsqiYkXH2gys/AXsjFmlJCJbwXm74d5rUp9jJhWOwhf4KMCGsfPrAX1MljZjdSgqBpXYf8y4nfaCASeUZ1GrtTNEwGYRyQ/9QugZkuZqjOeYpkO9CYYbC/7q6PihF0aaDlPmW2y7kqEmYl3bupWF5H63XnoVf/B+0NNSOOg0WJECdJsHrm140C4Tl8ROnKxZigXDLC2J4nc84l1T1IPUXlm6ch0e2hvLQdenW+q1uSKXRVqR5EoaK4DGoeyF9gOvPl1HXB3pYoEytfEeFUg/e7wpifkyMKW21djjayVYeriK0cP8g+Z+95OYlGjvGPjZi+l0xe8iQDzW8eEcTvT6dnPVGRsXVk/WGtI5R9q6JvPGQaW/P5y8J9jT6+YV3k3wBhvbixg20JwT8fHf93GhY7t/JUTu8QXWpkJ/nz+jD1qrETt5JJZd+S4/ew\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BHQzbU/gd0qy2/WQps1G+A4aPvl5roeMaFbQqspm8ratbP8O7iGgCqpoOc0z/2TJ//S2q5DhlCRhbHX65y5SGCU\\\\u003d\\\",\\\"tag\\\":\\\"iP7qNaAqjXAVD4eFXPO/qGCHQPXeoe3llk9ou6B9phs\\\\u003d\\\"}\"}",
            "paymentBrand":"Visa",
            "tokenize":true,
            "tokenValidDays":"0",
            "vaultID":"S003992VaultID"
        }
    },
    "authentication": {
        "type": "threeDSPage",
        "browserInfo": {
            "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
            "colorDepth": "24",
            "javaEnabled": false,
            "language": "en",
            "screenHeight": "900",
            "screenWidth": "1440",
            "timeZoneOffset": "-480",
            "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
        }
    },
    "transInitiator": {
        "platform": "WEB",
        "deviceType": "",
        "osVersion": ""
    }
}

Response

{
    "action": {
        "threeDSData": {
            "method": "GET",
            "url": "https://hkg-counter-uat.everonet.com/3ds?dGhyZWVEU1BzcD1ISVRSVVNUJmluc0NvZGU9OTA0NTE5MDAmb3JkZXJOdW09VDMwNzIwMTY4OTg0MTMwOTQyMCZzdG9yZU51bT1TMDAzOTkyJnRocmVlZHNJbnRlZ3JhdG9yT2lkPTExNjE2ODkmdGhyZWVEU0F1dGhVUkw9YUhSMGNITTZMeTl6YVhRdE0yUnpjeTFqY0hoNUxtaHBkSEoxYzNSd1lYa3VZMjl0TG5SM0wzUm9jbVZsWkhNdGFXNTBaV2R5WVhSdmNpOWhkWFJvTHpJdU1TNHcmcmV0dXJuVXJsPWFIUjBjSE02THk5M2QzY3VZbUZwWkhVdVkyOXQ="
        },
        "type": "threeDSRedirect"
    },
    "authentication": {
        "type": "threeDSPage"
    },
    "metadata": "meta data",
    "payment": {
        "evoTransInfo": {
            "evoTransID": "7b86c2ea367d41d58234984bb07f8a8d",
            "evoTransTime": "2023-07-20T08:21:49Z",
            "retrievalReferenceNum": "320116350974",
            "traceNum": "350974"
        },
        "merchantTransInfo": {
            "merchantOrderReference": "asdfghjkl",
            "merchantTransID": "T307201689841309420",
            "merchantTransTime": "2023-07-20T16:21:49+08:00"
        },
        "status": "Verifying",
        "transAmount": {
            "currency": "HKD",
            "value": "300.00"
        }
    },
    "paymentMethod": {
        "card": {
            "first6No": "411111",
            "fundingType": "debit",
            "issuingCountry": "USA",
            "last4No": "1111",
            "paymentBrand": "Visa"
        },
        "paymentMethodVariant": "Recurring",
        "recurringReference": "recurring_9a114f123c5f42bcabd845822ee10d4a"
    },
    "pspData": {
        "merchantID": "1000001",
        "name": "Visa"
    },
    "result": {
        "code": "S0000",
        "message": "Success"
    }
}

Do the 3DS Verification

GET https://hkg-counter-uat.everonet.com/3ds?dGhyZWVEU1BzcD1ISVRSVVNUJmluc0NvZGU9OTA0NTE5MDAmb3JkZXJOdW09VDMwNzIwMTY4OTg0MTMwOTQyMCZzdG9yZU51bT1TMDAzOTkyJnRocmVlZHNJbnRlZ3JhdG9yT2lkPTExNjE2ODkmdGhyZWVEU0F1dGhVUkw9YUhSMGNITTZMeTl6YVhRdE0yUnpjeTFqY0hoNUxtaHBkSEoxYzNSd1lYa3VZMjl0TG5SM0wzUm9jbVZsWkhNdGFXNTBaV2R5WVhSdmNpOWhkWFJvTHpJdU1TNHcmcmV0dXJuVXJsPWFIUjBjSE02THk5M2QzY3VZbUZwWkhVdVkyOXQ=

Payment Notification

From Payment Notification Message to get the gatewayToken.

{
    "authentication": {
        "threeDS": {
            "mpiData": {
                "cavv": "AJkBB2NneYNBYUUyYmd5AAAAAAA=",
                "dsTransID": "638ABB87-7F3F-440C-A009-0D3482F43F14",
                "eci": "05",
                "status": "Y",
                "threeDSVersion": "2.1.0"
            }
        }
    },
    "metadata": "meta data",
    "eventCode": "Payment",
    "payment": {
        "evoTransInfo": {
            "evoTransID": "7b86c2ea367d41d58234984bb07f8a8d",
            "evoTransTime": "2023-07-20T08:21:49Z",
            "retrievalReferenceNum": "320116350974",
            "traceNum": "350974"
        },
        "merchantTransInfo": {
            "merchantOrderReference": "asdfghjkl",
            "merchantTransID": "T307201689841309420",
            "merchantTransTime": "2023-07-20T16:21:49+08:00"
        },
        "pspTransInfo": {
            "authorizationCode": "015714",
            "pspTransTime": "2023-07-20T16:21:49Z"
        },
        "status": "Captured",
        "transAmount": {
            "currency": "HKD",
            "value": "300.00"
        }
    },
    "paymentMethod": {
        "card": {
            "first6No": "411111",
            "fundingType": "debit",
            "issuingCountry": "USA",
            "last4No": "1111",
            "paymentBrand": "Visa"
        },
        "paymentMethodVariant": "Recurring",
        "recurringReference": "recurring_9a114f123c5f42bcabd845822ee10d4a",
        "token": {
            "createTime": "2023-07-20T08:21:51Z",
            "fingerprint": "e76c4fc38480588392ea549aac11dcac",
            "status": "enabled",
            "updateTime": "2023-07-20T08:22:13Z",
            "value": "pmt_26544a03f81d4e55a2f552f625101598",
            "vaultID": "S003992VaultID"
        }
    },
    "pspData": {
        "name": "Visa"
    }
}

Make a subscription payment

Call the POST Payment API to do the subsequent payments without 3DS.

Request

POST https://hkg-online-uat.everonet.com/g2/v1/payment/mer/S003992/evo.e-commerce.payment
{
   
    "returnURL": "https://51c2d4c8-4112-4118-b15d-396ce0400c14.mock.pstmn.io",
    "metadata": "meta data",
    "captureAfterHours":"0",
    "merchantTransInfo": {
        "merchantTransID": "T307201689842674397",
        "merchantOrderReference": "asdfghjkl",
        "merchantTransTime": "2023-07-20T16:44:34+08:00"
    },
    "storeInfo": {
        "mcc": "0742"
    },
    "transAmount": {
        "currency": "HKD",
        "value": "300"
    },
    "paymentMethod": {
        "type": "token",
        "recurringProcessingModel":"Subscription",
        "recurringReference": "recurring_9a114f123c5f42bcabd845822ee10d4a",
        "token": {
            "type":"gatewayToken",
            "value": "pmt_26544a03f81d4e55a2f552f625101598",
            "vaultID": "S003992VaultID"
        }
    },
    "authentication": {
        "type": "threeDSPage",
        "browserInfo": {
            "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
            "colorDepth": "24",
            "javaEnabled": false,
            "language": "en",
            "screenHeight": "900",
            "screenWidth": "1440",
            "timeZoneOffset": "-480",
            "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
        }
    },
    "transInitiator": {
        "platform": "WEB",
        "deviceType": "",
        "osVersion": ""
    }
}

Response

{
    "metadata": "meta data",
    "payment": {
        "evoTransInfo": {
            "evoTransID": "139f17255e7545f99ef5dfdecd9d79c4",
            "evoTransTime": "2023-07-20T08:44:34Z",
            "retrievalReferenceNum": "320116351045",
            "traceNum": "351045"
        },
        "merchantTransInfo": {
            "merchantOrderReference": "asdfghjkl",
            "merchantTransID": "T307201689842674397",
            "merchantTransTime": "2023-07-20T16:44:34+08:00"
        },
        "pspTransInfo": {
            "authorizationCode": "020103",
            "pspTransTime": "2023-07-20T08:44:34Z"
        },
        "status": "Captured",
        "transAmount": {
            "currency": "HKD",
            "value": "300.00"
        }
    },
    "paymentMethod": {
        "card": {
            "first6No": "411111",
            "fundingType": "debit",
            "issuingCountry": "USA",
            "last4No": "1111",
            "paymentBrand": "Visa"
        },
        "paymentMethodVariant": "Recurring",
        "recurringReference": "recurring_9a114f123c5f42bcabd845822ee10d4a",
        "token": {
            "createTime": "2023-07-20T16:21:51+08:00",
            "fingerprint": "e76c4fc38480588392ea549aac11dcac",
            "status": "enabled",
            "updateTime": "2023-07-20T16:22:13+08:00",
            "value": "pmt_26544a03f81d4e55a2f552f625101598",
            "vaultID": "S003992VaultID"
        }
    },
    "pspData": {
        "merchantID": "1000001",
        "name": "Visa"
    },
    "result": {
        "code": "S0000",
        "message": "Success",
        "pspMessage": "Successful approval/completion or V .I.P .PIN\n verification is successful",
        "pspResponseCode": "00"
    }
}

Mode2

Create a gatewayToken to make recurring payments

Call POST Payment Method API to bind card and as CIT first payment. It will generate the gatewayToken and recurringReference.

Request

POST https://hkg-online-uat.everonet.com/g2/v1/payment/mer/S003992/evo.e-commerce.paymentMethod
{
        "allowAuthentication": false,
        "returnURL": "https://portal-test.everonet.com",
        "webhook": "https://2ddc03bf-e156-476c-a09e-85b5b6d16129.mock.pstmn.io",
        "metadata": "meta data",
        "merchantTransInfo": {
                "merchantTransID": "T307211689915096977",
                "merchantOrderReference": "asdfghjkl",
                "merchantTransTime": "2023-07-21T12:51:36+08:00"
        },
        "storeInfo": {
                "mcc": "0742"
        },
        "paymentMethod": {
                "type": "GooglePay",
                "recurringProcessingModel": "Subscription",
        "isFirstCITTxn":true,
                "googlePay": {
                        "encryptedData":"{\"signature\":\"MEQCID2uwSNT/AEIU2Ow2wUqBLLSEe7pED+CjgLzHAf+iCPpAiBUvjvjfaRhXzpuG7+9b0tAm0DIIUoOsyHBSPsw1F7u1w\\u003d\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEhfddOVAaa5zJOTk4UrDv9uzWlOeK3pFZFLwvEIRjcwo4ee6fFZBcJCtMqDXKK8DvYd7/fSqqdtuuOooy1ouIvg\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1690595311621\\\"}\",\"signatures\":[\"MEQCIAXi2NNvwmgLhVR8j6ZANZ64Q0Q/+JDRKO/WZ1NA44CdAiAtHZUAn0oHZGuQHJ4Du8vF8P2zHoY50jjjeq38i+9nzg\\u003d\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"irworflYOaNp9x4v/k49VRcAa7S87SPMRsqinv6B4uTeiuAE6nDRfR6o1NwD4gzZaIiffg7hnqp0CbgHNzLoO7jHLnRMptC0T9tQPNLBHkkgb1bnZ4weMwuTSZKYVEGguQOf4hloyfAy8UvbzV2m0za3vPFSEDOkM6nmNitYCzba8Fyd7Gmf8c9dHctFrmSZkHsAxEPgImtR16skAobnrC2hUsDyGWbb1xcnh2hq8bsbQYeIhG4SctTfOmL/0zbKn1Icr+1F4l8tIKkGljhC6O2Nvckoz5bF5RptlY4visP54QYZGAgYH/gifx4JZ4PhNLjuxom2s5oXx+59KBXxwYl6TkuW9klfjBo0ayd6A80gbmNlMgk3qKc7rWPF1Bh4C/ivAFMsXuHI3uwFsbx2dQUMqpAdT1837d4XR0A4gnVlhhEOcAMbwRabuiHAcC9bvBS9I5goOFcPJCGInDcEhO9neBJnaCeqnTswtDiIm+fCl0tNfyxJAWm8v7VNaZT2WL/3pUcxcHrM6dSGlmquoMasH5cwTFHIbKDUhUzMlQIVNNNqtnLYG1aRgqZdA1iWu/PVWVSQ4okiN1HuD2cLNPHuBD4Ckx8UkiUzJDNN64jVsSB311DhfpMtcluvh3sCtoDFyjzcElae\\\",\\\"ephemeralPublicKey\\\":\\\"BNsfjNK2vzLsTVdzgozmrNH0rTdGrRYyW6NwOEVZ9NBlTsut8Qv6LdMNDVzL0QKal21G2u/wX48acidurzztTNM\\\\u003d\\\",\\\"tag\\\":\\\"y4OsWeK7jyHkTz1W9mvCrklggbGtmHUsrBY2y/E640A\\\\u003d\\\"}\"}",
                        "paymentBrand": "Mastercard",
                        "tokenValidDays": "100",
                        "tokenize": true,
                        "vaultID": "S003992VaultID"
                }
        },
        "authentication": {
                "type": "threeDSPage",
                "threeDS": {
                        "userIP": "127.0.0.1",
                        "userEmail": "[email protected]"
                },
                "browserInfo": {
                        "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
                        "colorDepth": "24",
                        "javaEnabled": false,
                        "language": "en",
                        "screenHeight": "900",
                        "screenWidth": "1440",
                        "timeZoneOffset": "-480",
                        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
                }
        },
        "transInitiator": {
                "platform": "WEB",
                "deviceType": "",
                "osVersion": ""
        }
}

Response

{
    "metadata": "meta data",
    "paymentMethod": {
        "merchantTransInfo": {
            "merchantOrderReference": "asdfghjkl",
            "merchantTransID": "T307211689915096977",
            "merchantTransTime": "2023-07-21T12:51:36+08:00"
        },
        "paymentMethodVariant": "Recurring",
        "recurringReference": "recurring_5d410a2065644cffafb4d4b623739215",
        "status": "Success",
        "token": {
            "createTime": "2023-07-21T12:51:37+08:00",
            "first6No": "520424",
            "last4No": "7840",
            "status": "enabled",
            "updateTime": "2023-07-21T12:51:37+08:00",
            "value": "pmt_b63d571ba584413cb7823234d0ee6339",
            "vaultID": "S003992VaultID"
        }
    },
    "result": {
        "code": "S0000",
        "message": "Success",
        "pspMessage": "Approved or completed successfully",
        "pspResponseCode": "00"
    }
}

Make a subscription payment

Call the POST Payment API to do the subsequent payments without 3DS.

Request

POST https://hkg-online-uat.everonet.com/g2/v1/payment/mer/S003992/evo.e-commerce.payment
{
   
    "returnURL": "https://51c2d4c8-4112-4118-b15d-396ce0400c14.mock.pstmn.io",
    "metadata": "meta data",
    "captureAfterHours":"0",
    "merchantTransInfo": {
        "merchantTransID": "T307211689915235171",
        "merchantOrderReference": "asdfghjkl",
        "merchantTransTime": "2023-07-21T12:53:55+08:00"
    },
    "storeInfo": {
        "mcc": "0742"
    },
    "transAmount": {
        "currency": "HKD",
        "value": "130"
    },
    "paymentMethod": {
         "recurringProcessingModel":"Subscription",
        "type": "token",
        "recurringReference": "recurring_5d410a2065644cffafb4d4b623739215",
        "token": {
            "type":"gatewayToken",
            "value": "pmt_b63d571ba584413cb7823234d0ee6339",
            "vaultID": "S003992VaultID"
        }
    },
    "authentication": {
        "type": "threeDSPage",
        "browserInfo": {
            "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
            "colorDepth": "24",
            "javaEnabled": false,
            "language": "en",
            "screenHeight": "900",
            "screenWidth": "1440",
            "timeZoneOffset": "-480",
            "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
        }
    },
    "transInitiator": {
        "platform": "WEB",
        "deviceType": "",
        "osVersion": ""
    }
}

Response

{
    "metadata": "meta data",
    "payment": {
        "billingAmount": {
            "currency": "USD"
        },
        "evoTransInfo": {
            "evoTransID": "9f6e97bbaa8542f7b25f34b3f4043f33",
            "evoTransTime": "2023-07-21T04:53:55Z",
            "retrievalReferenceNum": "320212351823",
            "traceNum": "351823"
        },
        "merchantTransInfo": {
            "merchantOrderReference": "asdfghjkl",
            "merchantTransID": "T307211689915235171",
            "merchantTransTime": "2023-07-21T12:53:55+08:00"
        },
        "pspTransInfo": {
            "authorizationCode": "100847",
            "pspTransID": "MIE0003IY0721  ",
            "pspTransTime": "2023-07-21T04:53:55Z"
        },
        "status": "Captured",
        "transAmount": {
            "currency": "HKD",
            "value": "130.00"
        }
    },
    "paymentMethod": {
        "paymentMethodVariant": "Recurring",
        "recurringReference": "recurring_5d410a2065644cffafb4d4b623739215",
        "token": {
            "createTime": "2023-07-21T12:51:37+08:00",
            "first6No": "520424",
            "last4No": "7840",
            "status": "enabled",
            "updateTime": "2023-07-21T12:51:37+08:00",
            "value": "pmt_b63d571ba584413cb7823234d0ee6339",
            "vaultID": "S003992VaultID"
        }
    },
    "pspData": {
        "merchantID": "100000000000002",
        "name": "Mastercard"
    },
    "result": {
        "code": "S0000",
        "message": "Success",
        "pspMessage": "Approved or completed successfully",
        "pspResponseCode": "00"
    }
}

Android

Use the checklist to ensure you've completed all of the required steps in your Android integration.
Ensure that your Android device has Google Play services version 18.0.0 or higher.

Web

Use the checklist to ensure you've completed all the required steps in your web integration.

Request Production access to the Google Pay API

The merchant needs to visit the Google Pay and Wallet Console to request production access to the Google Pay API.

Android

Web