using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
ClickToPaySessionRequest req = new ClickToPaySessionRequest() {
CheckoutSessionId = "4137b1cf-39ac-42a8-bad6-1c680d5dab6b",
};
var res = await sdk.DigitalWallets.Sessions.ClickToPayAsync(req);
// handle response
{
"digital_payment_application_id": "a0c3ef2e-9cdb-4cbf-aaff-5baac2928e1b",
"digital_payment_application_name": "ACME"
}
Create a session for use with Click to Pay.
using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
ClickToPaySessionRequest req = new ClickToPaySessionRequest() {
CheckoutSessionId = "4137b1cf-39ac-42a8-bad6-1c680d5dab6b",
};
var res = await sdk.DigitalWallets.Sessions.ClickToPayAsync(req);
// handle response
{
"digital_payment_application_id": "a0c3ef2e-9cdb-4cbf-aaff-5baac2928e1b",
"digital_payment_application_name": "ACME"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Successful Response
The response is of type object
.
Was this page helpful?