Skip to main content
POST
/
payment-service-definitions
/
{payment_service_definition_id}
/
sessions
C#
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
{
  "type": "payment-service-session",
  "status": "succeeded",
  "code": "UNKNOWN_ERROR",
  "status_code": 201,
  "response_body": {
    "sessionId": "12345"
  }
}
This endpoint requires the transactions.write scope.

Authorizations

Authorization
string
header
required

Path Parameters

payment_service_definition_id
string
required
Examples:

Body

application/json · Body · object

Response

status
enum<string>
required
Available options:
succeeded,
failed
Examples:
type
string
default:payment-service-session
Allowed value: "payment-service-session"
Examples:
code
string | null
Examples:
status_code
integer | null
Examples:
response_body
object | null
Examples: