PayOrc
S2S (Seamless API)

Google Pay

Accept Google Pay on S2S with type GOOGLE_PAY — pass the client wallet token in data.token.

Google Pay

Version: 3.0.0

Generate API Key for S2S channel. Navigate to Developers → API Keys → Add new API key → Select S2S in the Channel Dropdown. IP whitelist applies.

Google Pay lets customers pay with cards or payment methods saved in their Google account. On S2S, your Android app or website collects the Google Pay token on the client; your server sends that token to PayOrc with type: "GOOGLE_PAY" — you never handle raw card number or CVV.

When to use

  • Native Android checkout with Google Pay button
  • Web checkout using Google Pay API for Web
  • Customers who prefer Google’s saved payment methods over manual card entry

How it works

  1. Customer authorizes payment in Google Pay on the device.
  2. Your client receives the Google Pay paymentMethodData token object.
  3. Your server calls POST /s2s/v1/payment with class: "ECOM", type: "GOOGLE_PAY", and the token in data.token (plus standard order fields).
  4. PayOrc processes the payment using your merchant MID and routing configuration.
  5. Direct success — webhook-shaped response when payment completes immediately.
  6. 3DS redirect — if authentication is required, response includes data.redirect_url (order_status: AWAIT_3DS). Redirect the customer to complete 3DS; final status arrives via webhook.

Use data.token for the Google Pay object. Do not use card_details or top-level payment_token. Google Pay must be enabled on your merchant MID for the order currency.

Endpoint

MethodURL
POSThttps://api.payorc.com/s2s/v1/payment

Please use the test credentials for sandbox testing.

Headers

HeaderTypeRequiredDescription
merchant-keyStringYesYour merchant API key
merchant-secretStringYesYour merchant API secret
Content-TypeStringYesMust be application/json

Request Body

FieldTypeRequiredDescription
data.actionStringYesSALE or AUTH
data.classStringYesMust be ECOM
data.capture_methodStringYes when AUTHAUTOMATIC or MANUAL
data.typeStringYesMust be GOOGLE_PAY
data.tokenObjectYesGoogle Pay token from the client SDK
data.customer_detailsObjectYesSame as S2S Payment
data.order_detailsObjectYesm_order_id, amount, currency, return_url, etc.
data.itemsArrayYesLine items
data.billing_detailsObjectYesBilling address
data.shipping_detailsObjectYesShipping address
data.urlsObjectNoRedirect and webhook URLs — see S2S Payment URLs

Do not send card_details with GOOGLE_PAY. Only data.token is used for the wallet payload.

Example request

{
  "data": {
    "action": "SALE",
    "class": "ECOM",
    "capture_method": "AUTOMATIC",
    "type": "GOOGLE_PAY",
    "customer_details": {
      "m_customer_id": "1234",
      "name": "John Doe",
      "email": "[email protected]",
      "mobile": "9876543210",
      "code": "971"
    },
    "order_details": {
      "m_order_id": "ORD-GPAY-001",
      "amount": "100",
      "currency": "AED",
      "convenience_fee": "0",
      "description": "Google Pay order",
      "return_url": "https://merchant.example.com/return"
    },
    "items": [
      {
        "title": "Product",
        "quantity": 1,
        "unit_price": "100.00",
        "discount_amount": "0.00",
        "is_refundable": true
      }
    ],
    "billing_details": {
      "address_line1": "Po Box 12322",
      "address_line2": "",
      "city": "Dubai",
      "province": "Dubai",
      "country": "AE",
      "pin": "54044"
    },
    "shipping_details": {
      "shipping_name": "John Doe",
      "shipping_email": "[email protected]",
      "shipping_code": "971",
      "shipping_mobile": "9876543210",
      "address_line1": "Po Box 12322",
      "address_line2": "",
      "city": "Dubai",
      "province": "Dubai",
      "country": "AE",
      "pin": "54044",
      "shipping_currency": "AED",
      "shipping_amount": "0"
    },
    "token": {
      "apiVersion": 2,
      "apiVersionMinor": 0,
      "paymentMethodData": {
        "description": "Visa •••• 1234",
        "tokenizationData": {
          "type": "PAYMENT_GATEWAY",
          "token": "GOOGLE_PAY_TOKEN_JSON_STRING"
        },
        "type": "CARD"
      }
    },
    "urls": {
      "success": "",
      "cancel": "",
      "failure": "",
      "webhook_url": "https://merchant.example.com/webhook"
    }
  }
}

Response types

Direct success and 3DS redirect both use the S2S envelope (status, code, message, data). The data object is webhook-shaped — see Webhook notifications for the full field list.

Direct success (no 3DS)

When payment completes immediately, data.order_status is CAPTURED (for SALE) or AUTHORISED (for AUTH). data.status is always SUCCESS on a successful payment.

{
  "status": "success",
  "code": "00",
  "message": "Payment completed successfully.",
  "data": {
    "action": "CAPTURE",
    "status": "SUCCESS",
    "status_code": "00",
    "order_status": "CAPTURED",
    "m_order_id": "ORD-GPAY-001",
    "p_order_id": "1000015110",
    "p_request_id": "1000015201",
    "psp_ref_id": "8902218",
    "transaction_id": "1000021942",
    "is_live": false,
    "currency": "AED",
    "amount": "100.00",
    "payment_method": "GOOGLE_PAY",
    "apm_name": "GOOGLE_PAY",
    "apm_identifier": "google_pay",
    "customer_details": {
      "name": "John Doe",
      "email": "[email protected]",
      "code": "971",
      "mobile": "9876543210",
      "m_customer_id": "1234"
    }
  }
}

3DS redirect

When authentication is required, data.order_status is AWAIT_3DS, data.action is AWAIT_3DS, and data.redirect_url points to the PayOrc checkout page for the customer to complete 3DS:

{
  "status": "success",
  "code": "00",
  "message": "Redirection URL generated successfully",
  "data": {
    "action": "AWAIT_3DS",
    "status": "SUCCESS",
    "order_status": "AWAIT_3DS",
    "m_order_id": "ORD-GPAY-001",
    "p_order_id": "1000015110",
    "p_request_id": "1000015201",
    "transaction_id": "1000021942",
    "currency": "AED",
    "amount": "100.00",
    "payment_method": "GOOGLE_PAY",
    "apm_name": "GOOGLE_PAY",
    "apm_identifier": "google_pay",
    "redirect_url": "https://checkout.payorc.com/s2s/payment/{checkout_token}"
  }
}

Redirect the customer to data.redirect_url. Final status is delivered via webhook when payment completes.

Response fields (key)

FieldDescription
statusAPI envelope: success or failed
codeResponse code (e.g. 00)
messagePayment completed successfully. or Redirection URL generated successfully
data.statusSUCCESS when the request was accepted (including AWAIT_3DS)
data.order_statusCAPTURED, AUTHORISED, AWAIT_3DS, or FAILED
data.transaction_idPayOrc transaction ID (string)
data.redirect_urlPresent only for 3DS redirect flow
data.apm_nameGOOGLE_PAY

Common errors

MessageCause
token is missing or not a valid object for GOOGLE_PAYMissing or invalid data.token
card_details is not required for GOOGLE_PAYSent card_details with wallet type
Google Pay integration is not configuredGoogle Pay not enabled on merchant MID

On this page