Step 1: create a card

You can create a card for either a person (individual card) or a given budget (shared card).

In this example, we're creating an individual card for a specific person.

SandboxProduction
Copy
Copied
curl -i -X POST \
'https://api-sandbox.equalsmoney.com/v2/cards?accountId={accountId}' \
  -H 'Authorization: ApiKey {apiKey}' \ # Your API key
  -H 'Content-Type: application/json' \
  -d '{
    "personId": "{personId}", # The ID of the person that the card should belong to
    "cardOwnerType": "PEOPLE",
    "budgets": [
      {
        "budgetId": "{budgetId}", # The ID of the budget that the card should be associated with
        "active": true
      }
    ],
    "name": "Marketing" # The name of this new card
  }'
Copy
Copied
curl -i -X POST \
'https://api.equalsmoney.com/v2/cards?accountId={accountId}' \
  -H 'Authorization: ApiKey {apiKey}' \ # Your API key
  -H 'Content-Type: application/json' \
  -d '{
    "personId": "{personId}", # The ID of the person that the card should belong to
    "cardOwnerType": "PEOPLE",
    "budgets": [
      {
        "budgetId": "{budgetId}, # The ID of the budget that the card should be associated with
        "active": true
      }
    ],
    "name": "Marketing" # The name of this new card
  }'

If your request is successful, you'll receive a 201 response.

Copy
Copied
{
  "forceChangePin": false,
  "id": "800065b2-4d12-42ac-940c-00cd930e3758",
  "name": "Marketing",
  "personId": "cfd2431d-a682-4167-adfa-5975bc47aaf5",
  "accountId": "F12345",
  "state": "UNACTIVATED",
  "cardType": "VIRTUAL_PAN",
  "lastFour": "3315",
  "expiration": "0128",
  "cardProductToken": "23ada04b-5b3b-4b73-8343-da3f14d8d96f",
  "fulfillmentStatus": "ISSUED",
  "pinIsSet": false,
  "userTokenId": "5609caee-f89d-4e49-8d2e-6e4d8f8d0422",
  "cardOwnerType": "PEOPLE",
  "cardGroupId": "800065b2-4d12-42ac-940c-00cd930e3758",
  "cardProductId": "029bddac-7ef0-11ee-8764-06395f802f08",
  "physicalCardState": "NOT_REQUESTED",
  "updatedAt": "2024-01-18T13:42:51.071Z",
  "createdAt": "2024-01-18T13:42:51.071Z",
  "meta": [
    {
      "id": "8a98c26c-8196-4f40-ba72-037569a0a8d0",
      "metaKey": "expirationTime",
      "metaValue": "2028-01-31T23:59:59Z",
      "cardId": "800065b2-4d12-42ac-940c-00cd930e3758",
      "updatedAt": "2024-01-18T13:42:51.078Z",
      "createdAt": "2024-01-18T13:42:51.078Z"
    },
    {
      "id": "ee473b51-d16b-429d-8017-d13cd2361925",
      "metaKey": "stateReason",
      "metaValue": "New card",
      "cardId": "800065b2-4d12-42ac-940c-00cd930e3758",
      "updatedAt": "2024-01-18T13:42:51.082Z",
      "createdAt": "2024-01-18T13:42:51.082Z"
    }
  ]
}

Next