Skip to main content

Welcome

This quickstart guide will walk you through making your first API call to the Digitzs API. By the end of this guide, you’ll have authenticated with the API, created a merchant account, and processed a test payment.
This guide uses test credentials and test card numbers. No real money will be processed.

Before You Begin

You’ll need the following credentials provided during onboarding:

API Key

Your unique x-api-key

Application ID

Your appId

Test Mode

Ensure you’re using test credentials

Step 1: Generate Authentication Tokens

First, generate the necessary authentication tokens to make API calls.

1.1 Create App Key

curl -X POST https://api.digitzs.com/auth/key \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "type": "auth",
      "attributes": {
        "appId": "YOUR_APP_ID"
      }
    }
  }'
Response:
{
  "data": {
    "type": "auth",
    "id": "YOUR_API_KEY",
    "attributes": {
      "appKey": "generated-app-key-abc123"
    }
  }
}
Save the appKey from the response. You’ll need it for the next step.

1.2 Create App Token

Use the app key to generate an access token:
curl -X POST https://api.digitzs.com/auth/token \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "type": "auth",
      "attributes": {
        "appKey": "YOUR_APP_KEY_FROM_STEP_1"
      }
    }
  }'
Response:
{
  "data": {
    "type": "auth",
    "id": "YOUR_API_KEY",
    "attributes": {
      "appToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
    }
  }
}
App tokens expire after 1 hour. Implement token refresh logic in your application.

Step 2: List Merchants

Check existing merchants in your account:
curl -X GET https://api.digitzs.com/merchants \
  -H "Authorization: Bearer YOUR_APP_TOKEN" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "appId: YOUR_APP_ID"

Test Cards

Use these test card numbers in test mode:
Card NumberResult
4111111111111111Successful charge
4000000000000002Card declined
4000000000009995Insufficient funds
Use any future date for expiration and any 3-digit CVV for test cards.

What’s Next?

Congratulations! You’ve successfully authenticated with the Digitzs API.

Next Steps

Need Help?

Contact Support

Our team is here to help with any questions or issues