Initiate a new payment session
cURL
curl --request POST \ --url https://api.toffeepay.com/v1/sessions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "game_id": "<string>", "user_id": "<string>", "item": { "title": "<string>", "price": 123, "currency": "USD", "image": "<string>", "country": "<string>" }, "return_url": "<string>", "wallet_enabled": true } '
{ "id": "<string>", "status": "pending", "user_id": "<string>", "game_id": "<string>", "item": { "title": "<string>", "price": 123, "currency": "USD", "image": "<string>", "country": "<string>" }, "created_at": "2023-11-07T05:31:56Z", "payment_id": "<string>", "paid_at": "2023-11-07T05:31:56Z", "failed_at": "2023-11-07T05:31:56Z", "cancelled_at": "2023-11-07T05:31:56Z", "expired_at": "2023-11-07T05:31:56Z", "tax": { "amount": 1 } }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Session requests/responses
Show child attributes
Success
pending
paid
failed
cancelled
expired
sales tax for the session