Getting started
The Obsidian Partner API lets you issue virtual cards and eSIMs to your customers, fund them from your company balance, and follow everything that happens on them.
Before you start
You need three things from Obsidian:
- An API token. One per company. Send it on every request as
Authorization: Bearer <token>. - Your server IPs on the allowlist. Requests from any other IP are
refused with
403 ip_not_allowed. Send support the public IPs your servers call from. - A funded balance. Orders and loads are paid from your company
balance. Check it with
GET /v1/balances.
If you want webhooks for card activity, also send support the HTTPS URL that should receive them. See Webhooks.
Base URL
https://staging.obsidian.cards/api
All paths in this documentation are relative to it, for example
GET /v1/products is https://staging.obsidian.cards/api/v1/products.
Your first card
1. Pick a product.
curl https://staging.obsidian.cards/api/v1/products \
-H "Authorization: Bearer $OBSIDIAN_TOKEN"
A range product accepts any amount between min and max.
2. Check the price.
curl -X POST https://staging.obsidian.cards/api/v1/orders/estimate \
-H "Authorization: Bearer $OBSIDIAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"product_id": 12, "amount": 250}'
3. Place the order.
curl -X POST https://staging.obsidian.cards/api/v1/orders \
-H "Authorization: Bearer $OBSIDIAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"product_id": 12, "amount": 250, "email": "[email protected]", "api_only": true}'
The amount plus fees is debited from your balance straight away, and the
response gives you the order id.
4. Submit the cardholder's details. With api_only: true you send the
cardholder's identity and address yourself, with POST /v1/profiles.
Without it, the cardholder gets an email and fills in their details in the
cardholder portal.
5. Wait for the card. Poll GET /v1/orders/{id} until status is
completed, or listen for the card.status_updated webhook. The order's
card field then holds the card's uuid, which you use for every card
call.
6. Use the card. Read the balance with GET /v1/cards/{uuid}/balance,
show the card details to the cardholder with
POST /v1/cards/{uuid}/secure-data-link, and list transactions with
GET /v1/cards/{uuid}/transactions.
ID-required products
Some products need more than a profile: check each product's
requirements in GET /v1/products. A product with
["end_user_ip", "end_user_country", "identity_document"] needs the
cardholder's device details and identity document. Here is the whole flow
for such a product, with the webhook you receive at each step.
1. Find the product and what it needs.
curl https://staging.obsidian.cards/api/v1/products \
-H "Authorization: Bearer $OBSIDIAN_TOKEN"
{
"id": 31,
"requirements": ["end_user_ip", "end_user_country", "identity_document"],
"api_only": true,
"capabilities": { "reveal": true, "unload": true, "pin": false, "reload": true }
}
capabilities says what you can do with the product's cards. For example,
reveal: true means card details can be shown through
POST /v1/cards/{uuid}/secure-data-link.
2. Place the order.
curl -X POST https://staging.obsidian.cards/api/v1/orders \
-H "Authorization: Bearer $OBSIDIAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"product_id": 31, "amount": 100, "email": "[email protected]", "api_only": true}'
A new cardholder's order is pending_user_profile with
next_action: submit_profile. No webhook yet. For a returning
cardholder (who already has a profile), add end_user_ip and
end_user_country here instead — they skip step 3.
3. Submit the profile, with the device fields.
curl -X POST https://staging.obsidian.cards/api/v1/profiles \
-H "Authorization: Bearer $OBSIDIAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"order_id": 104921, "first_name": "Ana", "last_name": "Silva", "gender": 0,
"dob": "1990-04-12", "address_line_1": "1 Market St", "city": "San Francisco",
"state": "CA", "country": "United States", "zip_code": "94105",
"cell_number": "4155550123", "calling_code": "+1", "country_calling_code": "US",
"email": "[email protected]", "occupation": 16, "nationality": "United States",
"place_of_birth": "USA", "terms_accepted": true,
"end_user_ip": "203.0.113.24", "end_user_country": "US"}'
end_user_ip is the cardholder's own public IP, from their device — never
your server's. A field that breaks the card program's rules is a 422 on
that field. Shortly after, the order moves to pending_identity_document
(next_action: submit_identity_document) and you receive
identity.status_updated with status: required.
4. Send the identity document. Either upload it:
curl -X POST https://staging.obsidian.cards/api/v1/profiles/identity-document \
-H "Authorization: Bearer $OBSIDIAN_TOKEN" \
-F order_id=104921 -F document_type=passport -F document_number=X1234567 \
-F issuing_country=US -F [email protected] -F partner_reference=check-42
→ 201; you receive identity.status_updated with in_review (or
approved straight away). Or, if we have connected your identity
verification account, point to the applicant:
curl -X POST https://staging.obsidian.cards/api/v1/profiles/identity-document \
-H "Authorization: Bearer $OBSIDIAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"order_id": 104921, "kyc_applicant_id": "65f1c2a9e4b0a1b2c3d4e5f6"}'
→ 202; we retrieve the verified document ourselves and you receive
in_review once it is sent. A 503 (identity_verification_unavailable)
means try again after the Retry-After seconds; nothing was kept.
5. Review. The order shows pending_approval (next_action: wait)
while the document is reviewed. You receive identity.status_updated with:
approved— the card is being issued;resubmission_required— send a new document for the same order (next_actionissubmit_identity_documentagain);rejected— the order isfailed; place a new order to try again.
6. Completed. You receive card.status_updated with status: loaded;
the order is completed (next_action: null) and its card field holds
the card uuid.
Testing
We don't offer a separate sandbox or test-mode token yet. Every order is real and is paid from your balance. To try the API safely:
- Read-only calls (
GET /v1/products,GET /v1/balances,POST /v1/orders/estimate) cost nothing. - Place orders with the product's minimum amount, and cancel any you don't
need with
POST /v1/orders/{id}/cancelwhile they are still pending (before a card exists) — the full total is refunded. - To check your webhook endpoint, use Settings → Webhooks → Send test event in the partner portal: it sends a signed test payload to your URL. The same page lists every delivery with its result, and lets you redeliver one. There is no API endpoint for test events.
Next
- Authentication: tokens, the IP allowlist and request format
- Errors: the error format and the codes you'll see
- Orders and cards: every status and what it means
- Webhooks: events, signatures and retries
- API reference: every endpoint