Create and Update Cards
Learn what a Marqeta card is as well as how to create and update it.
We'll cover the following...
A card is a payment card that’s owned by a user. It can either be a physical or a virtual card. The behavior and the attributes of the card are defined by the card product object associated with it. We can also define the attributes of the card inside the card object. In that case, the definition inside the card object will take precedence over the definition inside the card product object.
In this lesson, we’ll learn how to create and update a Marqeta payment card.
Create a card
We can create a Marqeta payment card by making a POST
request to the {BASE_URL}/cards
endpoint. We can provide basic information about the card in the request’s body. This includes the shipping information. We also need to specify the user_token
of the card owner and the card_product_token
of the card product that controls the card. Therefore, we need to create a user and a card product before we create a new Marqeta card.
Request parameters
Parameter | Type | Category | Description |
| Boolean | Optional |
Note: This is a query parameter. |
| Boolean | Optional |
Note: This is a query parameter. |
| String | Optional | Token of the card product |
| Boolean | Optional |
Default value: |
| Object | Optional | Adds metadata provided by the customer to the card Allowable values: Maximum 20 key-value pairs allowed Format: "my_name_1": "my_value_1" |
| Object | Optional | Defines the duration for card validity after issuance |
| String | Optional | Unique token of the card Length: 1–36 characters Note: If not specified, the system generates one automatically. This value cannot be updated once set. |
| String | Mandatory | Unique token of the card user |
| Object | Optional | Contains shipping information and the physical characteristics of the card |
| String | Optional | Reissues the specified card and assigns the new card the same PAN and PIN (personal identification number) but a new expiration date and CVV2 number Maximum length: 36 characters |
| String | Optional | Assigns the newly created card the same PIN as the specified card Maximum length: 36 characters Note: Both cards must belong to the same user. Additionally, |
| Object | Optional | Contains actions to perform at card activation Note: The fields in this object are mutually exclusive. |
| String | Optional | Token of the bulk card order to link the card to Note: This field cannot be updated once set. Maximum length: 36 characters |
Note: Please refer to the Additional Parameters and Response Fields lesson for details of the
expiration_offset
,fulfillment
, andactivation_actions
...