/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
Action:POSTEndpoint:
/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 a
You can ship cards to an address different from the user address. After creating a card, send a
PUT request to the /cards endpoint with the new address in the fulfillment.shipping object. For more, see Update card.URL path parameters
| Fields | Description |
|---|---|
| account_token string Required | Unique identifier of the credit account for which to create a credit card. Send a GET request to /credit/accounts to retrieve existing credit account tokens.Allowable Values: Existing account token |
Request body
Expected request body to create a credit card for an existing credit account. Refer to Create card for the complete list of fields.Sample request body
JSON
Response body
| Fields | Description |
|---|---|
| token string Returned | Unique identifier of the credit card. Allowable Values: 36 char max |
| account_token string Returned | Unique identifier of the associated credit account. Allowable Values: 36 char max Existing account token |
| user_token string Returned | Unique identifier of the credit cardholder. Allowable Values: Existing user token |
| created_time datetime Returned | 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 Returned | Date and time when the card was last modified on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
JSON
List account cards
Action:GETEndpoint:
/credit/accounts/{account_token}/cards
Retrieve an array of cards for a credit account.
This endpoint supports sorting and pagination.
URL path parameters
| Fields | Description |
|---|---|
| account_token string Required | Unique identifier of the credit account for which to retrieve credit cards. Send a GET request to /credit/accounts to retrieve existing credit account tokens.Allowable Values: Existing account token |
URL query parameters
| Fields | Description |
|---|---|
| status string Optional | Status of the credit cards to retrieve. Allowable Values: Valid credit card status |
| count integer Optional | Number of credit card resources to retrieve. Allowable Values: 1–100 |
| start_index integer Optional | Sort order index of the first resource in the returned array. Allowable Values: 0 min |
| sort_by string Optional | Field on which to sort. Prefix the field name with a hyphen (-) to sort in descending order. Omit the hyphen to sort in ascending order.NOTE: You must sort using system field names such as lastModifiedTime, and not by the field names appearing in response bodies such as last_modified_time.Allowable Values: lastModifiedTime, -lastModifiedTime |
Response body
| Fields | Description |
|---|---|
| count integer Returned | Number of resources returned. Allowable Values: 1-10 |
| start_index integer Returned | Sort order index of the first resource in the returned array. Allowable Values: Any integer |
| end_index integer Returned | Sort order index of the last resource in the returned array. Allowable Values: Any integer |
| is_more boolean Returned | A value of true indicates that more unreturned resources exist.Allowable Values: true, false |
| data array of objects Returned | Contains one or more credit cards. Allowable Values: One or more credit card objects |
| data[].token string Returned | Unique identifier of the credit card. Allowable Values: 36 char max |
| data[].account_token string Returned | Unique identifier of the associated credit account. Allowable Values: 36 char max Existing account token |
| data[].user_token string Returned | Unique identifier of the credit cardholder. Allowable Values: Existing user token |
| data[].created_time datetime Returned | 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 Returned | Date and time when the card was last modified on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
JSON
Retrieve account card
Action:GETEndpoint:
/credit/accounts/{account_token}/cards/{card_token}
Retrieve a credit card for a credit account.
URL path parameters
| Fields | Description |
|---|---|
| account_token string Required | Unique identifier of the credit account for which to retrieve a credit card. Send a GET request to /credit/accounts to retrieve existing credit account tokens.Allowable Values: Existing account token |
| card_token string Required | Unique identifier of the credit card to retrieve. Send a GET request to /credit/accounts/{account_token}/cards to retrieve existing credit card tokens.Allowable Values: Existing card token |
Response body
| Fields | Description |
|---|---|
| token string Returned | Unique identifier of the credit card. Allowable Values: 36 char max |
| account_token string Returned | Unique identifier of the associated credit account. Allowable Values: 36 char max Existing account token |
| user_token string Returned | Unique identifier of the credit cardholder. Allowable Values: Existing user token |
| created_time datetime Returned | 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 Returned | Date and time when the card was last modified on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
JSON