session/init/payout
session/init/payout
This request is used to simultaneously create a session and start a payout if you are ready to pass all the parameters needed for the payout.
The response contains the parameters of the session created and information on the payout (Payment).
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 | + | PaymentMethod | Payout data |
amount_details | + | AmountDetails | Amount. Transmitted in the USD decimal format. If you are sending 100 USD, you will need to specify 10000 |
participant_details | - | ParticipantDetails | Information on the sender and recipient |
customer | - | Customer | 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 | - | PaymentSession | Payment session |
error | - | Error | Error |
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"
}