session/start/payout
session/start/payout
This request is used to start a payout within an existing session. In the parameters, pass the data necessary to perform the payout or change pieces of data that have already been passed.
If you are using the payout widget to get the user's tokenized bank card details, you can pass them using this request.
Endpoint
api/v1/session/start/payout
Request parameters
Name | Mandatory | Type | Description |
---|---|---|---|
session_id | + | string | Payment session identifier |
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 |
If you did not specify
payment_method
andamount_details
in yoursession/create
request, make sure you specify them in this request, since in this case they are mandatory.
Request example
curl -X POST \
https://demo.smart-glocal.com/api/v1/session/start/payout \
-H 'content-type: application/json' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-H 'X-PARTNER-SIGN: e05794ee22f47ee5f674e63303ea227e6113f42359f332945304f1e958542fff' \
-d '{
"session_id": "3230"
}'
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": "3230",
"status": "in_progress",
"created_at": "2018-05-27T02:03:00.000000Z",
"updated_at": "2018-05-27T02:03:00.000000Z",
"payments": [
{
"id": "2018",
"status": "in_progress",
"created_at": "2018-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [
{
"email": "user@gmail.com"
}
]
},
"payment_method": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa"
}
},
"amount_details": {
"amount": 10000,
"currency": "usd"
},
"metadata": "good"
}
]
}
}
Unsuccessful response example
{
"error": {
"code": "error code",
"description": "error description"
},
"status": "error"
}