session/init/payout
session/init/payout
Use this request to simultaneously create a session and start a payout.
The response contains the parameters of a session created and information on the payout (payments).
If you decide to use this method, please use an idempotency key.
Endpoint
api/v1/session/init/payout
Request parameters
Name | Mandatory | Type | Description |
---|---|---|---|
payment_method | + | object | Payout data |
amount_details | + | object | Amount. Transmitted in the USD decimal format. If you are sending 100 USD, you will need to specify 10000 |
participant_details | - | object | Information on the sender and recipient |
customer | - | object | Recipient's data in your system |
metadata | - | * | Additional information. Any data you need in order to perform the operation. Returned in responses and webhooks |
Request example
curl -X POST \
https://demo.smart-glocal.com/api/v1/session/init/payout \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"payment_method": {
"type": "bank_account",
"bank_account": {
"system_type": "global",
"global": {
"iban": "NUMBER_VALUE",
"description": "purpose of remittance"
}
}
},
"amount_details": {
"amount": 1000,
"currency": "usd"
},
"participant_details": {
"recipient": {
"bank_name": "All Banks Belgium / EUR / Payment System: SEPA",
"currency": "eur",
"country_iso3": "BEL",
"first_name": "John",
"last_name": "Johnson"
},
"sender": {
"company_name": "Company name",
"registration_number": "1234567890",
"country_iso3": "USA",
"code": "1234567890"
}
}
}'
Response parameters
Name | Mandatory | Type | Description |
---|---|---|---|
status | + | string | Status. Options: error , ok |
session | - | object | Payment session |
error | - | object | Error description |
Successful response example
{
"status": "ok",
"session": {
"id": "ps_3230",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"payments": [
{
"id": "po_1313",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [
{
"email": "user@gmail.com"
}
]
},
"payment_method": {
"type": "bank_account",
"bank_account": {
"system_type": "global",
"global": {
"iban": "NUMBER_VALUE",
"description": "purpose of remittance"
}
}
},
"participant_details": {
"recipient": {
"bank_name": "All Banks Belgium / EUR / Payment System: SEPA",
"currency": "eur",
"country_iso3": "BEL",
"first_name": "John",
"last_name": "Johnson"
},
"sender": {
"company_name": "Company name",
"registration_number": "1234567890",
"country_iso3": "USA",
"code": "1234567890"
}
},
"amount_details": {
"amount": 10000,
"currency": "usd"
},
"metadata": "good"
}
]
}
}
Unsuccessful response example
{
"error": {
"code": "error code",
"description": "error description"
},
"status": "error"
}