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.
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.
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.
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.
Headers:
Content-Type: application/json
Authentication: Bearer %access_token%
Authentication:
Grant_type: client_credentials
Scopes: [ credit ]