Quick start
Make your first test payment in about five minutes
1. Get your test credentials
Test vs live modes → API keys.
2. Create a payment session
Replace the three placeholders and run this — or open Create payment session and press Send with the same values in the playground:
curl https://test-api.kashier.io/v3/payment/sessions \
--header 'Authorization: YOUR_TEST_SECRET_KEY' \
--header 'api-key: YOUR_TEST_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"expireAt": "2030-01-01T00:00:00.000Z",
"maxFailureAttempts": 3,
"paymentType": "credit",
"amount": "100.00",
"currency": "EGP",
"order": "quickstart-001",
"merchantId": "YOUR_MID",
"merchantRedirect": "https://your-website.com/redirect",
"display": "en",
"type": "one-time",
"allowedMethods": "card,wallet",
"customer": { "email": "[email protected]", "reference": "customer-001" }
}'Ten of those fields are required; the session is rejected without them. The other two are worth sending anyway:
| Field | What it does | |
|---|---|---|
expireAt | required | When the session stops accepting payment. Must be a future ISO 8601 timestamp. |
maxFailureAttempts | required | How many failed attempts the customer gets before the session closes. |
amount | required | The amount to charge, as a string. |
currency | required | EGP, USD, GBP, or EUR. |
order | required | Your own order identifier. Must be unique. |
merchantId | required | Your MID-…. |
merchantRedirect | required | Where Kashier sends the customer after payment. |
type | required | one-time here. |
display | required | Checkout language, en or ar. |
customer | required | At minimum an email and your own reference. |
paymentType | optional | Defaults are applied when omitted. |
allowedMethods | optional | Restricts the methods offered at checkout. Omit to offer everything your account has enabled. |
The response includes a sessionUrl:
{
"status": "CREATED",
"sessionUrl": "https://payments.kashier.io/session/…?mode=test"
}3. Pay with a test card
Open the sessionUrl in your browser — this is the hosted checkout your
customers see. Pay with:
- Card number:
5123450000000008(Mastercard, 3-D Secure enrolled) - Expiry:
06/25· CVV:100
The expiry is not arbitrary. In test mode it selects the outcome — 06/25
is the value that returns APPROVED, and other values return declines,
timeouts, and errors on purpose. The full list is in
test cards.
4. Confirm the result
Open your dashboard (test mode) — the payment is at the top of Transactions. Or fetch it over the API: Get payment session.