We're happy that you've decided to explore our REST APIs. To get started, you'll first need access to a sandbox/production account, set up your sandbox/production environment, and get access to API and Notification token for the sandbox/production environments.
Getting a merchant account
When you sign up for a merchant account, you will be provided with an API token and Notification token. You authenticate with our API by providing the appropriate API token in the request Authorization header.
Authorization: Bearer Token
We use Notification token to authenticate back when sending our notification data to your web-hook URL. This JWT token will be attached in the Authorization header.
Authorization: Bearer JWT Token
In order to validate this token, please use JWT decode with the HS256 algorithm and your given notification token.
Never share your secret tokens. Keep them guarded and secure.Making REST API calls
To make a REST API call, include the URL associated with the sandbox or live environment.
For Sandbox:
https://merchant-sandbox.qashi.co
For Production:
Will be provided with on-boardnig.
Common error codes
Belows are the common error codes when calling create checkout session API
| CODE | DESCRIPTION |
|---|---|
| total_amount_invalid_limit | The total amount reached the min/max limit |
| consumer_empty_first_name | Missing the first name of a customer |
| consumer_invalid_phone_number | Customer's phone number is invalid |
| consumer_invalid_email | Customer's email is invalid |
| consumer_empty_email | Customer's email is empty |
| total_amount_invalid_currency | We do not support cross currencies. Most likely the customer is buying from a non-supported country |
| not_supported_delivery_country | Not supported country |