Step 3: convert a card

Now that we have an active virtual card, we can order a physical one.

For this, you'll need to provide a recipient address. In a production environment, we'll send the card there. In a sandbox environment, no physical card is actually sent out.

info

In this example, we'll be using the recipientAddress object. However, you can also create an address and provide an addressId in the request instead. For more information, see the API reference.

Optionally, you can specify the PIN for this card. If none is provided, we'll automatically generate one for you.

warning

The card you want to convert must be active when you make the request. This request will fail otherwise.

SandboxProduction
Copy
Copied
curl -i -X POST \
  'https://api-sandbox.equalsmoney.com/v2/cards/{cardId}/convert-to-physical?accountId={accountId}&personId={personId}' \
  -H 'Authorization: ApiKey {apiKey}' \ # Your API key
  -H 'Content-Type: application/json' \
  -d '{
    "pin": "{pin}",
    "recipientAddress": {
      "firstName": "{recipientFirstName}",
      "lastName": "{recipientLastName}",
      "address1": "{recipientAddressLine1}",
      "city": "{recipientCity"}",
      "postalCode": "{recipientPostalCode}",
      "country": "{recipientCountry}"
    }
  }'
Copy
Copied
curl -i -X POST \
  'https://api.equalsmoney.com/v2/cards/{cardId}/convert-to-physical?accountId={accountId}&personId={personId}' \
  -H 'Authorization: ApiKey {apiKey}' \ # Your API key
  -H 'Content-Type: application/json' \
  -d '{
    "pin": "{pin}",
    "recipientAddress": { # We will send the card to this address in production
      "firstName": "{recipientFirstName}",
      "lastName": "{recipientLastName}",
      "address1": "{recipientAddressLine1}",
      "city": "{recipientCity}",
      "postalCode": "{recipientPostalCode}",
      "country": "{recipientCountry}"
    }
  }'

If your request is successful, you'll receive a 201 response containing details about your new physical card.

Copy
Copied
{
{
  "forceChangePin": false,
  "id": "0302fbed-6078-4497-a580-61ad686eb228",
  "name": "Marketing",
  "personId": "cfd2431d-a682-4167-adfa-5975bc47aaf5",
  "accountId": "F12345",
  "state": "UNACTIVATED",
  "cardType": "PHYSICAL_MSR",
  "lastFour": "3315",
  "expiration": "0228",
  "cardProductToken": "4ac7a04a-da92-4785-add0-5168abf05683",
  "fulfillmentStatus": "ISSUED",
  "pinIsSet": true,
  "recipientAddress": {
    "address1": "123 Henry St",
    "city": "Porterville",
    "country": "US",
    "firstName": "Jane",
    "lastName": "Doe",
    "postalCode": "93257"
  },
  "cardPersonalization": {
    "text": {
      "nameLine1": {
        "value": "Jane Doe"
      },
      "nameLine2": {
        "value": "CUSTOMER"
      }
    }
  },
  "userTokenId": "5609caee-f89d-4e49-8d2e-6e4d8f8d0422",
  "cardOwnerType": "PEOPLE",
  "cardGroupId": "800065b2-4d12-42ac-940c-00cd930e3758",
  "cardProductId": "8bca2f68-7be0-4276-a125-4570ff54475a",
  "physicalCardState": "UNACTIVATED",
  "updatedAt": "2024-01-18T13:53:01.676Z",
  "createdAt": "2024-01-18T13:53:01.676Z",
  "meta": [
    {
      "id": "c808bb8f-2f5b-4d4e-bd3e-eeb59d42d1c5",
      "metaKey": "expirationTime",
      "metaValue": "2028-02-29T23:59:59Z",
      "cardId": "0302fbed-6078-4497-a580-61ad686eb228",
      "updatedAt": "2024-01-18T13:53:01.682Z",
      "createdAt": "2024-01-18T13:53:01.682Z"
    },
    {
      "id": "88b7c457-0e8f-4551-a555-01129a458ef2",
      "metaKey": "stateReason",
      "metaValue": "New card",
      "cardId": "0302fbed-6078-4497-a580-61ad686eb228",
      "updatedAt": "2024-01-18T13:53:01.688Z",
      "createdAt": "2024-01-18T13:53:01.688Z"
    }
  ]
}

Next