Which key to use
Calling from the browser
Calling from the browser
Use the public key. It can read a customer’s subscription status, check feature access and credit balances, list add-ons, and start checkout or the billing page. It cannot create customers, consume credits or cancel anything.
Calling from your backend
Calling from your backend
Use the secret key. It can do everything the API offers. Keep it on the server only.
401, even in the Authorization header.
Testing
Every key has thelive prefix. Whether a payment is real depends on the payment provider credentials you connect, not on the key. To test without real charges, see Test mode.