Creating a Payment with Google Pay™
You can create a payment with Google Pay™ in the sandbox environment.
Prerequisites:
Set an account with Google Pay sandbox for receiving a token for testing.
In the Client Portal, enable the Google Pay Wallet in Settings > Payment Methods > Google Pay
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) |
Sample Request
Request URL - post https://sandboxapi.rapyd.net/v1/payments/
{ "amount": 10, "currency": "USD", "description": "Google Pay test payment", "payment_method": { "type": "is_visa_card", "metadata": {}, "digital_wallet": { "type": "google_pay", "details": { "token": { "apiVersionMinor": 0, "apiVersion": 2, "paymentMethodData": { "description": "VISA ••••1111", "tokenizationData": { "type": "PAYMENT_GATEWAY", "token": "{\"signature\":\"MEUCIQn/q7\\" }, "info": { "cardNetwork": "VISA", "cardDetails": "1111" } } }, "type": "CARD" } } } }
Sample Response
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "4234f0a3-2513-4477-a266-edd6e6c35b43" }, "data": { "id": "payment_0ee40c2d6723f8a94b51935793180607", "amount": 10, "original_amount": 10, "is_partial": false, "currency_code": "USD", "country_code": "IS", "status": "CLO", "description": "Google Pay test payment", "merchant_reference_id": "", "customer_token": "cus_409418161d3259d7e503114e220192b6", "payment_method": null, "payment_method_data": { "id": null, "type": "is_visa_card", "category": "card", "metadata": {}, "image": "", "webhook_url": "", "supporting_documentation": "", "next_action": "not_applicable", "digital_wallet": { "type": "google_pay", "pan_type": "PAN_ONLY" }, "name": null, "acs_check": "unchecked", "cvv_check": "unchecked", "bin_details": { "type": "DEBIT", "brand": "VISA", "level": "CLASSIC", "issuer": "INTL HDQTRS-CENTER OWNED", "country": "TW", "bin_number": "481852" }, "expiration_year": "27", "expiration_month": "12", "fingerprint_token": "ocfp_66d1dabfcef732d5bd41e6b1adf46fab", "network_reference_id": "123456" }, "auth_code": null, "expiration": 1745311026, "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": "Testing XrRNJct", "transaction_id": "", "created_at": 1744706226, "metadata": {}, "failure_code": "", "failure_message": "", "paid": true, "paid_at": 1744706226, "dispute": null, "refunds": null, "order": null, "outcome": null, "visual_codes": {}, "textual_codes": {}, "instructions": [ { "name": "instructions", "steps": [ { "step1": "" } ] } ], "ewallet_id": "ewallet_c4bb3c5ae31339a86490096b73075870", "ewallets": [ { "ewallet_id": "ewallet_c4bb3c5ae31339a86490096b73075870", "amount": 10, "percent": 100, "refunded_amount": 0 } ], "payment_method_options": {}, "payment_method_type": "is_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 } }
Related Information