Account Cards
Use the account cards endpoints to create and retrieve credit cards that can access the credit line on a credit account.
Once a credit card is created, you can use the /cards
endpoint to update the card or manage lost, stolen, or damaged cards.
To receive webhook notifications when card transition or card action events occur, see Card transition events and Card action events in Event Types.
Create account card
Copy section link
Action: POST
Endpoint: /credit/accounts/{account_token}/cards
Create a credit card for an existing credit account.
Note
You can ship cards to an address different from the user address. After creating a card, send aPUT
request to the /cards
endpoint with the new address in the fulfillment.shipping
object.
For more, see Update card.
URL path parameters
Copy section link
Fields | Description |
---|---|
account_token
string
|
The unique identifier of the credit account for which to create a credit card. Send a Allowable Values: Existing account token |
Request body
Copy section link
Fields | Description |
---|---|
token
string
|
Unique identifier of the credit card. Allowable Values: 36 char max |
card_product_token
string
|
Unique identifier of the associated card product. Allowable Values: Existing card product token |
user_token
string
|
Unique identifier of the credit cardholder. Allowable Values: Existing user token |
reissue_pan_from_card_token
string
|
Reissues the specified card (known as the "source" card). This field reissues a card by copying the PAN and PIN from the specified source card to the newly created card. The reissued card has the same PAN and PIN as the source card but a new expiration date and CVV2 number. NOTE: By default, the source card is automatically terminated when the reissued card is activated.
However, if your program is configured for multiple active cards, you can prevent the source card from being automatically terminated by setting the Allowable Values: 36 char max Existing card token |
new_pan_from_card_token
string
|
Reissues the specified card (known as the "source" card) with a new primary account number (PAN). This field reissues a card with a new PAN from the specified source card. The source card is automatically terminated when the card is reissued with the new PAN. Use this field when reissuing a lost or stolen card. Allowable Values: 36 char max Existing card token |
expiration_offset
object
|
Contains information on how long after the date of issue for when the cards are valid. If this field is not specified, the card uses the Allowable Values: Existing |
expiration_offset.unit
string
|
The units for the Allowable Values: 255 char max |
expiration_offset.value
integer
|
Specifies the number of time units (as defined by the This number is rounded as follows:
Allowable Values: Any integer |
translate_pin_from_card_token
string
|
Copies the PIN from the specified card to the newly created card. Both cards must belong to the same user. This field is not allowed if Send a Allowable Values: 36 char max Existing card token |
activation_actions
object
|
Contains information on actions that can be performed when a card is activated. Allowable Values: Existing |
activation_actions.terminate_reissued_source_card
boolean
|
If you are reissuing a card, the source card is terminated by default.
To prevent the source card from being terminated, set this field to Only relevant when Allowable Values:
Default value: |
activation_actions.swap_digital_wallet_tokens_from_card_token
string
|
Token of the card from which to move digital wallet tokens. All digital wallet tokens are move from the card specified in this field to the new card. Not relevant when Send a Allowable Values: Existing card token |
Response body
Copy section link
Fields | Description |
---|---|
token
string
|
Unique identifier of the credit card. Allowable Values: 36 char max |
account_token
string
|
Unique identifier of the associated credit account. Allowable Values: 36 char max Existing account token |
user_token
string
|
Unique identifier of the credit cardholder. Allowable Values: Existing user token |
created_time
datetime
|
Date and time when the card was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
updated_time
datetime
|
Date and time when the card was last modified on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
List account cards
Copy section link
Action: GET
Endpoint: /credit/accounts/{account_token}/cards
Retrieve an array of cards for a credit account.
This endpoint supports sorting and pagination.
URL path parameters
Copy section link
Fields | Description |
---|---|
account_token
string
|
The unique identifier of the credit account for which to retrieve credit cards. Send a Allowable Values: Existing account token |
URL query parameters
Copy section link
Fields | Description |
---|---|
status
string
|
The status of the credit cards to return. Allowable Values: Valid credit card status |
count
integer
|
The number of resources to retrieve. Allowable Values: 1–100 |
start_index
integer
|
Sort order index of the first resource in the returned array. Allowable Values: 0 min |
sort_by
string
|
Field on which to sort.
Prefix the field name with a hyphen ( NOTE:
You must sort using system field names such as Allowable Values:
|
Response body
Copy section link
Fields | Description |
---|---|
count
integer
|
Number of resources returned. Allowable Values: 1-10 |
start_index
integer
|
Sort order index of the first resource in the returned array. Allowable Values: Any integer |
end_index
integer
|
Sort order index of the last resource in the returned array. Allowable Values: Any integer |
is_more
boolean
|
A value of Allowable Values:
|
data
array of objects
|
Contains one or more credit cards. Allowable Values: One or more credit card objects |
data[].token
string
|
Unique identifier of the credit card. Allowable Values: 36 char max |
data[].account_token
string
|
Unique identifier of the associated credit account. Allowable Values: 36 char max Existing account token |
data[].user_token
string
|
Unique identifier of the credit cardholder. Allowable Values: Existing user token |
data[].created_time
datetime
|
Date and time when the card was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
data[].updated_time
datetime
|
Date and time when the card was last modified on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Retrieve account card
Copy section link
Action: GET
Endpoint: /credit/accounts/{account_token}/cards/{card_token}
Retrieve a credit card for a credit account.
URL path parameters
Copy section link
Fields | Description |
---|---|
account_token
string
|
The unique identifier of the credit account for which to retrieve a credit card. Send a Allowable Values: Existing account token |
card_token
string
|
The unique identifier of the credit card to retrieve. Send a Allowable Values: Existing card token |
Response body
Copy section link
Fields | Description |
---|---|
token
string
|
Unique identifier of the credit card. Allowable Values: 36 char max |
account_token
string
|
Unique identifier of the associated credit account. Allowable Values: 36 char max Existing account token |
user_token
string
|
Unique identifier of the credit cardholder. Allowable Values: Existing user token |
created_time
datetime
|
Date and time when the card was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
updated_time
datetime
|
Date and time when the card was last modified on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |