Google Pay payments with decrypted payment token data
The bePaid system can process payment, authorization and charge requests with the decrypted encryptedMessage
object of a payment method token provided by Google.
Info
You must be Payment Card Industry Data Security Standard (PCI DSS) compliant to decrypt and store the payment tokens from Google Pay.
Transaction processing with the decrypted payment token
Request
To initiate a payment with the decrypted Google Pay data, send the payment, authorization or charge request, where you should submit the decrypted Google Pay token as the value of request.credit_card.token
in the format described below.
The required format of the decrypted Google Pay token sent as a card token
Submit the decrypted Google Pay token in requests as the card token in the $begateway_google_pay_decrypted_1_0_0$<base64-decoded_encryptedMessage_here>
format, where:
$begateway_google_pay_decrypted_1_0_0$
is the required prefix for the decrypted Google Pay token;<base64-decoded_encryptedMessage_here>
is the decryptedencryptedMessage
property of thesignedMessage
serialized into JSON and then converted to the Base64-strict format.
The required format of the JSON-serialized decrypted encryptedMessage property
The following JSON format applies to encryptedMessage
data for a CARD
paymentMethod
with a PAN_ONLY
authMethod
:
{
"gatewayMerchantId": "exampleGatewayMerchantId",
"messageExpiration": "1605688385100",
"messageId": "AH2EjtfFdKzFFyRez8NvZnFtcO6saD6xskCulEo6hhacv22qJDPksntDoCUJUiGjnWHA6aj7CIBH6j6-vHIDg0wfA-2pazC6_tTuQw7TOCYqz8lcq2ygEnlDMTBYeNivv_iQVbzDAiZM",
"paymentMethod": "CARD",
"paymentMethodDetails": {
"expirationYear": 2025,
"expirationMonth": 12,
"pan": "4111111111111111",
"authMethod": "PAN_ONLY"
}
}
The following JSON format applies to encryptedMessage
data for a CARD
paymentMethod
with a CRYPTOGRAM_3DS
authMethod
(а card is authenticated with the use of a 3-D Secure cryptogram):
{
"gatewayMerchantId": "exampleGatewayMerchantId",
"messageExpiration": "1605688385100",
"messageId": "AH2EjtfFdKzFFyRez8NvZnFtcO6saD6xskCulEo6hhacv22qJDPksntDoCUJUiGjnWHA6aj7CIBH6j6-vHIDg0AwfA-2pazC6_tTuQw7TOCYqz8lcq2ygEnlDMTBYeNivv_iQVbzDAiZM",
"paymentMethod": "CARD",
"paymentMethodDetails": {
"expirationYear": 2025,
"expirationMonth": 12,
"pan": "4111111111111111",
"authMethod": "CRYPTOGRAM_3DS",
"cryptogram": "RDYjvbjpicdaygiFGCZ=",
"eciIndicator": "07"
}
}
Example of the payment request with the decrypted Google Pay token
{
"request":{
"amount":5000,
"currency":"USD",
"description":"Google Pay transaction",
"tracking_id":"your_uniq_number",
"credit_card":{
"token":"$begateway_google_pay_decrypted_1_0_0$eyJnYXRld2F5TWVyY2hhbnRJZCI6ImV4YW1wbGVHYXRld2F5TWVyY2hhbnRJZCIsIm1lc3NhZ2VFeHBpcmF0aW9uIjoiMTYwNTY4ODM4NTEwMCIsIm1lc3NhZ2VJZCI6IkFIMkVqdGZGZEt6RkZ5UmV6OE52Wm5GdGNPNnNhRDZ4c2tDdWxFbzZoaGFjdjIycUpEUGtzbnREb0NVSlVpR2puV0hBNmFqN0NJQkg2ajYtdkhJRGcwQWZL3TJwYXpDNl90VHVRdzdUT0NZcXo4bGNxMnlnRW5sRE1UQlllTml2dl9pUVZiekRBaVpNIiwicGF5bWVudE1ldGhvZCI6IkNBUkQiLCJwYXltZW50TWV0aG9kRGV0YWlscyI6eyJleHBpcmF0aW9uWWVhciI6MjAyNSwiZXhwaXJhdGlvbk1vbnRoIjoxMiwicGFuIjoiNDExMTExMTExMTExMTExMSIsImF1dGhNZXRob2QiOiJQQU5fT05MWSJ9fQ=="
}
}
}
Response
The response to the payment request with the decrypted encryptedMessage
is returned with the final transaction processing status. It fully matches the response to payment or authorization requests.