Skip to main content
POST
/
digital-wallets
/
google
/
session
New Google Pay session
using RestSharp;


var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/digital-wallets/google/session");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n  \"origin_domain\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
{
  "gateway_merchant_id": "app.gr4vy.sandbox.spider.default",
  "token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudElkIjoiQkNSMkRONFQ3QzNLWDZEWSIsIm1lcmNoYW50T3JpZ2luIjoiZW1iZWQuc2FuZGJveC5zcGlkZXIuZ3I0dnkuYXBwIiwiaWF0IjoxNjgzMjExMzk5fQ.Qk99p_j96aSxGmxUyyb06rNxIY7nh9-BvHJGWBrLBSFb3HkSbYRgq9YQzscWJtLHVvIJifkzSc8BgtllfAzh9A"
}
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.

Body

application/json

Initiates a new session with Google Pay.

origin_domain
string
required

Fully qualified domain name of the merchant.

Response

Returns a JWT used for Google Pay authentication.

gateway_merchant_id
string

Your merchant ID.

Example:

"app.gr4vy.sandbox.spider.default"

token
string

The JWT for the current Google Pay session.

Example:

"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudElkIjoiQkNSMkRONFQ3QzNLWDZEWSIsIm1lcmNoYW50T3JpZ2luIjoiZW1iZWQuc2FuZGJveC5zcGlkZXIuZ3I0dnkuYXBwIiwiaWF0IjoxNjgzMjExMzk5fQ.Qk99p_j96aSxGmxUyyb06rNxIY7nh9-BvHJGWBrLBSFb3HkSbYRgq9YQzscWJtLHVvIJifkzSc8BgtllfAzh9A"