Issuing an Additional Card
Add a virtual or physical card to an existing line of credit account.
ImportantCertain 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.
NoteThis endpoint does not create an account. Thredd creates the account when a credit application completes. For more information, see Credit Applications and Origination.
More InformationFor 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_idof the line of credit account to add the card to. This is the Thredd Account ID, returned when a credit application is approved. - The
accountHolderIdof 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.
NoteThredd currently issues virtual cards only. Set
cardTypetoVirtual. If you sendPhysical, 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
| Parameter | Description |
|---|---|
account_id | string. 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
| Attribute | Description |
|---|---|
accountHolderId | string. Required. The unique identifier of the Thredd account holder the card is issued to. The cardholder must already hold the account. |
cardProduct | integer. Required. The card product to issue, as configured for the account. |
cardType | string. 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
| Attribute | Description |
|---|---|
publicToken | string. The public token that identifies the card. |
maskedPan | string. The masked primary account number (PAN) of the card. |
nameOnCard | string or null. The name printed on the card. |
customerReference | string or null. The customer reference associated with the card. |
startDate | string or null. The card's start date. |
expiryDate | string 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 status | detail message | What it means and what to do |
|---|---|---|
404 | 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. | No account exists with the account_id you sent. Check the ID, and check that the credit application has completed. |
404 | Customer not found for this account. | The accountHolderId doesn't hold this account. Check that you sent the correct account holder ID for the account. |
404 | Customer is not available in the external credit engine. | The cardholder isn't set up in the loan management system. Contact Thredd Customer Support. |
422 | cardProduct 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. |
422 | cardType 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. |
422 | The 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. |
422 | Card could not be issued. | The card couldn't be issued. Try again later. If the error continues, contact Thredd Customer Support. |
422 | A list of validation errors | The 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. |
Updated 7 days ago
