Tokenizing Payment Methods with Stripe JS

🚧

Deprecated

The following request is no longer necessary. The Stripe API token is now available on the cart object in the stripe_token property.

Before you are able to tokenize a payment method you will need to obtain the Violet public Stripe token. This token is unlikely to change often so it can be cached for extended periods of time.

curl https://sandbox-api.violet.io/v1/checkout/payment/token \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json"
{
    "stripe_token": "token-here"
}