Skip to main content
GET
/
card-details
Get card details
using RestSharp;


var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/card-details");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
{
  "type": "card-detail",
  "id": "123456",
  "card_type": "credit",
  "scheme": "visa",
  "scheme_icon_url": "https://api.example.gr4vy.app/assets/icons/card-scheme-definitions/mastercard.svg",
  "country": "US",
  "required_fields": {
    "address": {
      "postal_code": true
    },
    "cvv": true
  }
}
Retrieves details about a card using card’s BIN or a stored payment_method_id. This endpoint requires the embed scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-gr4vy-merchant-account-id
string | null

The ID of the merchant account to use for this request.

Example:

"default"

Query Parameters

currency
string
required

The three-letter ISO currency code.

Example:

"USD"

bin
string | null

The bank identification number (BIN) of the card.

Required string length: 6 - 8
Example:

"411111"

payment_method_id
string<uuid> | null

The ID of the payment method to check, instead of the bin.

Example:

"123e4567-e89b-12d3-a456-426614174000"

country
string | null

The two-letter ISO country code.

Example:

"US"

amount
integer | null

The payment amount in the smallest currency unit.

Example:

1299

intent
enum<string> | null
default:authorize

The transaction intent.

Available options:
authorize,
capture
Example:

"authorize"

is_subsequent_payment
boolean | null

Whether this is a subsequent payment.

Example:

false

merchant_initiated
boolean | null

Whether the transaction is merchant-initiated

Example:

false

metadata
string | null

Additional metadata for the transaction in JSON format

Example:

"{\"source\": \"web\"}"

payment_source
enum<string> | null

The source of the transaction payment The way payment method information made it to this transaction.

Available options:
ecommerce,
moto,
recurring,
installment,
card_on_file
Example:

"web"

Response

Successful Response

type
string
default:card-detail

Always card-detail.

Allowed value: "card-detail"
Example:

"card-detail"

id
string | null

The Bank Identification Number (BIN) of the card.

Required string length: 6 - 8
Example:

"123456"

card_type
string | null

The type of the card.

Example:

"credit"

scheme
enum<string> | null

The card scheme/network.

Available options:
accel,
amex,
bancontact,
carte-bancaire,
cirrus,
culiance,
dankort,
diners-club,
discover,
eftpos-australia,
elo,
hipercard,
jcb,
maestro,
mastercard,
mir,
nyce,
other,
pulse,
rupay,
star,
uatp,
unionpay,
visa
Example:

"visa"

scheme_icon_url
string | null

URL to the card scheme's icon.

Example:

"https://api.example.gr4vy.app/assets/icons/card-scheme-definitions/mastercard.svg"

country
string | null

The country code associated with the card.

Example:

"US"

required_fields
RequiredFields · object

Fields that are required for this card type.

Example:
{
"address": { "postal_code": true },
"cvv": true
}