Activating cards

Named Cards (Virtual and Physical)

Once you emit a card, it will be created and set as blocked until it is manually activated.

  • Virtual Cards: You'll want to activate it immediately after the emission for enabling it for purchases.

  • Physical Cards: For security reasons, only activate it when it arrives in the hands of your consumer.


Example:

const walletId = '2724434a-22fd-484e-b7da-596ffb1908ca';
const cardId = 'e79e22f7-b6a1-4963-802d-00eb7c0dfd95';

await bitcapital.cards().activate(walletId, {
  // The card to be activated
  cardId,
  // The initial password for this card, you may change it anytime you need
  password: '1234',
});
curl --location --request POST 'https://instance-url.btcore.app/wallets/ad398140-8eee-4976-b8b9-ef1af56f5e60/cards/502401d9-cd39-431b-8bc9-84b79d957ab3/activate' \
--header 'Authorization: Bearer 0000000000000000000000000000000000000000'\
--header 'Content-Type: application/json' \
--data-raw '{
	"password": "1234"
}'

No-named Cards (Physical)

For bulk generated cards (without holder name in the plastic) the activation process is different, for the Card ID is not generated until it is assigned to a Wallet.

To activate a no-named card you must use an Unblock Code unique to it. This is configured in the integration of the product with the card and sent to the partner in the bulk emission processing. This can be a numeric, bar or QR Code printed in the card envelope.


Example:

curl --location --request POST 'https://instance.btcore.app/wallets/:walletId/cards/code' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Access Token>' \
--data-raw '{
	"unblockCode": 654321
}'
const walletId = '2724434a-22fd-484e-b7da-596ffb1908ca';

// Usually, the last 6 digits of the card number 
// or a QR code printed in the envelope
const unblockCode = '654321';

// Assign the card from the code
const card = await bitcapital.cards().activateFromCode(walletId, {
  // The unblock code that identifies the card
  unblockCode,
  // The initial password for this card, you may change it anytime you need
  password: '1234',
});

console.log(card);

If needed, call the Activate using the Card ID to re-assign the password or reactivate the card.