Skip to main content
POST
/
digital-wallets
/
google
/
session
C#
using Gr4vy;
using Gr4vy.Models.Components;

var sdk = new Gr4vySDK(
    id: "mattilda",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

var res = await sdk.DigitalWallets.Sessions.GooglePayAsync(googlePaySessionRequest: new GooglePaySessionRequest() {
    OriginDomain = "example.com",
});

// handle response
{
  "gateway_merchant_id": "<string>",
  "token": "<string>"
}
This endpoint requires the digital-wallets.write or embed scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-gr4vy-merchant-account-id
string | null

The ID of the merchant account to use for this request.

Example:

"default"

Body

application/json
origin_domain
string
required

The domain on which Google Pay is being loaded.

Response

Successful Response

gateway_merchant_id
string
required

The gateway ID for the merchant as assigned by our platform.

token
string
required

The session token for Google Pay.