Skip to content
Tranzaq

Get started

Quickstart

Make your first test payout in four steps, with fake money.

1. Create credentials

Sign in to Tranzaq, open Developers, switch to Test, and choose New credentials. Give them a name and the scopes you need. Copy the client ID and the secret now: the secret is shown only once.

2. Get a token

Trade your client ID and secret for a token that lasts an hour.

curl -X POST "https://api.tranzaq.com/oauth/token" \
  -d grant_type=client_credentials \
  -d client_id=tqz_test_1a2b3c4d \
  -d client_secret=$CLIENT_SECRET

3. Add test money and a person

Test credentials can add fake money to the test balance. Then add the person you will pay; send a new Idempotency-Key for each different request.

curl -X POST "https://api.tranzaq.com/api/v1/sandbox/fund" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 5000 }'

curl -X POST "https://api.tranzaq.com/api/v1/beneficiaries" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: person-ama-0001" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Ama Owusu", "destination": { "type": "MobileMoney", "accountNumber": "0241234567", "accountName": "Ama Owusu", "network": "MTN" } }'

4. Create and submit a batch

curl -X POST "https://api.tranzaq.com/api/v1/payout-batches" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: batch-oct-0001" \
  -H "Content-Type: application/json" \
  -d '{ "name": "October salaries", "items": [{ "beneficiaryId": "PERSON_ID", "amount": 100, "reference": "SAL-1" }] }'

curl -X POST "https://api.tranzaq.com/api/v1/payout-batches/BATCH_ID/submit" \
  -H "Authorization: Bearer $TOKEN"

In test mode no approver is needed, so the batch goes straight to the pretend bank. Fetch it with GET /api/v1/payout-batches/{id} and watch each payment move to Success.