API Keys
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.| Key Type | Prefix | Description |
|---|---|---|
| Secret Key | sk_ | Used for server-side requests. Has full access to your account. Keep secret. |
| Publishable Key | pk_ | Used in client-side code (e.g., React, iOS) to tokenize payment details. Safe to expose. |
Authenticating Requests
Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password. Alternatively, you can authenticate via theAuthorization header using the Bearer scheme.
Example Request
Error Handling
If the API key is missing, malformed, or invalid, the API will return a401 Unauthorized response.