Skip to main content
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

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 a PUT request to the /cards endpoint with the new address in the fulfillment.shipping object. For more, see Update card.

URL path parameters

FieldsDescription
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
{
  "card_product_token": "my-card-product1234",
  "user_token": "user1234"
}

Response body

FieldsDescription
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
{
  "token": "my_credit_card_token1234",
  "account_token": "my_account_token_12",
  "user_token": "user1234",
  "created_time": "2024-09-03T19:39:53.719Z",
  "updated_time": "2024-09-03T19:39:53.719Z"
}

List account cards

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

FieldsDescription
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

FieldsDescription
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

FieldsDescription
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
{
  "count": 2,
  "start_index": 0,
  "end_index": 0,
  "is_more": false,
  "data": [
    {
      "token": "credit_card_token1234",
      "account_token": "my_account_token_12",
      "user_token": "user1234",
      "created_time": "2024-09-03T19:39:53.719Z",
      "updated_time": "2024-09-03T19:39:53.719Z"
    },
    {
      "token": "credit_card_token5678",
      "account_token": "my_account_token_13",
      "user_token": "user5678",
      "created_time": "2024-09-13T19:19:51.412Z",
      "updated_time": "2024-09-13T19:19:51.421Z"
    }
  ]
}

Retrieve account card

Action: GET
Endpoint: /credit/accounts/{account_token}/cards/{card_token}
Retrieve a credit card for a credit account.

URL path parameters

FieldsDescription
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

FieldsDescription
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
{
  "token": "my_credit_card_token1234",
  "account_token": "my_account_token_12",
  "user_token": "user1234",
  "created_time": "2024-09-03T19:39:53.719Z",
  "updated_time": "2024-09-03T19:39:53.719Z"
}