Kiosk & cash payments
Basata kiosk codes, Aman installment-at-kiosk, and the generic Cash mark-as-paid operation
Overview
Kashier has three payment methods in this family, each with a different completion mechanism:
| Method | paymentMethod.type | How it completes |
|---|---|---|
| Basata | basata | You generate a payment reference code; the customer pays it at a Basata outlet, and Basata notifies Kashier. |
| Aman | aman | The customer completes an OTP-verified installment purchase through Aman. |
| Cash | cash | Records a payment you already collected through another channel — not a real-time authorization. |
Looking for Contact, valU, Octo, Souhoola, Mogo, Tru, or Forsa?
Those are BNPL/installment providers, not cash or kiosk methods, even though Contact's name suggests otherwise. See Installment plans → BNPL providers.
Basata: generate payment code
Generates a payment code for the Basata payment method.
| Endpoint | Value |
|---|---|
| TEST-URL | https://test-fep.kashier.io/v3/orders |
| LIVE-URL | https://fep.kashier.io/v3/orders |
| Method | POST |
Headers
| Endpoint | Required | Value |
|---|---|---|
| Kashier-Hash | Yes | HMAC-SHA256 hash calculated based on the path and API key |
| Content-Type | Yes | application/json |
curl --location 'https://test-fep.kashier.io/v3/orders' \
--header 'Kashier-Hash: your_generated_hash' \
--header 'Content-Type: application/json' \
--data '{
"apiOperation": "GENERATE_CODE",
"paymentMethod": {
"type": "BASATA",
"basata": {
"mobileNumber": "01001001001"
}
},
"order": {
"reference": "PM-89451648984",
"amount": 10.00,
"currency": "EGP"
},
"interactionSource": "ECOMMERCE",
"reconciliation": {
"webhookUrl": "https://your-call-back-url.com",
"merchantRedirect": "https://your-call-back-url.com"
},
"merchantId": "MID-XXXXX-XXX"
}'Body description
| Parameter | Type | Required | Description |
|---|---|---|---|
| apiOperation | String | Yes | Must be set to 'GENERATE_CODE' |
| paymentMethod.type | String | Yes | Must be set to 'BASATA' |
| paymentMethod.basata.mobileNumber | String | Yes | Customer's mobile number |
| order.reference | String | Yes | Unique order reference ID (can be generated using a timestamp) |
| order.amount | Number | Yes | Transaction amount |
| order.currency | String | Yes | Currency code (e.g., 'EGP') |
| interactionSource | String | Yes | Source of interaction (typically 'ECOMMERCE') |
| reconciliation.webhookUrl | String | Yes | URL for webhook notifications |
| reconciliation.merchantRedirect | String | Yes | URL to redirect the customer after the transaction |
| merchantId | String | Yes | Your merchant ID provided by Kashier |
Response structure
This 00 / SUCCESS means the code was generated, not that the customer paid
The transactionResponseCode: "00" / "Approved" below means the code was generated.
The order is created with status INITIATED, not paid. The customer still has to take the reference code to a Basata
outlet. Treat the completion webhook (event: pay, status: SUCCESS) as the
authoritative "customer has paid" signal — never this response.
{
"response": {
"apiOperation": "GENERATE_CODE",
"operation": "generate_code",
"currency": "EGP",
"result": "SUCCESS",
"status": "SUCCESS",
"authorizationNumber": "",
"authentication": {},
"paymentMethod": {
"type": "BASATA",
"basata": {
"mobileNumber": "01001001001",
"referenceCode": "XXXXXXXX",
"expireAt": "2025-04-06T13:05:45.007Z"
}
},
"metaData": {
"merchantWebhook": "https://your-website.com/paymentWebhook"
},
"reconciliation": {
"webhookUrl": "https://your-call-back-url.com",
"merchantRedirect": "https://your-call-back-url.com?&signature=",
"redirect": false
},
"merchantId": "MID-XXXXX-XXX",
"order": {
"amount": 10,
"currency": "EGP",
"callbackURL": "https://your-call-back-url.com",
"systemOrderId": "ORDER_ID",
"reference": "test12d34"
},
"amount": 10,
"totalRefundedAmount": 0,
"totalCapturedAmount": 0,
"totalAuthorizedAmount": 0,
"merchantRedirectUrl": "https://your-call-back-url.com?&signature=",
"method": "basata",
"creationDate": "2025-04-06T14:05:44.981Z",
"orderId": "ORDER_ID",
"provider": "basata",
"merchantOrderId": "test12d34",
"orderReference": "TEST-ORD-XXXXX",
"interactionSource": "ECOMMERCE",
"transactionId": "TX-XXXXXXXXXX",
"transactionResponseCode": "00",
"transactionResponseMessage": {
"en": "Approved"
}
},
"messages": {
"en": "Approved"
},
"status": "SUCCESS"
}Key response fields
| Parameter | Description |
|---|---|
| response.result | Result of the operation ('SUCCESS' or error) |
| response.paymentMethod.basata.referenceCode | The generated Basata reference code |
| response.paymentMethod.basata.expireAt | Expiration time for the reference code |
| response.transactionId | Unique transaction ID |
| response.order.systemOrderId | System-generated order ID |
Hash calculation
const path = `/?payment=${merchantId}.${order.reference}.${order.amount}.${order.currency}`;
const hmac = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, apikey).update(path);
const hash = hmac.finalize().toString(CryptoJS.enc.hex);This is the standard payment hash — see Request hashing for the full recipe and the other signed-string forms.
Error handling
The API may return error responses with appropriate HTTP status codes and error messages. Common error scenarios include:
-
Invalid authentication (incorrect hash)
-
Missing required parameters
-
Invalid parameter values
-
System errors
Error responses will include a status field with a value other than "SUCCESS" and detailed error messages.
Aman: installment at kiosk
Aman is an installment-at-kiosk method: instead of a static reference code, the customer completes an OTP-verified installment purchase through Aman. Use paymentMethod.type: "aman" for the order's payment method, the same way you'd use basata or cash.
An Aman payment progresses through five steps, each a separate apiOperation against the order:
| Step | apiOperation | What happens |
|---|---|---|
| Initiate purchase | initiate_purchase | Starts the Aman flow for the order. |
| Send OTP | send_otp | Aman sends a one-time password to the customer. |
| Pay | pay | The customer's OTP is submitted and the purchase completes. |
| Reconcile | reconcile | Kashier confirms the transaction status with Aman. |
| Refund | refund | Reverses a completed Aman transaction. |
Aman payments return Aman's own numeric result codes rather than the standard dictionary.
After a successful pay or reconcile, the order's payment-method data is enriched with the installment details Aman returns:
| Field | Meaning |
|---|---|
transactionId | Aman's transaction reference |
cardNumber | Card used for the installment |
firstInstallmentDate | Date of the first installment |
lastInstallmentDate | Date of the last installment |
adminFees | Administrative fee charged by Aman |
As with Basata, treat the completion webhook (event: pay, status: SUCCESS) as the authoritative "customer has paid" signal, not any intermediate response.
Cash: mark-as-paid
paymentMethod.type: "cash" — generic Cash — is not a reference-code rail like Basata. It records a payment you already collected through another channel; it is not a real-time authorization.
Not a real-time authorization
Use Cash only to record a payment you already collected through some other channel — not as a way to accept a real-time cash payment.
Contact and other BNPL providers
Contact (paymentMethod.type: "contact") is not a cash/kiosk method despite the superficial similarity — in Kashier it's a BNPL/installment provider with its own payment flow. See Installment plans → BNPL providers for Contact alongside Octo, Souhoola, Mogo, Tru, and Forsa.