Checkout/Create Session
POST
/checkout/api/sessionCreate Payment Session
Initiates a new checkout session for an order. Returns a redirectURL — send your user there immediately to complete payment on the Kuickpay hosted page.
1Create Session
→2Redirect User
→3Handle Return
Authentication
Use HTTP Basic Auth. Encode your credentials as:
Authorization: Basic base64(CompanyID:SecuredKey)Never expose your SecuredKey on the frontend. Always call this endpoint from your backend server.
Signature Required
Every request must include a valid HMAC SHA256 signature. See the Signature Guide for the full generation algorithm.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
companyid | string | required | Your Company ID provided by Kuickpay. |
orderid | string | required | Unique order identifier from your system. Used for reconciliation. |
amount | string | required | Order amount (e.g. "1250.00"). |
amountPayable | string | required | Total amount the user should pay. Usually equal to amount. |
timestamp | string | required | ISO 8601 timestamp of the request (e.g. "2025-05-06T10:00:00Z"). |
transactiondescription | string | optional | Brief description shown on the payment page. Optional — not included in the signature. |
returnurl | string | optional | URL to redirect the user after payment. Must be HTTPS. Optional — not included in the signature. |
signature | string | required | HMAC SHA256 signature computed from only the 5 fields above (companyid|orderid|amount|amountPayable|timestamp). See Signature Guide. |
Response
{
"responseData": {
"responseCode": "00",
"responseDescription": "Session started successfully",
"status": "success",
"checkoutToken": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...<truncated>",
"companyID": "01234",
"countryCode": "92",
"defaultGateway": "APPSCARD",
"sessionID": "cacaa5d8-f4d7-4ee9-8674-19673618492b",
"redirectURL": "https://uatpayments.kuickpay.com/cardinfo/cacaa5d8-f4d7-4ee9-8674-19673618492b"
}
}Response Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
responseCode | string | required | "00" on success. Other values indicate failure. |
responseDescription | string | required | Human-readable result message. |
status | string | required | "success" when the session was created. |
checkoutToken | string | required | JWT identifying this checkout session. |
companyID | string | required | Echoes your Company ID. |
countryCode | string | required | Country code associated with your company (e.g. "92" for Pakistan). |
defaultGateway | string | required | Default payment gateway/channel for this session (e.g. "APPSCARD"). |
sessionID | string | required | Unique session identifier (UUID). |
redirectURL | string | required | URL to redirect the user to — completes payment on Kuickpay's hosted page. |
Next Step
Redirect your user to
responseData.redirectURLCreate Session — Request
# Encode credentials: base64(CompanyID:SecuredKey)
CREDENTIALS=$(echo -n "your_company_id:your_secured_key" | base64)
curl -X POST https://sandbox-api.kuickpay.com/checkout/api/session' \
-H "Authorization: Basic $CREDENTIALS" \
-H "Content-Type: application/json" \
-d '{
"companyid": "your_company_id",
"orderid": "ORDER-20250506-001",
"amount": "1250.00",
"amountPayable": "1250.00",
"timestamp": "2025-05-06T10:00:00Z",
"transactiondescription": "Order payment",
"returnurl": "https://yoursite.com/payment/return",
"signature": "<hmac_sha256_signature>"
}'