Create a card
Changed onIssue a virtual or physical card.
post/v2/cards
Request
- Base URLhttps://api.slash.com
- URLhttps://api.slash.com/v2/cards
- AuthAPI key in header X-API-Key
Headers
X-Idempotency-Keystring required
Unique caller-generated key for one create request. Once an authenticated, schema-valid request reaches the operation, the key is permanently consumed for that operation and legal entity whether the operation succeeds or fails. Reusing it in that scope returns 409 and never replays a response, unlike API v1, which replays the original response for a matching key.
Request body
Example request
{
"name": "Ads – Meta",
"cardholderUserId": "u_2rj4l7hmrrrcv",
"accountId": "sa_group_2rj4l7hmrrrcv",
"virtualAccountId": "subaccount_2rj4l7hmrrrcv",
"cardGroupId": "card_group_2rj4l7hmrrrcv",
"cardProductId": "card_product_2rj4l7hmrrrcv",
"controls": {
"limit": {
"amount": {
"amount": 500000,
"currency": "USD"
},
"period": "monthly"
},
"transactionLimit": {
"amount": 250000,
"currency": "USD"
},
"merchantCategoryCodes": {
"mode": "block",
"values": [
"7995"
]
}
}
}Response
The card.
Example response
{
"id": "c_2rj4l7hmrrrcv",
"name": "Ads – Meta",
"last4": "4242",
"expiryMonth": 9,
"expiryYear": 2030,
"accountId": "sa_group_2rj4l7hmrrrcv",
"virtualAccountId": "subaccount_2rj4l7hmrrrcv",
"cardGroupId": "card_group_2rj4l7hmrrrcv",
"cardProductId": "card_product_2rj4l7hmrrrcv",
"cardholderUserId": "u_2rj4l7hmrrrcv",
"controls": {
"limit": {
"amount": {
"amount": 500000,
"currency": "USD"
},
"period": "monthly"
},
"transactionLimit": {
"amount": 250000,
"currency": "USD"
},
"merchantCategoryCodes": {
"mode": "block",
"values": [
"7995"
]
}
},
"physical": {
"secondLine": "Computer Services"
}
}Changes
- info
added
subschema #4: card_issuer_not_approvedto the response bodyanyOflist for the response status
- info
- info
endpoint added
- info