---
title: "Validate card data"
method: POST
path: "/v1/cards/validate"
tags: ["UPI"]
---

# Validate card data

`POST /v1/cards/validate`

## Request

- Base URL: `https://sandbox.pismolabs.io/upi-gateway`
- URL: `https://sandbox.pismolabs.io/upi-gateway/v1/cards/validate`
- Auth: HTTP bearer

Validate client card data for [Transfer funds](ref:post-funds-transfer)

## Headers

- `Authorization` string, required
- `user-agent` string, required

## Request body

- CardsValidateRequest
  - `account_reference_number` string, required: Account reference number. Pismo creates this automatically when creating a card linked to RuPay on UPI. This number combines 10 BIN digits and the credit account number. If BIN is 6 digits, the remaining 4 digits are set to zero (`0`). If BIN is 8 digits, then the remaining 2 digits are set to zero. This is a [NPCI](https://www.npci.org.in/what-we-do/rupay/product-overview) standard. For example, if the account reference number = `1234560000987654321`, the first six digits are the BIN, appended with 4 zeros and then the credit account number (`987654321``). You can call [List cards](ref:post-list-cards) to get a card's account reference number.
  - `card_data` CardsCardData, required
    - `card_expiration` string, required: Card expiration, format = MMYY. **REQUIRED** if `last_six_digits` is passed.
    - `last_six_digits` string, required: Card's last six digits. **REQUIRED** if `card_expiration` is passed
  - `external_transaction_datetime` string, required: Request datetime. ISO 8601 format.
  - `external_transaction_id` string, required: Request ID code
  - `pin_data` CardsPinData
    - `pin_block` string, required: Pin block
    - `key_id` string, required: Key encryption ID

## Response `200`

Response Body

- CardsValidateResponse
  - `account_reference_number` string, required: Account reference number. Pismo creates this automatically when creating a card linked to RuPay on UPI. This number combines 10 BIN digits and the credit account number. If BIN is 6 digits, the remaining 4 digits are set to zero (`0`). If BIN is 8 digits, then the remaining 2 digits are set to zero. This is a [NPCI](https://www.npci.org.in/what-we-do/rupay/product-overview) standard. For example, if the account reference number = `1234560000987654321`, the first six digits are the BIN, appended with 4 zeros and then the credit account number (`987654321``). You can call [List cards](ref:post-list-cards) to get a card's account reference number.
  - `external_transaction_datetime` string, required: Request datetime. ISO 8601 format.
  - `external_transaction_id` string, required: Request ID code
  - `result` string, required: Validation result. If not valid, an error message is returned.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: UnprocessableEntity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/pismo/apis/instant-payments-rupay-on-upi.md) - [All operations](https://skmtc.dev/pismo/apis/instant-payments-rupay-on-upi/llms.txt) - [OpenAPI document](https://skmtc.dev/pismo/apis/instant-payments-rupay-on-upi/revisions/892669202dfc?raw)
