using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "example",
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>"
}Create a session for use with Google Pay.
using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "example",
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>"
}digital-wallets.write or embed scope.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the merchant account to use for this request.
"default"
The domain on which Google Pay is being loaded.
"example.com"