using Gr4vy;
using Gr4vy.Models.Components;
using System.Collections.Generic;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
var res = await sdk.PaymentServiceDefinitions.SessionAsync(
paymentServiceDefinitionId: "adyen-ideal",
requestBody: new Dictionary<string, object>() {
}
);
// handle response{
"status": "succeeded",
"type": "payment-service-session",
"code": "UNKNOWN_ERROR",
"status_code": 201,
"response_body": {
"sessionId": "12345"
}
}Creates a session for a payment service that supports sessions.
using Gr4vy;
using Gr4vy.Models.Components;
using System.Collections.Generic;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
var res = await sdk.PaymentServiceDefinitions.SessionAsync(
paymentServiceDefinitionId: "adyen-ideal",
requestBody: new Dictionary<string, object>() {
}
);
// handle response{
"status": "succeeded",
"type": "payment-service-session",
"code": "UNKNOWN_ERROR",
"status_code": 201,
"response_body": {
"sessionId": "12345"
}
}transactions.write scope.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
"adyen-ideal"
The JSON payload to sent to the payment service's session API.
Successful Response
The session data received from the payment service.
The status of the response.
succeeded, failed "succeeded"
Always payment-service-session.
"payment-service-session""payment-service-session"
A generic error code that may be returned when the session could not be generated.
"UNKNOWN_ERROR"
The HTTP status code received from the payment service.
201
The JSON response body received from the payment service.
{ "sessionId": "12345" }