Add Card

POST /bank-card

Add new client's bank card using its JWT.

application/json

Body Required

Responses

  • 200 application/json

    Successful adding of a new card.

    Hide response attributes Show response attributes object
  • 400 application/json

    Validation error of given input.

    Hide response attributes Show response attributes object
  • 401 application/json

    User is not unauthorized or permissions are missing.

    Hide response attributes Show response attributes object
  • 429 application/json

    Rate limit exceeded - 100 queries per 15 minutes.

    Hide response attributes Show response attributes object
POST /bank-card
curl \
 -X POST http://63.141.232.244:25540/v0/bank-card \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"card_number":"4242424242424242","cardholder_name":"SAKHABUTDINOV KAMIL","expires_at":"2025-01-01","cvv":"123"}'
Request examples
{
  "card_number": "4242424242424242",
  "cardholder_name": "SAKHABUTDINOV KAMIL",
  "expires_at": "2025-01-01",
  "cvv": "123"
}
Response examples (200)
{
  "success": true,
  "bank_card": {
    "cvv": "123",
    "client_id": 1,
    "expires_at": "2022-01-01",
    "card_number": "1234567890123456",
    "bank_card_id": 1,
    "cardholder_name": "SAKHABUTDINOV KAMIL"
  }
}
Response examples (400)
{
  "success": false,
  "error": [
    {
      "code": "invalid_type",
      "expected": "string",
      "received": "undefined",
      "path": [
        "client_id"
      ],
      "message": "Required"
    }
  ]
}
Response examples (401)
{
  "success": false,
  "error": "Unauthorized"
}
Response examples (429)
{
  "success": false,
  "error": "Too many requests, please try again later"
}