Voucherly API
Introduction
The Voucherly API is organized around REST. Our API has predictable resource-oriented URLs, accepts request bodies and returns responses in JSON-encoded format (using camelCase notation), and uses standard HTTP response codes, authentication, and verbs.
You can use the Voucherly API in sandbox mode, which doesn't affect your live data or interact with the banking networks. The API key you use to authenticate the request determines whether the request is live mode or test mode.
https://api.voucherly.it
Authentication
The Voucherly API uses API keys to authenticate requests. Sandbox mode secret keys have the prefix sk_sand_ and live mode secret keys have the prefix sk_live_. You can view and manage your API keys in the Voucherly Dashboard.
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Publishable keys (pk_sand_, pk_live_) are meant for client-side code and are not accepted by this API: every request authenticated with one is rejected with 401 Unauthorized and the message "This API call cannot be made with a publishable API key. Use your secret key from your server."
Provide your API key as the "Voucherly-API-Key" header. For example:
-H "Voucherly-API-Key: sk_sand_BYsZDnaUWfVKGwHFvLop0dc9Fp1mE8py2Mtgm5aU6IrtCiuJg9s4747J"
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Authentication
- API Key: Voucherly-API-Key
- API Key: Voucherly-Merchant-Id
- API Key: Voucherly-Tenant
Sandbox mode secret keys have the prefix sk_sand_ and live mode secret keys have the prefix sk_live_. Publishable keys (pk_) are not accepted.
Platform keys (ik_) are issued to Voucherly products rather than to a merchant. They declare the merchant they operate on with the Voucherly-Merchant-Id header, and, when the key itself states no environment, the environment with the Voucherly-Tenant header.
Security Scheme Type: | apiKey |
|---|---|
Header parameter name: | Voucherly-API-Key |
Declares the merchant a request operates on. Required with a platform key (ik_), which belongs to no merchant; rejected with 401 Unauthorized on a key that already belongs to one. A request that omits it where a merchant is needed is rejected with 400 Bad Request.
Security Scheme Type: | apiKey |
|---|---|
Header parameter name: | Voucherly-Merchant-Id |
Declares the environment a request operates on, live or sand. Required with a platform key that states no environment of its own (ik_ with no live/sand segment); rejected with 401 Unauthorized on a key that already states one, and on any value other than live or sand. A request that omits it is rejected with 400 Bad Request, except on the endpoint that looks up an ecommerce site, which is the call that reveals which environment to declare.
Security Scheme Type: | apiKey |
|---|---|
Header parameter name: | Voucherly-Tenant |
Contact
API Support: support@voucherly.it
Terms of Service
https://legal.voucherly.it/terms/service/