POST//
Create a payment card funding source for an existing account holder. This endpoint returns the card type and the last four digits of the card, and then sets the active_ field to true.
Marqeta retains only a tokenized representation of the card number.
Request body
| Fields | Description |
|---|---|
| account_number string Required | Payment card account number. Allowable Values: 16-digit number |
| business_token string Optional | Unique identifier of the business account holder. This token is required if the user_token is not included.Send a GET request to /businesses to retrieve business tokens.Allowable Values: 1–36 chars |
| cvv_number string Required | Payment card CVV2 number. Allowable Values: 3–4 chars |
| exp_date string Required | Payment card expiration date. Allowable Values: Format: MMyy |
| is_default_account boolean Optional | If there are multiple funding sources, this field specifies which source is used by default in funding calls. If there is only one funding source, the system ignores this field and always uses that source. Allowable Values: true, falseDefault value: false |
| postal_code string Optional | Postal code of the account holder (user or business). Allowable Values: 10 char max |
| token string Optional | Unique identifier of the funding account. If you do not include a token, the system will generate one automatically. As this token is necessary for use in other calls, we recommend that you define a simple and easy to remember string rather than letting the system generate a token for you. This value cannot be updated. Allowable Values: 1–36 chars |
| user_token string Optional | Unique identifier of the user account holder. This token is required if the business_token is not included.Send a GET request to /users to retrieve user tokens.Allowable Values: 1–36 chars |
| zip string Optional | United States ZIP code of the account holder (user or business). Allowable Values: 10 char max |
Sample request body
JSON
{
"token": "my_paymentcard_01",
"postal_code": "94608",
"user_token": "my_user_01",
"is_default_account": true,
"exp_date": "1227",
"account_number": "6559906559906557",
"cvv_number": "123"
}
Response body
| Fields | Description |
|---|---|
| account_suffix string Returned | Account identifier appended to the payment card number. Allowable Values: 255 char max |
| account_type string Returned | Type of payment card account. Allowable Values: checking, corporate, loan, savings |
| active boolean Returned | Specifies whether the account is active. Allowable Values: true, false |
| business_token string Conditionally returned | Unique identifier of the business account holder. This token is returned if a user_token is not specified.Allowable Values: Existing business resource token |
| created_time datetime Returned | Date and time when the resource was created, in UTC. Allowable Values: datetime Format: yyyy-MM-ddThh:mm:ssZ |
| exp_date string Returned | Payment card expiration date. Allowable Values: Format: MMyy |
| is_default_account boolean Returned | If there are multiple funding sources, this field specifies which source is used by default in funding calls. If there is only one funding source, the system ignores this field and always uses that source. Allowable Values: true, false |
| last_modified_time datetime Returned | Date and time when the resource was last modified, in UTC. Allowable Values: datetime Format: yyyy-MM-ddThh:mm:ssZ |
| token string Returned | Unique identifier of the funding source. Allowable Values: Existing funding source token |
| type string Returned | Funding source type. Allowable Values: ACH, paymentcard |
| user_token string Conditionally returned | Unique identifier of the user account holder. This token is returned if a business_token is not specified.Allowable Values: Existing user resource token |
Sample response body
JSON
{
"type": "paymentcard",
"token": "my_paymentcard_01",
"created_time": "2023-02-26T20:00:00Z",
"last_modified_time": "2023-02-26T21:00:00Z",
"account_suffix": "6557",
"account_type": "corporate",
"active": true,
"is_default_account": true,
"exp_date": "1227",
"user_token": "my_user_01"
}