This is the API reference for Twig's APIs. The APIs are organized around resources using URLs and return JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
You authenticate using the credentials (API KEY). The API key you use to authenticate the request determines whether the request is live mode or test mode.
You can get an API Key by emailing us at [email protected]. First, a merchant account is created then the api key will be delivered to you via email.
<aside> <img src="https://beestat.io/img/notion/info.svg" alt="https://beestat.io/img/notion/info.svg" width="40px" /> Anyone with this API Key can use the Twig API . If it is compromised, please send an email and it can be deactivated or changed.
</aside>
To setup a merchant account we need some additional info (attached to the API key request):
Info | Description |
---|---|
domain | domain of the e-commerce |
country | the country operating or where the company is headquartered |
language | default language |
confirm url | url for the user to be redirected if order is confirmed. |
Note: if path param used then end the url with “/”, if query param end it with “?<yourparam>=”. | |
cancel url | url for the user to be redirected if order is cancelled |
Note: if path param used then end the url with “/”, if query param end it with “?<yourparam>=”. | |
push url | since the order processing is asynchronous, this url will be used to notify the merchant for order updates |
Twig API uses API keys to authenticate requests. Test mode keys have the prefix test_ and live mode have the prefix live_.
There are three header properties that you must include in every API call.
x-api-key
****An alpha-numeric string that gives you access to use the API.