POST
/
payment-services
/
{payment_service_id}
/
sessions
curl --request POST \
  --url https://api.{gr4vy_id}.gr4vy.app/payment-services/{payment_service_id}/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "type": "payment-service-session",
  "status": "succeeded",
  "code": "UNKNOWN_ERROR",
  "status_code": 200,
  "response_body": {
    "data": {
      "customerType": "EXISTING",
      "walletManagementUrl": "https://example.com/session"
    },
    "meta": {}
  }
}

This endpoint requires the transactions.write scope.

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

payment_service_id
string
required

The ID of the payment service.

Body

application/json ยท object

A request to generate a session for a payment session.

Response

200 - application/json
type
enum<string>

The type of this resource.

Available options:
payment-service-session
status
enum<string>

The status of the response.

  • succeeded - The session was successfully generated.
  • failed - The session could not be generated.
Available options:
succeeded,
failed
code
string | null

A generic error code that may be returned when the session could not be generated.

status_code
number | null

The HTTP status code received from the payment service.

response_body
object | null

The parsed JSON received from the payment service.