Create payment session
curl -X POST "https://test-api.kashier.io/v3/payment/sessions" \ -H "Content-Type: application/json" \ -d '{ "expireAt": "2030-01-01 00:00:00+00:00", "maxFailureAttempts": 3, "paymentType": "credit", "amount": "100.00", "currency": "EGP", "order": "8f64saf6sa4", "merchantRedirect": "https://your-website.com/redirect", "display": "en", "type": "one-time", "allowedMethods": "card,wallet", "redirectMethod": null, "iframeBackgroundColor": "#FFFFFF", "metaData": { "customKey": "customValue", "displayNotes": { "key": "value" } }, "merchantId": "YOUR_MID", "failureRedirect": false, "brandColor": "#FF5733", "currencyConversionDefault": "EUR", "defaultMethod": "card", "description": "Payment for order ORD123456", "manualCapture": false, "customer": { "email": "[email protected]", "reference": "894321" }, "saveCard": "optional", "retrieveSavedCard": true, "interactionSource": "ECOMMERCE", "enable3DS": true, "serverWebhook": "https://your_webhook_url", "notes": "Special handling required" }'{ "status": "CREATED", "failureAttempts": 0, "capturedAmount": 0, "refundedAmount": 0, "_id": "507f1f77bcf86cd799439011", "merchantId": "MID-XXXX-XXXX", "expireAt": "2025-01-28 17:27:32.359000+00:00", "maxFailureAttempts": 3, "paymentParams": { "display": "en", "paymentType": "credit", "amount": "100.00", "currency": "EGP", "order": "as8f64a5", "merchantRedirect": "https://your-website.com/redirect", "type": "one-time", "allowedMethods": "card,wallet", "redirectMethod": null, "iframeBackgroundColor": "#FFFFFF", "metaData": { "customKey": "customValue", "displayNotes": { "key": "value" } }, "failureRedirect": false, "brandColor": "#FF5733", "currencyConversionDefault": "EUR", "defaultMethod": "card", "description": "Payment for order ORD123456", "manualCapture": false, "customer": { "email": "[email protected]", "reference": "894321" }, "saveCard": "optional", "retrieveSavedCard": true, "interactionSource": "ECOMMERCE", "enable3DS": true, "serverWebhook": "https://your_webhook_url", "notes": "Special handling required", "hash": "<hmac-sha256-hex>", "storeName": "Demo", "store": "Demo" }, "history": [ { "status": "CREATED", "date": "2025-02-13 09:50:45.360000+00:00" } ], "webhookNotifications": [], "createdAt": "2025-02-13 09:50:45.363000+00:00", "updatedAt": "2025-02-13 09:50:45.363000+00:00", "sessionUrl": "https://payments.kashier.io/session/507f1f77bcf86cd799439011?mode=test"}Creates a payment session. The response contains a sessionUrl that is used to redirect the customer to the payment page — you can use it as the src attribute in a link or iframe.
Authorization
secretKey apiKey Your secret key from the Kashier dashboard. Send the raw key value in the Authorization header, without a Bearer prefix.
In: header
Your API key from the Kashier dashboard, sent in the api-key header. Test and live use different keys.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
List payment sessions GET
Lists the payment sessions on your merchant account — the sessions you created, in whatever state they reached. Use it to sweep up sessions your own records lost track of; to look up one particular…
Get payment session GET
Retrieves the current state (and history) of a payment session.