2. Get your Sandbox API key

Obtain a key and authenticate your first API call.

Generate a key

  1. In the Sandbox dashboard, go to Settings > Developer Settings.
  2. Click Generate API Key in the top right.
  3. Copy the key and store it in a secure location (a secret manager or environment variable — never in source control).

You can view your keys again anytime in Developer Settings. If a key may have been exposed, delete it there and generate a new one.

Sandbox keys always start with sodagift_test_, production keys with sodagift_live_ — so you can tell at a glance which environment a key belongs to. Paste the entire key (including the prefix) wherever YOUR-API-KEY appears in the examples below.

Use the key

Pass the key in the SODA-API-KEY header on every request:

curl --request GET \
     --url 'https://biz-sandbox-api.sodagift.com/v1/accounts/balance' \
     --header 'SODA-API-KEY: YOUR-API-KEY' \
     --header 'accept: application/json'

You should get back your Sandbox balance — new accounts start with $5,000 of test credit:

{
  "amount": 5000.0,
  "currency": "USD",
  "payment_method": "PREPAID"
}

If the key is missing or wrong, the API returns 401 with an empty body. See Authentication for details.

Next: send your first reward →


Did this page help you?