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": "error",
  "code": "bad_request",
  "status": 400,
  "message": "Generic error",
  "details": []
}
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.

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

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

"web"

Response

Successful Response