Skip to main content
Skip table of contents

Payment session control

POST /v3/accounts/{reference}/sessions

Starts a payment session. Reference can be retrieved from /v3/users/accounts endpoint. Retuned session id is used in other endpoints.

CODE
Headers:
Content-Type: application/json
Authentication: Bearer %access_token%

Authentication:
Grant_type: client_credentials
Scopes: [ credit ]

Request body:
{
  "username": "string",
  "clientId": "string"
}

Response body:
{
  "id": 0,
  "balance": {
    "amount": 0
  },
  "quotas": {}
}


GET /v3/accounts/{reference}/sessions/{session id}/balance

Returns available balance for the session.

CODE
Headers:
Content-Type: application/json
Authentication: Bearer %access_token%

Authentication:
Grant_type: client_credentials
Scopes: [ credit ]

Response body:
{
  "balance": {
    "amount": 0
  }
}


POST /v3/accounts/{reference}/sessions/{session id}/block

Blocks given amount for current session.

CODE
Headers:
Content-Type: application/json
Authentication: Bearer %access_token%

Authentication:
Grant_type: client_credentials
Scopes: [ credit ]

Request body:
{
  "amount": 0,
  "description": "string"
}


DELETE /v3/accounts/{reference}/sessions/{session id}

Ends the payment session. This action should release all blockings.

CODE
Headers:
Content-Type: application/json
Authentication: Bearer %access_token%

Authentication:
Grant_type: client_credentials
Scopes: [ credit ]
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.