GooglePay
A better way to pay, by Google
Google Pay™ is the fast, simple way to pay on sites, in apps, and in stores using the cards saved to your Google Account. It protects your payment info with multiple layers of security and makes it easy to send money, store tickets, or cash in on rewards – all from one convenient place.
Connecting Google Pay via ProcardPay Hosted Checkout Page
To connect, you need:
- Signup in ProcardPay service and sign a contract with ProcardPay.
- Your must adhere to the Google Pay APIs Acceptable Use Policy and agree to the Google Pay Terms of Service.
Description
With this connection method, there is no need to carry out any additional integration. The Google Pay button will be displayed on the ProcardPay payment page.
An example of a payment form with the Google Pay method.
Connection with Google Pay API
Description
This method is most suitable for customer convenience. It allows you to connect directly, without redirecting to the ProcardPay payment form, and accept payments directly from your site or application.
How to connect?
- To complete branding requirements
- for mobile applications: Google Pay Android Brand Guidelines,
- for websites: Google Pay Web Brand Guidelines.
- Check compliance integration checklist:
- for mobile applications: Google Pay Android integration checklist.
- for websites: Google Pay Web integration checklist
Pass the check - send the assembly of the mobile application or a link to the website with a payment page.
How does it work?
- You request the encrypted payment data from your application.
- Google Pay returns the encrypted data after buyer authentication.
- You send the encrypted payment data to your server.
- You send an JSON-request to ProcardPay containing the encrypted data.
- We send you the payment response
- You inform the buyer of the outcome
How to integrate Google Pay?
For integration use Google Pay Android developer documentation or Google Pay Web developer documentation.
Configuration parameters
- allowPaymentMethods : CARD
- tokenizationSpecification = {"type": "PAYMENT_GATEWAY"}
- allowedCardNetworks = ['MASTERCARD', 'VISA'];
- allowedCardAuthMethods = ['PAN_ONLY', 'CRYPTOGRAM_3DS'];
- gateway = concordpay
- gatewayMerchantId - unique merchant identifier. Issued to each partner when connected to ProcardPay.
If the payer confirms the payment, the callback will return the data to the processPayment function, which will need to be sent payment data and encrypted data in the GooglePayPurchase payment method request
Example:
{
"apiVersionMinor":0,
"apiVersion":2,
"paymentMethodData":{
"description":"Mastercard •••• 6812",
"tokenizationData":{
"type":"PAYMENT_GATEWAY",
"token":{"signature":"MEYCIQC+IHxUu9Wwra2Vu6tBa2wJ1VphLGYtNVLLwIhAOkdbNje//eLrXVc+n6LOlc4PqxWOUcqwPCMT3pWtNrmki/CNA1ur","intermediateSigningKey":{"signedKey":"{\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzyGFjQuzGSVij0DAQcDQgAEwhRrvGB0kZ1248MEJAPwX0YfrQInhyyRM7nZG3QC9NMvXR9Zd6uVcVzAz+6K/+NEGIWbX8zbk6A\\u003d\\u003d\",\"keyExpiration\":\"1571328568000\"}","signatures":["MEUCIQCR6vhCBHeFPvDJlCIo4/tLd7W8CIGrZDJlCI48IEiyHB8qmlCBHeFPvQIgLZJIe4cZv6pYtYYa56QCI/vvg1GqXTP3bTBjO49r5mI\u003d"]},"protocolVersion":"ECv2","signedMessage":"{\"encryptedMessage\":\"O4wTPip6RruraT6vO9MS+9stjkU/kT5EibKB3O1bbxyybKcGQ5vxBOtNOBKKd/NuqNmN2eEK3UbSKb1M3gv45gT9cCeEvlzO7Wg0N100vUBp9RPDN9TH4tj4w578sWFKfTi6FsSrZB27SGWcU0k85CGUMmd5PaGmQlHFqHc0HrDZmjM1yG82rFB/p31ZyUleN5nihzjOZif/BKXwg3XA2oLXqBSSWcAdfZwXxCEOqvAQE+kpTC7qVO4wTPip6RruraT6vO9M9FtPJXP9bPxzMVk/ozEZSfhSzVTT5EibKB3O1bbxyybKcGQ5vxBOtNOBKKd/NuqNmN2eEK3UbSKb1M3gv45gT9cCeEvlzO7Wg0N100vUBp9RPDN9TH4tj4w578sWFKfTi6FsSrZB27SGWcU0k85CGUMmd5PaGmQlHFqHc0HrDZmjM1yG82rFB/p31ZyUleN5nihzjOZif/BKXJXP9bPxzMVk/ozEZSfhSzVTT5EibKB3O1bbxyybKcGQ5vxBOtNOBKKd/NuqNmN2eEK3UbSKb1M3gv45gT9cCeEvlzO7Wg0N100vwg3XA2oLXqBSSWcAdfZwXxCEOqvAQE+kpTC7qVO4wTPip6RruraT6vO9MS+9stjkU/kT5EibKB3O1bbxyybKcGQ5vxBOtNOBKKd/NuqNmN2eEK3UbSKb1M3gv45gT9cCeEvlzO7Wg0N100vUBp9RPDN9TH4tj4w578sWFKfTi6FsSrZB27SGWcU0k85CGUMmd5PaGmQlHFqHc0HrDZmjM1yG82rFB/p31ZyUleN5nihzjOZif/BKXwg3XA2oLXqBSSWcAdfZwXxCEOqvAQE+kpTC7qVO4wTPip6RruraT6vO9M9FtIf0kcqzYSAN7pl1SUA5jC9rHrqucPoh0/FSspup78SWBt8TnmVKC9O3sQhIZ3SMoGOG4mdjtIrgCwWH2cbrxUH0dHAqOe5ANGOY/mII4nTEp7xaKu41hK/kFE15zVyqgEaKHO9buo94mRBY5yqffF3bKg5mAMPzjDhyHSujqWKAs9C5fBzMEuEr2z7A23kfLqBceH5uS9LJMiZ/yVKCwfpY9u2XyCjKdp7I\\u003d\",\"ephemeralPublicKey\":\"BAMDAtfgcPNuzItrwGLigGj3rtxmyHhZLwx1B4RJZ2oo11jpFf3SA6a3utryCMmlCEcqLfLn6WDH2ArrNBGn+Ew\\u003d\",\"tag\":\"T/qhZ/XY5/3Fe4QBKazwVeiKfm6NqS6EXhRlp8NeWrA\\u003d\"}"}
},
"type":"CARD",
"info":{
"cardNetwork":"MASTERCARD",
"cardDetails":"6812"
}
}
}
Payment method GooglePayPurchase
Production url: https://****.procard-ltd.com/api/
POST multipart/form-data
Request parameters:
Parameter | Description | Mandatory | Type |
---|---|---|---|
operation | Operation type. Value: GooglePayPurchase | Yes | String |
merchant_id | Merchant identifier | Yes | String |
amount | Amount. Format: 1.00 | Yes | Float |
order_id | Unique operation number on the merchant side. | Yes | String |
currency_iso | Currency UAH | Yes | String |
description | Description | Yes | String |
callback_url | URL for payment result callback data | Yes | String |
gpApiVersionMinor | apiVersionMinor form the processPayment(paymentData) | Yes | Integer |
gpApiVersion | apiVersion from the processPayment(paymentData) | Yes | Integer |
gpPMDescription | paymentMethodData.description from the processPayment(paymentData) | Yes | String |
gpPMType | paymentMethodData.type from the processPayment(paymentData) | Yes | String |
gpPMICardNetwork | paymentMethodData.info. cardNetwork from the processPayment(paymentData) | Yes | String |
gpPMICardDetails | paymentMethodData.info. cardDetails from the processPayment(paymentData) | Yes | String |
gpTokenType | paymentMethodData. tokenizationData.type from the processPayment(paymentData) | Yes | String |
gpToken | paymentMethodData.tokenizationData.token from the processPayment(paymentData) | No | String |
gpTokenDecrypted | The parameter is passed instead of gpToken if payment with decrypted token is used. paymentMethodData.tokenizationData.token from the processPayment(paymentData) | No | String |
secure_type | Transaction Security Pass Type. The list of possible values see in Dictionary. secure_type parameter values | No | Integer |
signature | HMAC_SHA512 signature with merchant PrivateKey. | Yes | String |
Concatenated parameters merchant_id, order_id, amount, currency_iso, description in to string, separated ";" in UTF-8. | |||
For example: hmac('sha512', 'merchant_id;order_id;amount;currency_iso;description') |
Example of payment request with decrypted token:
{
"operation": "GooglePayPurchase",
"merchant_id": "BO_c544cc5a6be9f77",
"amount": 1,
"order_id": "1725460766155-908",
"currency_iso": "UAH",
"description": "Платеж GooglePayPurchase",
"callback_url": "http://merchant.dev/callback.php",
"gpApiVersionMinor": 0,
"gpApiVersion": 2,
"gpPMDescription": "Visa •••• 3119",
"gpPMType": "CRYPTOGRAM_3DS",
"gpPMICardNetwork": "VISA",
"gpPMICardDetails": "3119",
"gpTokenType": "PAYMENT_GATEWAY",
"gpTokenDecrypted": "ewoiZ2F0ZXdheU1lcmNoYW50SWQiOiAiQk9fZGM1NWI4MmJhMmJhNTNhIiwKIm1lc3NhZ2VFeHBpcmF0aW9uIjogIjE3MDg5ODc1MzMiLAoibWVzc2FnZUlkIjogIkFIMkVqdGRaaEZpc3NGdXZpaDdRbU9aeF9DLUp4akx4dW9yeGd6ekZxb2ZOcVdOZ2lOZ2hwOVNoVnVTemVaamxMVUFSZE1XUm8wZ2k5YzNPbllaREQ1ck9HRGhET2NwbkcyNVpmRU1CM2o5aFhpX3Q0UVlKRzN1UGV4eHdQOUZWaDhFb0RUUEg0a0o0IiwKInBheW1lbnRNZXRob2QiOiAiQ0FSRCIsCiJwYXltZW50TWV0aG9kRGV0YWlscyI6IHsKImV4cGlyYXRpb25ZZWFyIjogMjAyNSwKImV4cGlyYXRpb25Nb250aCI6IDEyLAoicGFuIjogIjQwMTIwMDAwMDAwMDMxMTkiLAoiYXV0aE1ldGhvZCI6ICJDUllQVE9HUkFNXzNEUyIsCiJjcnlwdG9ncmFtIjogIkFJSkJ2U2hRNkRtckFCS1AzL0F3R2dBREZBPT0iCn0KfQo=",
"add_params": {
"BrowserIP": "10.1.2.3",
"UserAccountID": "00000000-ABCD-1234-A1B2-123456789876-12345654-ABCD-1234-A1B2-333",
"Fingerprint": "12345654-ABCD-1234-A1B2-123456789876-12345654-ABCD-1234-A1B2-111",
"AReqDetails.notificationUrl": "https://merchant.dev/3ds/result"
},
"signature": "5d0ec7237a1e856a5a2c27f2680736cf"
}
Decrypted token structure:
Parameter | Description | Mandatory | Type |
---|---|---|---|
gatewayMerchantId | Unique merchant identifier in the payment gateway system | Yes | String |
messageExpiration | A timestamp indicating when the token expires | Yes | String |
messageId | A unique identifier for this particular payment message | Yes | String |
paymentMethod | Type of payment method used | Yes | String |
paymentMethodDetails | |||
expirationYear | Card expiration year | Yes | String |
expirationMonth | Card expiration month | Yes | String |
pan | Primary account number (tokenized card number) | Yes | String |
authMethod | Authentication method used (CRYPTOGRAM_3DS indicates 3D Secure) | Yes | String |
cryptogram | Unique cryptogram generated for this transaction for security purposes | Yes | String |
Example decrypted token:
{
"gatewayMerchantId": "BO_dc55b82ba2ba53a",
"messageExpiration": "1708987533",
"messageId": "AH2EjtdZhFissFuvih7QmOZx_C-JxjLxuorxgzzFqofNqWNgiNghp9ShVuSzeZjlLUARdMWRo0gi9c3OnYZDD5rOGDhDOcpnG25ZfEMB3j9hXi_t4QYJG3uPexxwP9FVh8EoDTPH4kJ4",
"paymentMethod": "CARD",
"paymentMethodDetails": {
"expirationYear": 2025,
"expirationMonth": 12,
"pan": "4012000000003119",
"authMethod": "CRYPTOGRAM_3DS",
"cryptogram": "AIJBvShQ6DmrABKP3/AwGgADFA=="
}
}
To support the possibility of performing authorization according to the 3DS2 protocol, the following parameters must be additionally transferred to add_params:
Parameter | Type | Required | Description |
---|---|---|---|
AReqDetails.notificationUrl | String | No | The URL to send CRes |
JSON is returned in response.
Unsuccess response with the following parameters:
Parameter | Type | Description |
---|---|---|
code | Integer | Response code (Dictionary. System Error Codes) |
message | String | Text message with query result |
Response example:
{
"code":-4,
"message":"Неверная подпись"
}
If 3DS no need, response with the following parameters:
Parameter | Type | Description |
---|---|---|
reasonCode | Integer | Request result code 0 - successful 12 - operation fail |
reason | String/Integer | Message with request result Pay attention that the message can be string or number! |
transactionStatus | String | Operation Status (see Dictionary. Payment Statuses) |
Success operation response example:
{
"reasonCode": 0,
"reason": "OK",
"transactionStatus": "APPROVED"
}
Operation failure response example:
{
"reasonCode": 12,
"reason": 55,
"transactionStatus": "DECLINED"
}
If 3DS verification is required, response with the following parameters:
Parameter | Description | Mandatory | Type |
---|---|---|---|
code | Response code | Yes | Integer |
status | Payment status. If status like as "3ds", need to call 3D Secure check | Yes | String |
d3AcsUrl | acs url for 3D Secure Check | No | String |
d3Md | Unique message identifier for 3DS host | No | String |
d3Pareq | PaReq message for 3DS host | No | String |
d3Creq | d3Creq message for 3DS host | No | String |
transaction_key | ProcardPay transaction key | Yes | String |
Response example:
{
"code": 2002,
"status": "3ds",
"d3AcsUrl": "https://bank.com/acs/94",
"d3Creq": "eyJhY3NUcmFuc0lEIjoiMjczNzlhNWYtMGVlMi00MzcxLWEwMDYtNTExOTdlMzVhMjI3IiwidGhyZWVEU1NlcnZlclRyYW5zSUQiOiJmMjIyY2VlZi1kMWJjLTRjZjEtYWYxMy01MGM5ZjExODJhN2YiLCJjaGFsbGVuZ2VXaW5kb3dTaXplIjoiMDMiLCJtZXNzYWdlVHlwZSI6IkNSZXEiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMS4wIn0",
"d3Md": "",
"d3Pareq": "",
"transaction_key": "b701ff08d09206ef89cc8178aee0e8ef3a765d7042368b545cf55acf8b5707e164c7adf64d66a"
}
Check 3DS
If status like as "3ds", need to call 3D Secure check.
If the response code is 2002, a 3DS1 verification is required.
If the response code is 2002, a 3DS2 verification is required.
3DS1 verification
To verify 3ds, you should use the POST method to send a form with the parameters d3Pareq and d3Md to d3AcsUr:
<form name="MPIform" action='${d3AcsUrl}' method="POST">
<input type="hidden" name="PaReq" value='${d3Pareq }'>
<input type="hidden" name="MD" value='${d3Md }'>
<input type="hidden" name="TermUrl" value='${TempUrl}'>
</form>
TempUrl - merchant url to return from 3DS verification.
3DS2 verification
To verify 3ds, you need to post the form with the d3Creq
parameter to d3AcsUrl
.
<form name="MPIform" action='${d3AcsUrl}' method="POST">
<input type="hidden" name="creq" value='${d3Creq}'>
</form>
To complete the payment on the merchant's payment page after executing 3DS, it is necessary to complete 3DS verification
Complete 3DS verification
See details in The confirmation of 3DS Verification