Getnet DocsGetnet Docs

Verify a Card

Process a zero amount payment transaction just for validating the card. This guide walks you through every step of using the Getnet Global API for this common e-commerce flow.

Requirements

Before following the steps, you need to:

  • Create your account by contacting the Integration Support team to get your API credentials client_id and client_secret.
  • Generate your token with your credentials using the Authentication endpoint.

Getnet provides a Postman Collection to help you to replicate these use cases locally. You can also test the API in sandbox using the API Reference available in the documentation.

Use Cases Specifics

When integrating any Getnet solution, market-specific requirements apply. Be sure to review the resources below before you go live:

You can also use test cards to simulate specific scenarios. More information about specific requirements for each country can be found in the Developer Resources section of the Getnet documentation.

Step 1: Verifing a card

A zero amount payment starts with authorization. This step validates the customer and card’s details. Use the Card verification endpoint to initiate the transaction.

The table below lists the fields you need to send:

AttributeTypeDescriptionExample
number_tokenStringTokenized card number.dfe05208b105578c070f806c80abd3a
brandStringCard Brand.Mastercard
cardholder_nameStringBuyer’s name printed on the card.JOAO DA SILVA
expiration_monthStringTwo-digit card expiration month.28
expiration_yearStringTwo-digit card expiration year.12
security_codeStringSecurity code. CVV or CVC.123

The following code block shows an example of a request and response to authorize a payment:

curl --request POST \
  --url https://api.pre.globalgetnet.com/dpm/cofre-gw-proxy/v1/cards/verification \
  --header 'authorization: Bearer ' \
  --header 'content-type: application/json' \
  --header 'x-seller-id: 54f88e68-7764-4e87-8830-756b1e2c02f8' \
  --header 'x-transaction-channel-entry: XX' \
  --data '{
  "number_token": "dfe05208b105578c070f806c80abd3a",
  "brand": "Mastercard",
  "cardholder_name": "JOAO DA SILVA",
  "expiration_month": "12",
  "expiration_year": "28",
  "security_code": "123"
}'

Example of response:

{
  "status": "VERIFIED",
  "verification_id": "ae267804-503c-4163-b1b1-f5da5120b74e",
  "authorization_code": "6964722471672911",
  "transaction_id": "1002217281190421"
}

The Getnet system automatically sends an internal zero-amount transaction along with the card details, allowing the issuer to validate the card’s existence and eligibility. After a successful validation, you can create the payments.

This is a verification with no financial transaction, in which no amount is credited to the card.

Next Steps

You can explore more features of the Getnet Global API: