How to activate a card with the card ID
In this tutorial, you'll learn how to
Register the relevant webhooks
Activate a debit card using the card ID
If you are new to card issuing we recommend you read the card issuing management documentation before starting this tutorial.
The tutorial assumes you have a knowledge of APIs and how they work. For more information on sending API calls, see the API overview page.
The tutorial uses these API endpoints
API |
Description |
---|---|
Activates the card using the card ID |
The tutorial uses these webhooks.
Webhook |
Description |
---|---|
|
Debit card activated |
Before you begin
Make sure you have:
- Card ID from when you ordered the card
1. Register the relevant webhook events
To receive the webhook events for this tutorial both partner accounts need to register each specific webhook event type. Once you are registered, the event objects are sent to the registered URLs.
The event object contains a list of resource identifiers used to download details on each event.
2. Activate the card
Activate the card you created in the order a card tutorial.
a. To activate a card using the card ID
-
Call
POST /cardmanagement/v1/cards/{id}/activate
. Theid
attribute must be set to the card ID. In the sample below the ID is 8709163d-140c-4d95-a111-afa8009e9cd1. A full list of attributes is found here.CopySample activate card requestcurl -X POST
--header 'Accept: application/json'
--header 'Authorization: Bearer '<token>'
https://sandbox.crbcos.com/CardManagement/v1/cards/8709163d-140c-4d95-a111-afa8009e9cd1/activate' -
A successful API call returns a JSON response with the details of the card. The card
status
is nowactivated
. TheOrderStatus
isCompleted
. -
When the card status changes to
Active
, theCards.Card.Activated
webhook event fires.
{
"id": "8709163d-140c-4d95-a111-afa8009e9cd1",
"partnerId": "cd9c12f4-7691-424a-b38b-af5b0134c611",
"productId": "83bed086-8182-4151-a1e3-af5b01362783",
"processorCardId": "804951250206718",
"accountNumber": "2608927303",
"status": "Active",
"statusReasonCode": "NotSet",
"firstName": "John",
"lastName": "Smith",
"shippingAddress": {
"street1": "Lane Ave",
"street2": "string",
"city": "Big Town",
"state": "IL",
"postalCode": "72410",
"countryCode": "US"
},
"billingAddress": {
"street1": "Lane Ave",
"street2": "string",
"city": "Big Town",
"state": "IL",
"postalCode": "72410",
"countryCode": "US"
},
"phone": {
"phoneType": "Home",
"phoneNumber": "9133413131"
},
"emailAddress": "john@anygoogle.com",
"nameOnCard": "John Smith",
"panLastFour": "3629",
"isPinSet": false,
"expirationDate": "2026-02-13",
"adminBlocked": false,
"fraudSuspect": false,
"configurationId": "a6b5a94c-f8f9-462b-8ce8-afa400f5b640",
"category": "Credit",
"paymentInstrument": "VirtualPan",
"processor": "i2c",
"shippingType": "Normal",
"orderStatus": "Completed",
"replacementStatus": "NotApplicable",
"customerId": "2b15a695-13dc-4b10-b4e5-af5b0138873c",
"clientIdentifier": "string",
"processorCustomerId": "T83E9D675A3N3N9O8RZ1",
"createdAt": "2023-02-13T04:37:29.487-05:00",
"initialActivation": "2023-02-13T00:00:00-05:00",
"activatedAt": "2023-02-13T04:43:19.282287-05:00",
"lastModifiedAt": "2023-02-13T04:43:19.2962845-05:00"
}
Cards.Card.Activated webhook event
{
"id": "95ac33ca-3d7f-49aa-bfc2-afce01113310",
"eventName": "Cards.Card.Activated",
"status": "Pending",
"partnerId": "cd9c12f4-7691-424a-b38b-af5b0134c611",
"createdAt": "2023-02-13T04:44:31.282287-05:00",
"resources": [
"cardmanagement/v1/cards/8709163d-140c-4d95-a111-afa8009e9cd1"
],
"details": [
{
"cardId": "8709163d-140c-4d95-a111-afa8009e9cd1",
"status": "Active",
"statusReasonCode": "NotSet"
}
]
}