GET
/
card-details
Get card details
package main

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

func main() {

	url := "https://api.sandbox.{id}.gr4vy.app/card-details"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
"<any>"
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

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

Examples:

"default"

Query Parameters

currency
string
required

The three-letter ISO currency code.

Examples:

"USD"

bin
string | null

The bank identification number (BIN) of the card.

Required string length: 6 - 8
Examples:

"411111"

payment_method_id
string<uuid> | null

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

Examples:

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

country
string | null

The two-letter ISO country code.

Examples:

"DE"

"GB"

"US"

amount
integer | null

The payment amount in the smallest currency unit.

Examples:

1299

intent
enum<string> | null
default:authorize

The transaction intent.

Available options:
authorize,
capture
Examples:

"authorize"

is_subsequent_payment
boolean | null

Whether this is a subsequent payment.

Examples:

false

merchant_initiated
boolean | null

Whether the transaction is merchant-initiated

Examples:

false

metadata
string | null

Additional metadata for the transaction in JSON format

Examples:

"{\"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
Examples:

"web"

Response

200
application/json

Successful Response

The response is of type any.