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
}
}Gets details about a particular card based on the BIN. Use the currency, amount, and other fields to apply any Flow rules that may put requirements on the card.
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
}
}payment_method_id. This endpoint requires the embed scope.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the merchant account to use for this request.
"default"
The three-letter ISO currency code.
"USD"
The bank identification number (BIN) of the card.
6 - 8^\d+$"411111"
The ID of the payment method to check, instead of the bin.
"123e4567-e89b-12d3-a456-426614174000"
The two-letter ISO country code.
^[A-Z]{2}$"US"
The payment amount in the smallest currency unit.
1299
The transaction intent.
authorize, capture "authorize"
Whether this is a subsequent payment.
false
Whether the transaction is merchant-initiated
false
Additional metadata for the transaction in JSON format
"{\"source\": \"web\"}"
The source of the transaction payment The way payment method information made it to this transaction.
ecommerce, moto, recurring, installment, card_on_file "web"
Successful Response
Always card-detail.
"card-detail""card-detail"
The Bank Identification Number (BIN) of the card.
6 - 8^\d+$"123456"
The type of the card.
"credit"
The card scheme/network.
accel, amex, bancontact, carte-bancaire, cirrus, culiance, dankort, diners-club, discover, eftpos-australia, elo, hipercard, jcb, maestro, mastercard, mir, nyce, other, pulse, qcard, rupay, star, uatp, unionpay, visa "visa"
URL to the card scheme's icon.
"https://api.example.gr4vy.app/assets/icons/card-scheme-definitions/mastercard.svg"
The country code associated with the card.
^[A-Z]{2}$"US"
Fields that are required for this card type.
Show child attributes
{
"address": { "postal_code": true },
"cvv": true
}Was this page helpful?