Everything you need to integrate with the CaliBear Credit Union transaction API.
Before you can call the API, you need to register and get your credentials.
clearinghouse_id and an api_key./transaction/ — without the trailing slash you'll get a 404.
| Header | Value | Description |
|---|---|---|
Content-Type |
application/json |
Tells us you're sending JSON. |
x-api-key |
Your API key | Your secret credential token. Starts with credential_token_. This goes in the header, not the body. |
Send these fields as a JSON object in the body of your POST request:
| Field | Type | Required | Description |
|---|---|---|---|
clearinghouse_id |
string | Yes | Your unique clearinghouse identifier (starts with CH-). |
card_number |
string | Yes | The 16-digit card number. Send as a string, don't strip leading zeros. |
amount |
number | Yes | Dollar amount. Must be a positive number (e.g., 150.75). Not a string. |
transaction_type |
string | Yes | "withdrawal" or "deposit". Lowercase only. |
merchant_name |
string | Yes | Name of the merchant (e.g., "Walmart"). |
Your API key goes in the request header as x-api-key, not in the body. Your clearinghouse_id goes in the body. Both are required on every request.
x-api-key from your header and clearinghouse_id from the body.card_numberactiveamount does not exceed available balancecard_numberactivecard_numberactiveCustomer buying $42.50 at Walmart with their debit card:
Customer charging $250.00 at Best Buy on their credit card:
Merchant account receiving $150.00 from a sale:
clearinghouse_id and api_key you received when you registered at www.calibear.credit.
| Code | Meaning | When It Happens |
|---|---|---|
| 200 | OK — Approved | Transaction went through successfully. |
| 400 | Bad Request | Missing fields, invalid amount, or bad transaction_type. |
| 401 | Unauthorized | Credentials missing, wrong, or revoked. |
| 403 | Declined | Business rule rejection (see message for reason). |
| 404 | Not Found | Card number doesn't exist in our system. |
| 500 | Server Error | Something broke on our end. Try again. |
When a transaction is declined (403), the message field tells you exactly why:
| Message | What It Means |
|---|---|
DECLINED - INSUFFICIENT_FUNDS | Debit withdrawal exceeds available balance. |
DECLINED - CREDIT_LIMIT_EXCEEDED | Credit withdrawal would exceed credit limit. |
DECLINED - DAILY_LIMIT_EXCEEDED | Today's total would exceed the daily limit. |
DECLINED - ACCOUNT_FROZEN | Account is frozen. |
DECLINED - ACCOUNT_CLOSED | Account has been closed. |
DECLINED - ACCOUNT_OVERDRAWN | Account is overdrawn. |
| Problem | What to Check |
|---|---|
Getting 404 on the endpoint |
Make sure your URL ends with /transaction/ (trailing slash required). |
Getting 401 Unauthorized |
Check that x-api-key is in the header (not body). Check clearinghouse_id is in the body. Both are case-sensitive. |
Getting 400 Bad Request |
Send all 5 body fields. Make sure amount is a number not a string. transaction_type must be "withdrawal" or "deposit" exactly. |
Getting 404 on a card |
The card number doesn't exist. Check you're using the right 16-digit number as a string. |
Getting 403 Declined |
Read the message field — it tells you exactly why. |
Getting 500 |
Server error. Try again. If it persists, contact us. |
| Request hangs | Make sure you're sending POST not GET. Verify both headers are set. |
| JSON parse error | Check for trailing commas, unquoted keys, or invalid JSON. |
| Don't have credentials | Go to www.calibear.credit and register. |
200 Approved 400 Bad request 401 Auth failed 403 Declined 404 Not found 500 Server error