Skip to main content

session/start/payment

session/start/payment

Send this request to start a payment within an existing session. In the parameters, pass the data necessary to perform a payment or change any pieces of data already passed.

Endpoint

api/v1/session/start/payment

Request parameters

NameMandatoryTypeDescription
session_id+stringPayment session identifier
payment_details-objectPayment data
amount_details-objectAmount in the USD decimal format. To send 100 USD, specify 10000
customer-objectRecipient's data in your system
participant_details-objectInformation on the sender and recipient
payment_options-objectAdditional payment parameters
metadata-*Additional information. Any data you need in order to perform the operation. Returned in responses and webhooks

If you did not specify payment_details, amount_details, and customer in your session/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/payment \
-H 'content-type: application/json' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"session_id": "ps_3230",
"payment_details": {
"type": "card",
"card": {
"type": "bank_card",
"bank_card": {
"number": "4242424242424242",
"expiration_month": "01",
"expiration_year": "25",
"security_code": "123"
}
}
},
"amount_details": {
"amount": 10000,
"currency": "usd"
},
"customer": {
"reference": "lucky"
},
"metadata": "good"
}'

Response parameters

NameMandatoryTypeDescription
status+stringStatus. Options: error, ok
session-objectPayment session
error-objectError 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",
"acquiring_payments": [
{
"id": "pm_1313",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "lucky"
},
"payment_details": {
"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"
}