Creating a Payment with Google Pay™ (decrypted)
This procedure describes how to create a payment with an encrypted Google Pay™ payload.
Initiate this process with a call to the Rapyd API. You can create a payment with Google Pay™ in the sandbox environment..
Prerequisites
Completion of the Rapyd onboarding process. See Activating Your Account (KYB).
Check the relevant country's payment methods that support Google Pay as a digital wallet provider via the List Payment Methods by Country request. For information about Google Pay support for a specific payment method, contact Rapyd Client Support.
Activation of Google Pay in the Client Portal. See Activating Google Pay.
A digital wallet. Generate the transaction details using Google Pay's process.
An encrypted payload from Google. You must do the following:
Decrypt the payload using your own keys.
Copy the decrypted contents of
token.paymentData
todetails.decrypted_data
in your 'Create Payment' request.Copy the contents of
token.paymentMethod
todetails.brand_data
in your 'Create Payment' request.
Create the payment as described in Create Payment.
Set
payment_method.type
to the relevant payment method type.Set
digital_wallet.type
to google_pay.
Use the following guidelines for the digital_wallet.details
object:
Parameter | Value |
---|---|
| 0 |
| 2 |
| PAYMENT_GATEWAY |
| Optional. Accepts any text. |
| Set |
| CARD |
| MASTERCARD, VISA |
| 1111 (for Sandbox) |
Samples
Request URL - post https://sandboxapi.rapyd.net/v1/payments/
Cryptogram - Request
{ "amount": 10, "currency": "EUR", "merchant_reference_id": "first", "customer": { "name": "tommy" }, "payment_method": { "type": "gb_visa_card", "digital_wallet": { "type": "google_pay", "details": { "decrypted_data": { "gatewayMerchantId": "some-merchant-id", "messageExpiration": "1561533871082", "messageId": "AH2Ejtc8qBlP_MCAVyBncOgpPWFFn3", "paymentMethod": "CARD", "paymentMethodDetails": { "expirationYear": 2028, "expirationMonth": 12, "pan": "4895370012001111", "authMethod": "CRYPTOGRAM_3DS", "eciIndicator": "07", "cryptogram": "AgAAAAAABk4DWZ4C28yUQAAAAAA=" } }, "brand_data": { "cardDetails": "1111", "cardNetwork": "VISA" } } } } }
Cryptogram Response
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "efa20416-d2cf-4344-80d7-8385cb02041a" }, "data": { "id": "payment_959fec8bf6925c41a08af3450ffe1941", "amount": 10, "original_amount": 10, "is_partial": false, "currency_code": "EUR", "country_code": "IL", "status": "CLO", "description": "", "merchant_reference_id": "first", "customer_token": "cus_c62f634c9c40bb9996a41f06f4f29321", "payment_method": null, "payment_method_data": { "id": null, "type": "gb_visa_card", "category": "card", "metadata": null, "image": "", "webhook_url": "", "supporting_documentation": "", "next_action": "not_applicable", "digital_wallet": { "type": "google_pay", "pan_type": "CRYPTOGRAM_3DS" }, "name": null, "last4": null, "acs_check": "unchecked", "cvv_check": "unchecked", "bin_details": { "type": "DEBIT", "brand": "VISA", "level": "CLASSIC", "issuer": "INTL HDQTRS-CENTER OWNED", "country": "US", "bin_number": "489537" }, "expiration_year": "28", "expiration_month": "12", "fingerprint_token": "ocfp_88bb41690d7b624604bfda5bae24c9c7", "network_reference_id": "123456" }, "auth_code": null, "expiration": 1746367369, "captured": true, "refunded": false, "refunded_amount": 0, "receipt_email": "", "redirect_url": "", "complete_payment_url": "", "error_payment_url": "", "receipt_number": "", "flow_type": "", "address": null, "statement_descriptor": "sample text", "transaction_id": "", "created_at": 1746366772, "metadata": {}, "failure_code": "", "failure_message": "", "paid": true, "paid_at": 1746366772, "dispute": null, "refunds": null, "order": null, "outcome": null, "visual_codes": {}, "textual_codes": {}, "instructions": [], "ewallet_id": "ewallet_be4ba8f13da40caa59a7e03022a8acfe", "ewallets": [ { "ewallet_id": "ewallet_be4ba8f13da40caa59a7e03022a8acfe", "amount": 10, "percent": 100, "refunded_amount": 0 } ], "payment_method_options": {}, "payment_method_type": "gb_visa_card", "payment_method_type_category": "card", "fx_rate": 1, "merchant_requested_currency": null, "merchant_requested_amount": null, "fixed_side": "", "payment_fees": null, "invoice": "", "escrow": null, "group_payment": "", "cancel_reason": null, "initiation_type": "customer_present", "mid": "", "next_action": "not_applicable", "error_code": "", "remitter_information": {}, "save_payment_method": false, "merchant_advice_code": null, "merchant_advice_message": null, "transaction_link_id": null } }
Primary account number (PAN) Only - Request
{ "amount": 10, "currency": "EUR", "merchant_reference_id": "first", "customer": { "name": "tommy" }, "payment_method": { "type": "gb_visa_card", "digital_wallet": { "type": "google_pay", "details": { "decrypted_data": { "gatewayMerchantId": "some-merchant-id", "messageExpiration": "1650574736277", "messageId": "AH2Ejtc88ZHJ-2aYBQWzHwvp6l0JsCHgxVt8s91A-ZUikaXNbcjsFm6gg9ExeVR-jzIyT-mJvA_ntvfRsDDOH2jnKMjdTtXIJvPt0NBUU45R7-gnjxkx-sI0ldcWvbDHsV0735yFDbWk", "paymentMethod": "CARD", "paymentMethodDetails": { "expirationYear": 2028, "expirationMonth": 12, "pan": "4111111111111111", "authMethod": "PAN_ONLY" } }, "brand_data": { "cardDetails": "1111", "cardNetwork": "VISA" } } } } }
Primary account number (PAN) Only with 3DS Required - Response
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "fb441646-a77e-4e81-8083-1bfc5f954fc6" }, "data": { "id": "payment_3942a72e5cd1999b6f6927f00f550509", "amount": 0, "original_amount": 10, "is_partial": false, "currency_code": "EUR", "country_code": "IL", "status": "ACT", "description": "", "merchant_reference_id": "first", "customer_token": "cus_aae5aac258836c39649e3a97bd8631a7", "payment_method": null, "payment_method_data": { "id": null, "type": "gb_visa_card", "category": "card", "metadata": null, "image": "", "webhook_url": "", "supporting_documentation": "", "next_action": "3d_verification", "digital_wallet": { "type": "google_pay", "pan_type": "PAN_ONLY" }, "name": null, "last4": null, "acs_check": "unchecked", "cvv_check": "unchecked", "bin_details": { "type": "CREDIT", "brand": "VISA", "level": null, "issuer": "JPMORGAN CHASE BANK, N.A.", "country": "US", "bin_number": "411111" }, "expiration_year": "28", "expiration_month": "12", "fingerprint_token": "ocfp_11ECFC39303B184181220EC01B2F2B1B", "network_reference_id": "629477" }, "auth_code": null, "expiration": 1746367513, "captured": true, "refunded": false, "refunded_amount": 0, "receipt_email": "", "redirect_url": "https://sbcheckout.rapyd.net/3ds-payment?token=payment_3942a72e5cd1999b6f6927f00f550509", "complete_payment_url": "", "error_payment_url": "", "receipt_number": "", "flow_type": "", "address": null, "statement_descriptor": "sample text", "transaction_id": "", "created_at": 1746366916, "metadata": {}, "failure_code": "", "failure_message": "", "paid": false, "paid_at": 0, "dispute": null, "refunds": null, "order": null, "outcome": null, "visual_codes": {}, "textual_codes": {}, "instructions": [], "ewallet_id": "ewallet_be4ba8f13da40caa59a7e03022a8acfe", "ewallets": [ { "ewallet_id": "ewallet_be4ba8f13da40caa59a7e03022a8acfe", "amount": 10, "percent": 100, "refunded_amount": 0 } ], "payment_method_options": { "3d_required": true }, "payment_method_type": "gb_visa_card", "payment_method_type_category": "card", "fx_rate": 1, "merchant_requested_currency": null, "merchant_requested_amount": null, "fixed_side": "", "payment_fees": null, "invoice": "", "escrow": null, "group_payment": "", "cancel_reason": null, "initiation_type": "customer_present", "mid": "", "next_action": "3d_verification", "error_code": "", "remitter_information": {}, "save_payment_method": false, "merchant_advice_code": null, "merchant_advice_message": null, "authentication_result": { "eci": null, "result": "R", "version": "2.2.0", "cardholder_info": null }, "transaction_link_id": null } }
Primary account number (PAN) Only with 3DS Required - Webhook after Payment Completes
{ "id": "", "token": "", "organization_id": "2d87743e-93c8-11e7-9273-0ef1982c1e4a", "org_pk": "0", "type": "PAYMENT_COMPLETED", "data": { "id": "payment_3942a72e5cd1999b6f6927f00f550509", "amount": "10", "original_amount": "10", "is_partial": false, "currency_code": "EUR", "country_code": "IL", "status": "CLO", "description": "", "merchant_reference_id": "first", "customer_token": "cus_aae5aac258836c39649e3a97bd8631a7", "payment_method": null, "payment_method_data": { "id": "null", "type": "gb_visa_card", "category": "card", "metadata": null, "image": "", "webhook_url": "", "supporting_documentation": "", "next_action": "not_applicable", "digital_wallet": { "type": "google_pay", "pan_type": "PAN_ONLY" }, "name": null, "last4": null, "acs_check": "pass", "cvv_check": "unchecked", "bin_details": { "type": "CREDIT", "brand": "VISA", "level": null, "issuer": "JPMORGAN CHASE BANK, N.A.", "country": "US", "bin_number": "411111" }, "expiration_year": "28", "expiration_month": "12", "fingerprint_token": "ocfp_11ECFC39303B184181220EC01B2F2B1B", "network_reference_id": "629477" }, "auth_code": null, "expiration": 1746367513, "captured": true, "refunded": false, "refunded_amount": 0, "receipt_email": "", "redirect_url": "https://qacheckout.rapyd.net/3ds-payment?token=payment_3942a72e5cd1999b6f6927f00f550509", "complete_payment_url": "", "error_payment_url": "", "receipt_number": "", "flow_type": "", "address": null, "statement_descriptor": "sample text", "transaction_id": "", "created_at": 1746366916, "metadata": {}, "failure_code": "", "failure_message": "", "paid": true, "paid_at": 1746366970, "dispute": null, "refunds": null, "order": null, "outcome": null, "visual_codes": {}, "textual_codes": {}, "instructions": [], "ewallet_id": "ewallet_be4ba8f13da40caa59a7e03022a8acfe", "ewallets": [ { "ewallet_id": "ewallet_be4ba8f13da40caa59a7e03022a8acfe", "amount": 10, "percent": 100, "released_amount": "undefined", "refunded_amount": 0 } ], "payment_method_options": { "3d_required": true }, "payment_method_type": "gb_visa_card", "payment_method_type_category": "card", "fx_rate": 1, "merchant_requested_currency": null, "merchant_requested_amount": null, "fixed_side": "", "payment_fees": null, "invoice": "", "escrow": null, "group_payment": "", "cancel_reason": null, "initiation_type": "customer_present", "mid": "", "next_action": "not_applicable", "error_code": "", "remitter_information": {}, "save_payment_method": false, "merchant_advice_code": null, "merchant_advice_message": null, "authentication_result": { "eci": "05", "result": "A", "version": "2.2.0", "cardholder_info": null }, "transaction_link_id": null }, "attempts": [], "trigger_operation_id": "025423c7-5201-4044-b438-6840b227ee9f", "first_attempt_at": 0, "last_attempt_at": 0, "status": "", "created_at": 0, "next_attempt_at": 0, "uri": "" }
Related Information