Overview

The Violet API provides developers with access to two environments - sandbox and live. From the experience of the developer, these environments are nearly identical with only two primary differences.

  1. When an order is placed in the sandbox environment no dollars are transacted and no orders are fulfilled. When an order is placed in the live environment dollars are transacted and orders will be received and fulfilled by real merchants.
  2. The sandbox product catalog is mostly static and much smaller than the live product catalog. The live product catalog is constantly growing as more merchants join Violet.

Sandbox

When first created your app will be limited to the Sandbox environment. This allows you to build and fully test out your application without the risk of transacting real dollars. The sandbox product catalog provides you with a few thousand products across multiple taxonomies and complexities. These test products do live on private stores on real e-commerce platforms (ex. Shopify, Ecwid, etc) so you will be able to fully validate that your requests are working just as they would when using the live environment.

Depending on the product(s) ordered you may receive a confirmation email from the store that the sandbox products are sourced from when your order is placed. These are automated by the e-commerce platform and are similar to the emails that your customers may receive when making live purchases through your application.

We typically recommend channels create a test e-commerce store and connect it to our test environment so you can perform all actions related to the checkout/returns/refund process yourself as you are testing. It can also be helpful if a merchant partner has a test store they use for their own development needs to connect that test store so you can iron out any issues in your integration before connecting their live store to your live app. You can access your test mode Violet Connect url in the app settings page. Note that all test apps will have a unique guid assigned for their url. Also note that it points to connect.violet.dev the dev meaning our test environment.

We strongly advise you to NOT connect any live merchant stores to your test environment as this could lead to real products being shipped due to test orders placed.

Test mode can be managed just like live mode in your channel dashboard. Flip the live/test toggle to test mode and you will see all your test merchants, test orders, etc. You can find your appId and appSecret on the overview page. You will need these tokens as well as the app owner’s email and password to authenticate against the test api. In this documentation and associated postman collections, we point to our test mode domain which is sandbox-api.violet.io. The postman collection is useful when getting started, but as you begin building your real app and systems we recommend you maintain your own test environment that points to our sandbox test environment so that you can validate changes made to your app before deploying to prod.

Sandbox Order Payment

When applying a payment method to an order in the sandbox environment you will need to use a test credit card number.

For successful results

Please use one of the following:

CardNumber
Visa4242 4242 4242 4242
Mastercard5555 5555 5555 4444
American Express3782 822463 10005

To emulate payment failure

Please use one of the following:

CardNumber
Card Declined4000 0000 0000 0002
Insufficient Funds4000 0000 0000 9995
Expired Card4000 0000 0000 0069
Invalid CVC4000 0000 0000 0127
Invalid Number4242 4242 4242 4241
Processing Failure4000 0000 0000 0119

For additional test card numbers please visit Stripe

When you are ready to go live with your application please contact us at support@violet.io

Live

When your application has been approved you will gain access to the live environment. The live environment provides a developer with access to the live catalog of products. These are products associated with real stores where successful purchases result in true order fulfillment. The live product catalog is constantly growing. Each time a new merchant joins Violet, the catalog increases in size.

When making purchases against the live environment true credit card numbers are required. The test credit card numbers available in sandbox will not work when making requests against the live API.

The hostname for this environment is api.violet.io. You will need a different appSecret for this environment, while your appId, email and password will be the same across environments. While you appSecret will be accessible from the same place in the dashboard, you will need to complete the go live requirements you received as part of onboarding before you will be issued a live appSecret. The same goes for your Violet Connect url, you will be able to customize this but only after meeting the same go live requirements. Again note that in the live case, the url is connect.violet.io.

You can request Violet to review your application to make it live by sending us an email at support@violet.io. Access to the Live environment is granted upon the successful review of a developers application. If the business model and application quality meet our requirements a developers Live API credentials will be enabled.