Issuing an Additional Card

Add a virtual or physical card to an existing line of credit account.

📘

Important

Certain Credit API endpoints are in a draft status and are subject to change without notice. Thredd may modify interfaces, behaviour, and documentation as development continues.

The Create Card endpoint enables you to issue another card on a line of credit account that already exists. For example, you might issue a second virtual card to a customer who wants one for online spending. An account can hold more than one card, so you can call the endpoint again each time you need to add a card.

The new card belongs to the same cardholder and account. It uses the cardholder details Thredd already holds for the account, including their name, date of birth, contact details and address. You only tell Thredd who the card is for, which card product to issue and the card type.

📘

Note

This endpoint does not create an account. Thredd creates the account when a credit application completes. For more information, see Credit Applications and Origination.

📘

More Information

For more information about the Cards endpoints, see the Cards API Explorer section.

Prerequisites

To integrate calls to the Create Card endpoint, you need:

  • The account_id of the line of credit account to add the card to. This is the Thredd Account ID, returned when a credit application is approved.
  • The accountHolderId of the cardholder who holds the account.
  • The card product configured for the account's financial product.
    The card product must match the financial product the account was opened on. If the account isn't set up for the card product you request, Thredd rejects the request.
📘

Note

Thredd currently issues virtual cards only. Set cardType to Virtual. If you send Physical, Thredd rejects the request for all clients, whatever the account's financial product.

Example Request

Issue a card by making a POST request to the Create Card endpoint.

POST {{baseUrl}}/api/v1/credit/accounts/{account_id}/cards

Path Parameters

ParameterDescription
account_idstring. Required. The unique identifier of the line of credit account.

Example Payload

{
  "accountHolderId": "string",
  "cardProduct": 0,
  "cardType": "Virtual"
}
{
  "accountHolderId": "ah_123456",
  "cardProduct": 4512,
  "cardType": "Virtual"
}

Request Fields

AttributeDescription
accountHolderIdstring. Required. The unique identifier of the Thredd account holder the card is issued to. The cardholder must already hold the account.
cardProductinteger. Required. The card product to issue, as configured for the account.
cardTypestring. Required. The form factor of the card. Only Virtual is issued today. Requests for Physical are rejected.

Example Response

A successful request returns a 201 HTTP status code with the details of the new card. Store the publicToken, because it identifies the card in other Thredd APIs.

{
  "publicToken": "112345678",
  "maskedPan": "************4417",
  "nameOnCard": "JANE A SMITH",
  "customerReference": null,
  "startDate": null,
  "expiryDate": null
}
{
  "detail": "No credit account with this id. A card can only be issued on an account that already exists, and an account is created when a credit application completes."
}
{
  "detail": "cardType is not a form factor we currently issue."
}
{
  "detail": "cardProduct is not the card product configured for this account."
}
{
  "detail": [
    {
      "loc": ["body", "cardType"],
      "msg": "Input should be 'Virtual' or 'Physical'",
      "type": "enum"
    }
  ]
}

Response Fields

AttributeDescription
publicTokenstring. The public token that identifies the card.
maskedPanstring. The masked primary account number (PAN) of the card.
nameOnCardstring or null. The name printed on the card.
customerReferencestring or null. The customer reference associated with the card.
startDatestring or null. The card's start date.
expiryDatestring or null. The card's expiry date.

Error Messages

If Thredd can't issue the card, the response returns one of the following errors. The detail field explains the reason.

HTTP statusdetail messageWhat it means and what to do
404No credit account with this id. A card can only be issued on an account that already exists, and an account is created when a credit application completes.No account exists with the account_id you sent. Check the ID, and check that the credit application has completed.
404Customer not found for this account.The accountHolderId doesn't hold this account. Check that you sent the correct account holder ID for the account.
404Customer is not available in the external credit engine.The cardholder isn't set up in the loan management system. Contact Thredd Customer Support.
422cardProduct is not the card product configured for this account.The account isn't set up for the card product you requested. Send the card product configured for the account.
422cardType is not a form factor we currently issue.You requested a card type that Thredd doesn't issue yet, such as Physical. Set cardType to Virtual.
422The cardholder's gender is not recorded, and a card cannot be issued without it.Thredd needs the cardholder's gender to issue a card, and it isn't on record.
422Card could not be issued.The card couldn't be issued. Try again later. If the error continues, contact Thredd Customer Support.
422A list of validation errorsThe request body failed validation. For example, a required field is missing or cardType has an invalid value. The response includes details of the validation failure.

Did this page help you?