Questa pagina è disponibile solo in inglese.Apri in inglese
Invites
The API creates and changes the same invites of the panel, with the same rules. Only the mode of your app (Open, Private or Embedded) is changed only in the panel.
The invite
{
"id": "inv_8QX4M2T7KA9PB",
"status": "pending",
"phone": "+14155550167",
"name": "Liam",
"externalRef": "crm-1042",
"link": "https://cards.example.com/invite/9f3a…",
"createdAt": "2026-11-16T10:00:00Z",
"expiresAt": "2026-12-16T10:00:00Z",
"usedAt": null,
"userId": null,
"canResume": false
}
status | Meaning |
|---|---|
pending | Nobody used it. A pending invite has a link |
used | The account was born. userId is the user |
paused | Paused |
revoked | Revoked, for good |
expired | 30 days without use |
When an invite is revoked or expires without use, email, phone and name turn null.
used means the account was born, when the mobile number was confirmed. The identity verification comes after it, on the same link: follow it in user.kyc.updated. canResume is true when the account of the invite can go on from the invite page: the verification stopped halfway, or the card issuer asked to verify again. While it is true, the used invite shows its link again and resend creates a new one. The account takes the mode your app has when the person opens the invite.
Routes
| Route | What it does |
|---|---|
GET /v2/invites | The last 100 invites, with the mode of your app and your invite credit. Filters status and externalRef |
GET /v2/invites/{id} | One invite |
POST /v2/invites | Creates an invite |
POST /v2/invites/{id}/pause | Pauses a pending or used invite |
POST /v2/invites/{id}/resume | Resumes it |
POST /v2/invites/{id}/revoke | Revokes it |
POST /v2/invites/{id}/resend | A new link for a pending invite, or for a used one with canResume: the old link stops working and the 30 days start again, with no credit used |
Every POST needs an Idempotency-Key. An action that does not apply to the state of the invite answers 403 not_allowed, reason nothing_to_do.
Create an invite
curl -X POST https://api.sandbox.creditcard/v2/invites \
-H "Authorization: Bearer w3c_test_YOUR_SECRET" \
-H "Idempotency-Key: invite-crm-1042" \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "phone": "+14155550167", "name": "Liam", "externalRef": "crm-1042"}'
| Field | Rule |
|---|---|
email | Required. The person never types it: the invite carries it |
phone | Required, with + and the country code |
name | Optional, up to 80 characters. It only greets the person |
externalRef | Optional, up to 100 characters: the id of the person in your system. It comes back in the users and in the events |
The answer is {"success": true, "invite": {...}}. Send the link to the person. The price of the invite comes out of your invite credit.
| Error | When |
|---|---|
409 insufficient_credit | Not enough invite credit. Add credit to send invites. |
409 invite_exists | There is already a pending invite for this person. |
409 person_already_registered | This person already has an account in this program. |
403 not_allowed, reason country_not_served | This country cannot be served. The mobile number is from a country that no program serves |
403 not_allowed | No paid plan, or the program contract was not created yet |
Events
invite.created, invite.paused, invite.resumed, invite.revoked and invite.expired, with inviteId, status and externalRef. When the account is born, user.created brings userId, inviteId, externalRef and mode. See Webhooks.
Paused and revoked accounts
When the invite of a person who already has an account is paused or revoked, new cards and top-ups of that account are refused with 403 not_allowed, reason account_paused (The company paused new cards and loads for this account.) or account_revoked (The company revoked new cards and loads for this account.). The cards keep working with their balance.