> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.payroc.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.payroc.com/_mcp/server.

# Verify card

POST https://api.payroc.com/v1/cards/verify
Content-Type: application/json

Use this method to verify a customer’s card details.  

In the request, send the customer’s card details.  

In the response, our gateway indicates if the card details are valid and if you should use them in follow-on actions.  


Reference: https://docs.payroc.com/api/schema/payment-features/cards/verify-card

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.payroc.com/v1` (Production, default)
- `https://api.uat.payroc.com/v1` (UAT)

## Request

### Headers

- `Idempotency-Key` (string, required) — Unique identifier that you generate for each request. You must use the [UUID v4 format](https://www.rfc-editor.org/rfc/rfc4122) for the identifier. For more information about the idempotency key, go to [Idempotency](https://docs.payroc.com/api/idempotency).

### Body (application/json)

This endpoint expects an object.

- `processingTerminalId` (string, required) — Unique identifier that we assigned to the terminal.
- `card` (object, required) — Polymorphic object that contains payment details.
  - `type`: `card` (card)
    - `cardDetails` (object, required) — Polymorphic object that contains payment card information. The value of the entryMethod parameter determines which variant you should use: - `raw` - Unencrypted payment data directly from the device. - `icc` - Payment data that the device captured from the chip. - `keyed` - Payment data that the merchant entered manually. - `swiped` - Payment data that the device captured from the magnetic strip.
      - `entryMethod`: `raw` (raw)
        - `device` (object, required) — Object that contains information about the physical device the merchant used to capture the customer’s card details.
          - `model` (enum, required) — Model of the device that the merchant used to process the transaction.
            - Allowed values: `bbposChp`, `bbposChp2x`, `bbposChp3x`, `bbposRambler`, `bbposWp`, `bbposWp2`, `bbposWp3`, `genericCtlsMsr`, `genericMsr`, `idtechAugusta`, `idtechMinismart`, `idtechSredkey`, `idtechVp3300`, `idtechVp5300`, `idtechVp6300`, `idtechVp6800`, `ingenicoAxiumDx4000`, `ingenicoAxiumDx8000`, `ingenicoAxiumEx8000`, `ingenicoIct220`, `ingenicoIpp320`, `ingenicoIpp350`, `ingenicoIuc285`, `ingenicoL3000`, `ingenicoL7000`, `ingenicoS2000`, `ingenicoS3000`, `ingenicoS4000`, `ingenicoS5000`, `ingenicoS7000`, `paxA80`, `paxA920`, `paxA920Pro`, `paxA920Max`, `paxE500`, `paxE700`, `paxE800`, `paxIm30`, `uic680`, `uicBezel8`
          - `serialNumber` (string, required) — Serial number of the physical device.
          - `category` (enum, optional, default: attended) — Indicates if the device is attended or unattended.
            - Allowed values: `attended`, `unattended`
          - `firmwareVersion` (string, optional) — Firmware version of the physical device.
          - `config` (object, optional) — Object that contains information about the configuration of the POS terminal.
            - `quickChip` (boolean, required, default: false) — Indicates if Quick Chip mode is active on a merchant’s POS terminal.
        - `rawData` (string, required) — Unencrypted data from the POS terminal.
        - `cardholderSignature` (string, optional) — Cardholder's signature. For more information about how to format the signature, go to [How to send a signature to our gateway](https://docs.payroc.com/knowledge/basic-concepts/signature-capture).
        - `downgradeTo` (enum, optional) — If an offline transaction is not approved using the initial entry method, reprocess the transaction using a downgraded entry method. For example, an Integrated Circuit Card (ICC) transaction can be downgraded to a swiped transaction or to a keyed transaction.
          - Allowed values: `keyed`, `swiped`
      - `entryMethod`: `icc` (icc)
        - `device` (object, required) — Object that contains information about the encryption details of the POS terminal.
          - `model` (enum, required) — Model of the device that the merchant used to process the transaction.
            - Allowed values: `bbposChp`, `bbposChp2x`, `bbposChp3x`, `bbposRambler`, `bbposWp`, `bbposWp2`, `bbposWp3`, `genericCtlsMsr`, `genericMsr`, `idtechAugusta`, `idtechMinismart`, `idtechSredkey`, `idtechVp3300`, `idtechVp5300`, `idtechVp6300`, `idtechVp6800`, `ingenicoAxiumDx4000`, `ingenicoAxiumDx8000`, `ingenicoAxiumEx8000`, `ingenicoIct220`, `ingenicoIpp320`, `ingenicoIpp350`, `ingenicoIuc285`, `ingenicoL3000`, `ingenicoL7000`, `ingenicoS2000`, `ingenicoS3000`, `ingenicoS4000`, `ingenicoS5000`, `ingenicoS7000`, `paxA80`, `paxA920`, `paxA920Pro`, `paxA920Max`, `paxE500`, `paxE700`, `paxE800`, `paxIm30`, `uic680`, `uicBezel8`
          - `serialNumber` (string, required) — Serial number of the physical device.
          - `dataKsn` (string, required) — Key serial number.
          - `category` (enum, optional, default: attended) — Indicates if the device is attended or unattended.
            - Allowed values: `attended`, `unattended`
          - `firmwareVersion` (string, optional) — Firmware version of the physical device.
          - `config` (object, optional) — Object that contains information about the configuration of the POS terminal.
            - `quickChip` (boolean, required, default: false) — Indicates if Quick Chip mode is active on a merchant’s POS terminal.
        - `iccData` (string, required) — Cardholder data from the ICC. The data consists of EMV tags in Tag-Length-Value (TLV) format.
        - `cardholderSignature` (string, optional) — Cardholder's signature. For more information about how to format the signature, go to [How to send a signature to our gateway](https://docs.payroc.com/knowledge/basic-concepts/signature-capture).
        - `downgradeTo` (enum, optional) — If an offline transaction is not approved using the initial entry method, reprocess the transaction using a downgraded entry method. For example, an Integrated Circuit Card (ICC) transaction can be downgraded to a swiped transaction or a keyed transaction.
          - Allowed values: `keyed`, `swiped`
        - `ebtDetails` (object, optional) — Object that contains information about the Electronic Benefit Transfer (EBT) transaction.
          - `benefitCategory` (enum, required) — Indicates if the balance relates to an EBT Cash account or an EBT SNAP account. - `cash` – EBT Cash - `foodStamp` – EBT SNAP
            - Allowed values: `cash`, `foodStamp`
          - `withdrawal` (boolean, optional) — Indicates whether the customer wants to withdraw cash. **Note:** Cash withdrawals are available only from EBT Cash accounts.
          - `voucher` (object, optional) — Object that contains information about the EBT voucher. **Note:** Vouchers are available only for EBT SNAP payments.
            - `approvalCode` (string, required) — Authorization code that the processor issued for the transaction.
            - `serialNumber` (string, required) — Serial number of the voucher.
        - `firstDigitOfPan` (string, optional) — First digit of the card number.
      - `entryMethod`: `keyed` (keyed)
        - `keyedData` (object, required) — Polymorphic object that contains payment card details that the merchant manually entered into the device. The value of the dataFormat parameter determines which variant you should use: - `fullyEncrypted` - All payment card details are encrypted. - `partiallyEncrypted` - Some payment card details are encrypted. - `plainText` - Payment card details are in plain text.
          - `dataFormat`: `fullyEncrypted` (fullyEncrypted)
            - `device` (object, required) — Object that contains information about the encryption details of the POS terminal.
            - `encryptedData` (string, required) — Encrypted card data.
            - `firstDigitOfPan` (string, optional) — First digit of the customer’s card number.
          - `dataFormat`: `partiallyEncrypted` (partiallyEncrypted)
            - `device` (object, required) — Object that contains information about the encryption details of the POS terminal.
            - `encryptedPan` (string, required) — Encrypted card number.
            - `expiryDate` (string, required) — Expiry date of the customer’s card.
            - `maskedPan` (string, required) — Masked card number. The gateway shows only the first six digits and the last four digits of the account number. For example, `453985******7062`.
            - `cvv` (string, optional) — Security code of the customer’s card.
            - `cvvEncrypted` (string, optional) — Encrypted security code data.
            - `issueNumber` (string, optional) — Issue number of the customer’s card.
          - `dataFormat`: `plainText` (plainText)
            - `cardNumber` (string, required) — Customer’s card number.
            - `cvv` (string, optional) — Security code of the customer’s card.
            - `device` (object, optional) — Object that contains information about the physical device the merchant used to capture the customer’s card details.
            - `expiryDate` (string, optional) — Expiry date of the customer’s card. **Note:** We require you to send an expiry date for most BIN lookups and electronic voucher transactions.
            - `issueNumber` (string, optional) — Issue number of the customer’s card.
        - `cardholderName` (string, optional) — Cardholder’s name.
        - `cardholderSignature` (string, optional) — Cardholder's signature. For more information about how to format the signature, go to [How to send a signature to our gateway](https://docs.payroc.com/knowledge/basic-concepts/signature-capture).
        - `ebtDetails` (object, optional) — Object that contains information about the Electronic Benefit Transfer (EBT) transaction.
          - `benefitCategory` (enum, required) — Indicates if the balance relates to an EBT Cash account or an EBT SNAP account. - `cash` – EBT Cash - `foodStamp` – EBT SNAP
            - Allowed values: `cash`, `foodStamp`
          - `withdrawal` (boolean, optional) — Indicates whether the customer wants to withdraw cash. **Note:** Cash withdrawals are available only from EBT Cash accounts.
          - `voucher` (object, optional) — Object that contains information about the EBT voucher. **Note:** Vouchers are available only for EBT SNAP payments.
            - `approvalCode` (string, required) — Authorization code that the processor issued for the transaction.
            - `serialNumber` (string, required) — Serial number of the voucher.
        - `pinDetails` (object, optional) — Polymorphic object that contains information about the customer's PIN.
          - `dataFormat`: `dukpt` (dukpt)
            - `pin` (string, required) — Encrypted PIN. **Note:** PIN is encrypted using the DUKPT scheme.
            - `pinKsn` (string, required) — Key serial number.
      - `entryMethod`: `swiped` (swiped)
        - `swipedData` (object, required) — Polymorphic object that contains payment card details that a device captured from the magnetic strip. The value of the dataFormat parameter determines which variant you should use: - `encrypted` - Payment card details are encrypted. - `plainText` - Payment card details are in plain text.
          - `dataFormat`: `encrypted` (encrypted)
            - `device` (object, required) — Object that contains information about the encryption details of the POS terminal.
            - `encryptedData` (string, required) — Encrypted data received from the magnetic stripe reader.
            - `fallback` (boolean, optional) — Indicates that this is a fallback transaction. For example, if there was a technical issue with the chip on the customer's card and the merchant then swiped the card.
            - `fallbackReason` (enum, optional) — Reason for the fallback.
            - `firstDigitOfPan` (string, optional) — First digit of the of the card number.
          - `dataFormat`: `plainText` (plainText)
            - `device` (object, required) — Object that contains information about the physical device the merchant used to capture the customer’s card details.
            - `trackData` (string, required) — Customer’s card data from the swiped transaction.
            - `fallback` (boolean, optional) — Indicates that this is a fallback transaction. For example, if there was a technical issue with the chip on the customer's card and the merchant then swiped the card.
            - `fallbackReason` (enum, optional) — Reason for the fallback.
        - `cardholderName` (string, optional) — Cardholder’s name.
        - `cardholderSignature` (string, optional) — Cardholder's signature. For more information about how to format the signature, go to [How to send a signature to our gateway](https://docs.payroc.com/knowledge/basic-concepts/signature-capture).
        - `downgradeTo` (enum, optional) — If an offline transaction is not approved using the initial entry method, reprocess the transaction using a downgraded entry method. For example, a swiped transaction can be downgraded to a keyed transaction.
          - Allowed values: `keyed`, `swiped`
        - `ebtDetails` (object, optional) — Object that contains information about the Electronic Benefit Transfer (EBT) transaction.
          - `benefitCategory` (enum, required) — Indicates if the balance relates to an EBT Cash account or an EBT SNAP account. - `cash` – EBT Cash - `foodStamp` – EBT SNAP
            - Allowed values: `cash`, `foodStamp`
          - `withdrawal` (boolean, optional) — Indicates whether the customer wants to withdraw cash. **Note:** Cash withdrawals are available only from EBT Cash accounts.
          - `voucher` (object, optional) — Object that contains information about the EBT voucher. **Note:** Vouchers are available only for EBT SNAP payments.
            - `approvalCode` (string, required) — Authorization code that the processor issued for the transaction.
            - `serialNumber` (string, required) — Serial number of the voucher.
        - `pinDetails` (object, optional) — Polymorphic object that contains information about the customer's PIN.
          - `dataFormat`: `dukpt` (dukpt)
            - `pin` (string, required) — Encrypted PIN. **Note:** PIN is encrypted using the DUKPT scheme.
            - `pinKsn` (string, required) — Key serial number.
    - `accountType` (enum, optional) — Indicates the customer’s account type. **Note:** Send a value for accountType only for bank account details.
      - Allowed values: `checking`, `savings`
- `operator` (string, optional) — Operator who requested to verify the card.
- `customer` (object, optional) — Object that contains the customer's contact details and address information. Contains parameters required for [Level 2, Level 3, and CEDP transactions](https://docs.payroc.com/knowledge/card-payments/enhanced-data).
  - `firstName` (string, optional) — Customer's first name.
  - `lastName` (string, optional) — Customer's last name.
  - `dateOfBirth` (date, optional) — Customer's date of birth. The format for this value is **YYYY-MM-DD**.
  - `referenceNumber` (string, optional) — Identifier of the transaction, also known as a customer code. For requests, you must send a value for **referenceNumber** if the customer provides one. Required for [Level 2, Level 3, and CEDP transactions](https://docs.payroc.com/knowledge/card-payments/enhanced-data).
  - `billingAddress` (object, optional) — Object that contains information about the address that the card is registered to.
    - `address1` (string, required) — Address line 1.
    - `city` (string, required) — City.
    - `state` (string, required) — Name of the state or state abbreviation.
    - `country` (string, required) — Two-digit country code for the country that the business operates in. The format follows the [ISO-3166-1](https://www.iso.org/iso-3166-country-codes.html) standard.
    - `postalCode` (string, required) — Zip code or postal code.
    - `address2` (string, optional) — Address line 2.
    - `address3` (string, optional) — Address line 3.
  - `shippingAddress` (object, optional) — Object that contains information about the customer and their shipping address. Contains parameters required for [Level 3 and CEDP transactions](https://docs.payroc.com/knowledge/card-payments/enhanced-data).
    - `recipientName` (string, optional) — Recipient's name. Required for [Level 3 and CEDP transactions](https://docs.payroc.com/knowledge/card-payments/enhanced-data).
    - `address` (object, optional) — Object that contains information about the shipping address. Required for [Level 3 and CEDP transactions](https://docs.payroc.com/knowledge/card-payments/enhanced-data).
      - `address1` (string, required) — Address line 1.
      - `city` (string, required) — City.
      - `state` (string, required) — Name of the state or state abbreviation.
      - `country` (string, required) — Two-digit country code for the country that the business operates in. The format follows the [ISO-3166-1](https://www.iso.org/iso-3166-country-codes.html) standard.
      - `postalCode` (string, required) — Zip code or postal code.
      - `address2` (string, optional) — Address line 2.
      - `address3` (string, optional) — Address line 3.
  - `contactMethods` (list of object, optional) — Array of polymorphic objects, which contain contact information. The value of the type parameter determines which variant you should use: - `email` - Email address - `phone` - Phone number - `mobile` - Mobile number - `fax` - Fax number
    - `type`: `email` (email)
      - `value` (string, required) — Email address.
    - `type`: `phone` (phone)
      - `value` (string, required) — Phone number.
    - `type`: `mobile` (mobile)
      - `value` (string, required) — Mobile number.
    - `type`: `fax` (fax)
      - `value` (string, required) — Fax number.
  - `notificationLanguage` (enum, optional) — Language that the customer uses for notifications. This code follows the [ISO 639-1](https://www.iso.org/iso-639-language-code) alpha-2 standard.
    - Allowed values: `en`, `fr`

## Response

### 200

Successful request. Returns the verification status of the card details.

- `processingTerminalId` (string, required) — Unique identifier that we assigned to the terminal.
- `verified` (boolean, required) — Indicates if the card details are valid: - `true` - Card details are valid. - `false` - Card details are not valid.
- `operator` (string, optional) — Operator who requested to verify the card.
- `card` (object, optional) — Object that contains the details of the payment card.
  - `type` (string, required) — Card brand of the card, for example, Visa.
  - `entryMethod` (enum, required) — Method that the device used to capture the card details.
    - Allowed values: `icc`, `keyed`, `swiped`, `swipedFallback`, `contactlessIcc`, `contactlessMsr`
  - `cardNumber` (string, required) — Card number. In the response, our gateway shows only the first six digits and the last four digits of the card number, for example, 500165******0000.
  - `expiryDate` (string, required) — Expiry date of the customer's card. The format is in **MMYY**.
  - `cardholderName` (string, optional) — Cardholder’s name.
  - `cardholderSignature` (string, optional) — Cardholder’s signature.
  - `secureToken` (object, optional) — Object that contains information about the secure token.
    - `secureTokenId` (string, required) — Unique identifier that the merchant assigned to the secure token.
    - `customerName` (string, required) — Customer's name.
    - `token` (string, required) — Token that the merchant can use in future transactions to represent the customer's payment details. The token: - Begins with the six-digit identification number **296753**. - Contains up to 12 digits. - Contains a single check digit that we calculate using the Luhn algorithm.
    - `status` (enum, required) — Status of the customer's bank account. The processor performs a security check on the customer's bank account and returns the status of the account. **Note:** Depending on the merchant's account settings, this feature may be unavailable.
      - Allowed values: `notValidated`, `cvvValidated`, `validationFailed`, `issueNumberValidated`, `cardNumberValidated`, `bankAccountValidated`
    - `link` (object, optional) — Object that contains HATEOAS links for the resource.
      - `rel` (string, required) — Indicates the relationship between the current resource and the target resource.
      - `method` (string, required) — HTTP method that you need to use with the target resource.
      - `href` (string, required) — URL of the target resource.
  - `securityChecks` (object, optional) — Object that contains information about card verification and security checks.
    - `cvvResult` (enum, optional) — Indicates if the card verification value (CVV) that the customer provided in the request matches the CVV on the card. - `M` – The CVV matches the card’s CVV. - `N` – The CVV doesn’t match the card’s CVV. - `P` – The CVV wasn’t processed. - `U` – The CVV isn’t registered. **Note:** Our gateway doesn’t automatically decline transactions when the CVV doesn’t match the card’s CVV, unless the merchant selects this setting in their account.
      - Allowed values: `M`, `N`, `P`, `U`
    - `avsResult` (enum, optional) — Indicates if the address that the customer provided in the request matches the address linked to the card. - `Y` – The address in the request matches the address linked to the card. - `N` – The address in the request doesn’t match the address linked to the card. - `A` – The street address matches, but ZIP code or postal code doesn’t match. - `Z` - The ZIP code or postal code matches, but street address doesn’t match. - `U` – The address information is unavailable. - `G` – The issuer or card brand doesn’t support the Address Verification Service (AVS). - `R` – The AVS is currently unavailable. Try again later. - `S` – There was no AVS data in the request, or it was sent in the wrong format. - `F` - For UK addresses, the address in the request matches the address linked to the card. - `W` – For US addresses, the nine-digit ZIP code or postal code in the request matches the address linked to the card but the street address doesn’t. - `X` – For US addresses, the nine-digit ZIP code or postal code and the street address matches the address linked to the card. **Note:** Our gateway doesn’t automatically decline transactions when the address doesn’t match the address linked to the card, unless the merchant selects this setting in their account.
      - Allowed values: `Y`, `A`, `Z`, `N`, `U`, `R`, `G`, `S`, `F`, `W`, `X`
  - `emvTags` (list of object, optional) — Array of emvTag objects.
    - `hex` (string, required) — Hex code of the EMV tag.
    - `value` (string, required) — Value of the EMV tag.
  - `balances` (list of object, optional) — Array of cardBalance objects. Our gateway returns this array only when the customer uses an Electronic Benefit Transfer (EBT) card.
    - `benefitCategory` (enum, required) — Indicates if the balance relates to an EBT Cash account or EBT SNAP account. - `cash` – EBT Cash - `foodStamp` – EBT SNAP
      - Allowed values: `cash`, `foodStamp`
    - `amount` (long, required) — Current balance of the account. This value is in the currency's lowest denomination, for example, cents.
    - `currency` (enum, required) — Currency of the transaction. The value for the currency follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.
      - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYR`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `CNY`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HRK`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LTL`, `LVL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRO`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLL`, `SOS`, `SRD`, `SSP`, `STD`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `USS`, `UYI`, `UYU`, `UZS`, `VEF`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`, `ZWL`
- `transactionResult` (object, optional) — Object that contains information about the transaction response details.
  - `status` (enum, required) — Status of the transaction. The value is one of the following: - `ready` - Successful transaction. We added the payment to the open batch. - `pending` - Successful transaction. We added the payment to the open batch, but we don't collect the funds until the merchant [captures the transaction](https://docs.payroc.com/api/schema/card-payments/payments/capture). - `declined` - Unsuccessful transaction. The cardholder's issuing bank declined the transaction. - `complete` - Successful transaction. The funds have moved to the merchant's bank account. - `referral` - Unsuccessful transaction. The issuing bank identified an issue with the transaction. You should treat a `referral` status as a declined transaction. - `pickup` - Unsuccessful transaction. The issuing bank has reported that the card is lost or stolen. - `reversal` - Transaction cancelled. The transaction was cancelled, and we removed the transaction from the open batch. - `admin` - Transaction under review. We have flagged an issue with the transaction. - `expired` - Transaction expired. If a transaction stays in `pending` status for too long, it expires. - `accepted` - Transaction in progress. The transaction is in progress with the processor but we can't confirm the result yet.
    - Allowed values: `ready`, `pending`, `declined`, `complete`, `referral`, `pickup`, `reversal`, `admin`, `expired`, `accepted`
  - `responseCode` (enum, required) — Response from the processor. - `A` - The processor approved the transaction. - `D` - The processor declined the transaction. - `E` - The processor received the transaction but will process the transaction later. - `P` - The processor authorized a portion of the original amount of the transaction. - `R` - The issuer declined the transaction and indicated that the customer should contact their bank. - `C` - The issuer declined the transaction and indicated that the merchant should keep the card as it was reported lost or stolen.
    - Allowed values: `A`, `D`, `E`, `P`, `R`, `C`
  - `type` (enum, optional) — Transaction type.
    - Allowed values: `sale`, `refund`, `preAuthorization`, `preAuthorizationCompletion`
  - `ebtType` (enum, optional) — Indicates the subtype of EBT in the transaction.
    - Allowed values: `cashPurchase`, `cashPurchaseWithCashback`, `foodStampPurchase`, `foodStampVoucherPurchase`, `foodStampReturn`, `foodStampVoucherReturn`, `cashBalanceInquiry`, `foodStampBalanceInquiry`, `cashWithdrawal`
  - `approvalCode` (string, optional) — Authorization code that the processor assigned to the transaction.
  - `authorizedAmount` (long, optional) — Amount that the processor authorized for the transaction. This value is in the currency’s lowest denomination, for example, cents. **Notes:** - For partial authorizations, this amount is lower than the amount in the request. - If the value for **authorizedAmount** is negative, this indicates that the merchant sent funds to the customer.
  - `currency` (enum, optional) — Currency of the transaction. The value for the currency follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.
    - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYR`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `CNY`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HRK`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LTL`, `LVL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRO`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLL`, `SOS`, `SRD`, `SSP`, `STD`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `USS`, `UYI`, `UYU`, `UZS`, `VEF`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`, `ZWL`
  - `responseMessage` (string, optional) — Response description from the processor.
  - `processorResponseCode` (string, optional) — Original response code that the processor sent.
  - `cardSchemeReferenceId` (string, optional) — Identifier that the card brand assigns to the payment instruction.
  - `healthcareIndicator` (enum, optional) — Indicates if we processed the payment as a healthcare expense. The value is one of the following: - `Y` - We processed the payment as a healthcare expense. - `N` - We processed the payment but it didn't contain any healthcare expenses. - `C` - We processed the payment but the card isn't linked to a Flexible Spending Account (FSA) or a Health Savings Account (HSA). - `R` - We processed the payment but the card doesn't support healthcare expenses.
    - Allowed values: `Y`, `N`, `C`, `R`

## Errors

### 400 Bad Request Error

Validation error

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem
- `errors` (list of object, optional)
  - `message` (string, optional) — Error message

### 401 Unauthorized Error

Identity could not be verified

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem

### 403 Forbidden Error

Do not have permissions to perform this action

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem
- `instance` (string, optional) — Resource path the action was attempted on
- `resource` (string, optional) — Resource the action was attempted on

### 404 Not Found Error

Resource not found

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem
- `resource` (string, optional) — Resource that was not found

### 406 Not Acceptable Error

Not acceptable

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem

### 409 Conflict Error

Conflict

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem
- `instance` (string, optional) — Resource path to the existing resource
- `errors` (list of object, optional)
  - `message` (string, optional) — Error message
- `link` (object, optional) — Object that contains HATEOAS links for the resource.
  - `rel` (string, required) — Indicates the relationship between the current resource and the target resource.
  - `method` (string, required) — HTTP method that you need to use with the target resource.
  - `href` (string, required) — URL of the target resource.

### 415 Unsupported Media Type Error

Unsupported media type

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem

### 500 Internal Server Error

An error has occured

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem
- `errors` (list of object, optional)
  - `message` (string, optional) — Error message

## Examples

**Request**

```json
{
  "processingTerminalId": "1234001",
  "card": {
    "type": "card",
    "cardDetails": {
      "entryMethod": "keyed",
      "keyedData": {
        "dataFormat": "plainText",
        "cardNumber": "4539858876047062",
        "expiryDate": "1230"
      },
      "cardholderName": "Sarah Hazel Hopper",
      "cardholderSignature": "a1b1c012345678a000b000c0012345d0e0f010g10061a031i001j071k0a1b0c1d0e1234567890120f1g0h1i0j1k0a1b0123451c012d0e1f0g1h0i1j123k1a1b1c1d1e1f1g123h1i1j1k1a1b1c1d1e1f1g123h123i1j123k12340a120a12345b012c0123012d0d1e0f1g0h1i123j123k10000"
    }
  },
  "operator": "Jane"
}
```

**Response**

```json
{
  "processingTerminalId": "1234001",
  "verified": true,
  "operator": "Jane",
  "card": {
    "type": "Visa Credit",
    "entryMethod": "keyed",
    "cardNumber": "453985******7062",
    "expiryDate": "1230",
    "cardholderName": "Sarah Hazel Hopper",
    "cardholderSignature": "a1b1c012345678a000b000c0012345d0e0f010g10061a031i001j071k0a1b0c1d0e1234567890120f1g0h1i0j1k0a1b0123451c012d0e1f0g1h0i1j123k1a1b1c1d1e1f1g123h1i1j1k1a1b1c1d1e1f1g123h123i1j123k12340a120a12345b012c0123012d0d1e0f1g0h1i123j123k10000"
  },
  "transactionResult": {
    "status": "ready",
    "responseCode": "A",
    "responseMessage": "APPROVAL",
    "processorResponseCode": "00"
  }
}
```

**SDK Code**

```python Card Verification
import requests

url = "https://api.payroc.com/v1/cards/verify"

payload = {
    "processingTerminalId": "1234001",
    "card": {
        "type": "card",
        "cardDetails": {
            "entryMethod": "keyed",
            "keyedData": {
                "dataFormat": "plainText",
                "cardNumber": "4539858876047062",
                "expiryDate": "1230"
            },
            "cardholderName": "Sarah Hazel Hopper",
            "cardholderSignature": "a1b1c012345678a000b000c0012345d0e0f010g10061a031i001j071k0a1b0c1d0e1234567890120f1g0h1i0j1k0a1b0123451c012d0e1f0g1h0i1j123k1a1b1c1d1e1f1g123h1i1j1k1a1b1c1d1e1f1g123h123i1j123k12340a120a12345b012c0123012d0d1e0f1g0h1i123j123k10000"
        }
    },
    "operator": "Jane"
}
headers = {
    "Idempotency-Key": "8e03978e-40d5-43e8-bc93-6894a57f9324",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Card Verification
const url = 'https://api.payroc.com/v1/cards/verify';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Key': '8e03978e-40d5-43e8-bc93-6894a57f9324',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"processingTerminalId":"1234001","card":{"type":"card","cardDetails":{"entryMethod":"keyed","keyedData":{"dataFormat":"plainText","cardNumber":"4539858876047062","expiryDate":"1230"},"cardholderName":"Sarah Hazel Hopper","cardholderSignature":"a1b1c012345678a000b000c0012345d0e0f010g10061a031i001j071k0a1b0c1d0e1234567890120f1g0h1i0j1k0a1b0123451c012d0e1f0g1h0i1j123k1a1b1c1d1e1f1g123h1i1j1k1a1b1c1d1e1f1g123h123i1j123k12340a120a12345b012c0123012d0d1e0f1g0h1i123j123k10000"}},"operator":"Jane"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Card Verification
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.payroc.com/v1/cards/verify"

	payload := strings.NewReader("{\n  \"processingTerminalId\": \"1234001\",\n  \"card\": {\n    \"type\": \"card\",\n    \"cardDetails\": {\n      \"entryMethod\": \"keyed\",\n      \"keyedData\": {\n        \"dataFormat\": \"plainText\",\n        \"cardNumber\": \"4539858876047062\",\n        \"expiryDate\": \"1230\"\n      },\n      \"cardholderName\": \"Sarah Hazel Hopper\",\n      \"cardholderSignature\": \"a1b1c012345678a000b000c0012345d0e0f010g10061a031i001j071k0a1b0c1d0e1234567890120f1g0h1i0j1k0a1b0123451c012d0e1f0g1h0i1j123k1a1b1c1d1e1f1g123h1i1j1k1a1b1c1d1e1f1g123h123i1j123k12340a120a12345b012c0123012d0d1e0f1g0h1i123j123k10000\"\n    }\n  },\n  \"operator\": \"Jane\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Idempotency-Key", "8e03978e-40d5-43e8-bc93-6894a57f9324")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Card Verification
require 'uri'
require 'net/http'

url = URI("https://api.payroc.com/v1/cards/verify")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '8e03978e-40d5-43e8-bc93-6894a57f9324'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"processingTerminalId\": \"1234001\",\n  \"card\": {\n    \"type\": \"card\",\n    \"cardDetails\": {\n      \"entryMethod\": \"keyed\",\n      \"keyedData\": {\n        \"dataFormat\": \"plainText\",\n        \"cardNumber\": \"4539858876047062\",\n        \"expiryDate\": \"1230\"\n      },\n      \"cardholderName\": \"Sarah Hazel Hopper\",\n      \"cardholderSignature\": \"a1b1c012345678a000b000c0012345d0e0f010g10061a031i001j071k0a1b0c1d0e1234567890120f1g0h1i0j1k0a1b0123451c012d0e1f0g1h0i1j123k1a1b1c1d1e1f1g123h1i1j1k1a1b1c1d1e1f1g123h123i1j123k12340a120a12345b012c0123012d0d1e0f1g0h1i123j123k10000\"\n    }\n  },\n  \"operator\": \"Jane\"\n}"

response = http.request(request)
puts response.read_body
```

```java Card Verification
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.payroc.com/v1/cards/verify")
  .header("Idempotency-Key", "8e03978e-40d5-43e8-bc93-6894a57f9324")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"processingTerminalId\": \"1234001\",\n  \"card\": {\n    \"type\": \"card\",\n    \"cardDetails\": {\n      \"entryMethod\": \"keyed\",\n      \"keyedData\": {\n        \"dataFormat\": \"plainText\",\n        \"cardNumber\": \"4539858876047062\",\n        \"expiryDate\": \"1230\"\n      },\n      \"cardholderName\": \"Sarah Hazel Hopper\",\n      \"cardholderSignature\": \"a1b1c012345678a000b000c0012345d0e0f010g10061a031i001j071k0a1b0c1d0e1234567890120f1g0h1i0j1k0a1b0123451c012d0e1f0g1h0i1j123k1a1b1c1d1e1f1g123h1i1j1k1a1b1c1d1e1f1g123h123i1j123k12340a120a12345b012c0123012d0d1e0f1g0h1i123j123k10000\"\n    }\n  },\n  \"operator\": \"Jane\"\n}")
  .asString();
```

```php Card Verification
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.payroc.com/v1/cards/verify', [
  'body' => '{
  "processingTerminalId": "1234001",
  "card": {
    "type": "card",
    "cardDetails": {
      "entryMethod": "keyed",
      "keyedData": {
        "dataFormat": "plainText",
        "cardNumber": "4539858876047062",
        "expiryDate": "1230"
      },
      "cardholderName": "Sarah Hazel Hopper",
      "cardholderSignature": "a1b1c012345678a000b000c0012345d0e0f010g10061a031i001j071k0a1b0c1d0e1234567890120f1g0h1i0j1k0a1b0123451c012d0e1f0g1h0i1j123k1a1b1c1d1e1f1g123h1i1j1k1a1b1c1d1e1f1g123h123i1j123k12340a120a12345b012c0123012d0d1e0f1g0h1i123j123k10000"
    }
  },
  "operator": "Jane"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => '8e03978e-40d5-43e8-bc93-6894a57f9324',
  ],
]);

echo $response->getBody();
```

```csharp Card Verification
using RestSharp;

var client = new RestClient("https://api.payroc.com/v1/cards/verify");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "8e03978e-40d5-43e8-bc93-6894a57f9324");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"processingTerminalId\": \"1234001\",\n  \"card\": {\n    \"type\": \"card\",\n    \"cardDetails\": {\n      \"entryMethod\": \"keyed\",\n      \"keyedData\": {\n        \"dataFormat\": \"plainText\",\n        \"cardNumber\": \"4539858876047062\",\n        \"expiryDate\": \"1230\"\n      },\n      \"cardholderName\": \"Sarah Hazel Hopper\",\n      \"cardholderSignature\": \"a1b1c012345678a000b000c0012345d0e0f010g10061a031i001j071k0a1b0c1d0e1234567890120f1g0h1i0j1k0a1b0123451c012d0e1f0g1h0i1j123k1a1b1c1d1e1f1g123h1i1j1k1a1b1c1d1e1f1g123h123i1j123k12340a120a12345b012c0123012d0d1e0f1g0h1i123j123k10000\"\n    }\n  },\n  \"operator\": \"Jane\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Card Verification
import Foundation

let headers = [
  "Idempotency-Key": "8e03978e-40d5-43e8-bc93-6894a57f9324",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "processingTerminalId": "1234001",
  "card": [
    "type": "card",
    "cardDetails": [
      "entryMethod": "keyed",
      "keyedData": [
        "dataFormat": "plainText",
        "cardNumber": "4539858876047062",
        "expiryDate": "1230"
      ],
      "cardholderName": "Sarah Hazel Hopper",
      "cardholderSignature": "a1b1c012345678a000b000c0012345d0e0f010g10061a031i001j071k0a1b0c1d0e1234567890120f1g0h1i0j1k0a1b0123451c012d0e1f0g1h0i1j123k1a1b1c1d1e1f1g123h1i1j1k1a1b1c1d1e1f1g123h123i1j123k12340a120a12345b012c0123012d0d1e0f1g0h1i123j123k10000"
    ]
  ],
  "operator": "Jane"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.payroc.com/v1/cards/verify")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```