GET
/
payment-methods
/
{payment_method_id}
using Gr4vy;
using Gr4vy.Models.Components;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

var res = await sdk.PaymentMethods.GetAsync(paymentMethodId: "ef9496d8-53a5-4aad-8ca2-00eb68334389");

// handle response
{
  "type": "payment-method",
  "approval_url": "https://gr4vy.app/redirect/12345",
  "country": "US",
  "currency": "USD",
  "details": {
    "bin": "<string>",
    "card_type": "credit",
    "card_issuer_name": "<string>"
  },
  "expiration_date": "12/30",
  "fingerprint": "a50b85c200ee0795d6fd33a5c66f37a4564f554355c5b46a756aac485dd168a4",
  "label": "1234",
  "last_replaced_at": "2013-07-16T19:23:00.000+00:00",
  "method": "card",
  "mode": "card",
  "scheme": "visa",
  "id": "ef9496d8-53a5-4aad-8ca2-00eb68334389",
  "merchant_account_id": "default",
  "additional_schemes": [
    "eftpos-australia"
  ],
  "cit_last_used_at": "2013-07-16T19:23:00.000+00:00",
  "cit_usage_count": 50,
  "has_replacement": false,
  "last_used_at": "2013-07-16T19:23:00.000+00:00",
  "usage_count": 100,
  "buyer": {
    "type": "buyer",
    "id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
    "merchant_account_id": "default",
    "display_name": "John Doe",
    "external_identifier": "buyer-12345",
    "billing_details": {
      "first_name": "John",
      "last_name": "Doe",
      "email_address": "john@example.com",
      "phone_number": "+1234567890",
      "address": {
        "city": "San Jose",
        "country": "US",
        "postal_code": "94560",
        "state": "California",
        "state_code": "US-CA",
        "house_number_or_name": "10",
        "line1": "Stafford Appartments",
        "line2": "29th Street",
        "organization": "Gr4vy"
      },
      "tax_id": {
        "value": "12345678931",
        "kind": "us.ein"
      }
    },
    "account_number": "<string>",
    "created_at": "2013-07-16T19:23:00.000+00:00",
    "updated_at": "2013-07-16T19:23:00.000+00:00"
  },
  "external_identifier": "card-12345",
  "status": "succeeded",
  "created_at": "2013-07-16T19:23:00.000+00:00",
  "updated_at": "2013-07-16T19:23:00.000+00:00"
}

This endpoint requires the payment-methods.read 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"

Path Parameters

payment_method_id
string
required

The ID of the payment method

Examples:

"ef9496d8-53a5-4aad-8ca2-00eb68334389"

Response

200
application/json

Successful Response

Payment Method

A stored payment method.

method
enum<string>
required

The type of this payment method.

Available options:
abitab,
affirm,
afterpay,
alipay,
alipayhk,
applepay,
arcuspaynetwork,
bacs,
bancontact,
banked,
bcp,
becs,
bitpay,
boleto,
boost,
card,
cashapp,
chaseorbital,
clearpay,
click-to-pay,
dana,
dcb,
dlocal,
ebanx,
efecty,
eps,
everydaypay,
gcash,
gem,
gemds,
gift-card,
giropay,
givingblock,
gocardless,
googlepay,
googlepay_pan_only,
gopay,
grabpay,
ideal,
kakaopay,
kcp,
khipu,
klarna,
latitude,
latitudeds,
laybuy,
linepay,
linkaja,
maybankqrpay,
mercadopago,
multibanco,
multipago,
nequi,
netbanking,
network-token,
nupay,
oney_10x,
oney_12x,
oney_3x,
oney_4x,
oney_6x,
ovo,
oxxo,
pagoefectivo,
payid,
paymaya,
paypal,
paypalpaylater,
payto,
payvalida,
picpay,
pix,
pse,
rabbitlinepay,
razorpay,
rapipago,
redpagos,
scalapay,
sepa,
servipag,
shopeepay,
singteldash,
smartpay,
sofort,
spei,
stitch,
stripedd,
thaiqr,
touchngo,
truemoney,
trustly,
trustlyeurope,
upi,
venmo,
vipps,
waave,
webpay,
wechat,
yape,
zippay
id
string
required

The ID for the payment method.

Examples:

"ef9496d8-53a5-4aad-8ca2-00eb68334389"

merchant_account_id
string
required

The ID of the merchant account this buyer belongs to.

Examples:

"default"

cit_usage_count
integer
required

The number of times this payment method has been used in transactions for client initiated transactions.

Examples:

50

has_replacement
boolean
required

Whether this card has a pending replacement that hasn't been applied yet.

Examples:

false

usage_count
integer
required

The number of times this payment method has been used in transactions.

Examples:

100

status
enum<string>
required

The state of the payment method.

Available options:
processing,
buyer_approval_required,
succeeded,
failed,
paused
created_at
string
required

The date and time when this payment method was first created in our system.

Examples:

"2013-07-16T19:23:00.000+00:00"

updated_at
string
required

The date and time when this payment method was last updated in our system.

Examples:

"2013-07-16T19:23:00.000+00:00"

type
string
default:payment-method

Always payment-method.

Allowed value: "payment-method"
Examples:

"payment-method"

approval_url
string | null

The optional URL that the buyer needs to be redirected to to further authorize their payment.

Examples:

"https://gr4vy.app/redirect/12345"

country
string | null

The 2-letter ISO code of the country this payment method can be used for. If this value is null the payment method may be used in multiple countries.

Examples:

"DE"

"GB"

"US"

currency
string | null

The ISO-4217 currency code that this payment method can be used for. If this value is null the payment method may be used for multiple currencies.

Examples:

"EUR"

"GBP"

"USD"

details
object | null

Details for credit or debit card payment method.

expiration_date
string | null

The expiration date for the payment method.

Required string length: 5
Examples:

"12/30"

fingerprint
string | null

The unique hash derived from the payment method identifier (e.g. card number).

Examples:

"a50b85c200ee0795d6fd33a5c66f37a4564f554355c5b46a756aac485dd168a4"

label
string | null

A label for the card or the account. For a paypal payment method this is the user's email address. For a card it is the last 4 digits of the card.

Maximum length: 320
Examples:

"1234"

last_replaced_at
string | null

The date and time when this card was last replaced by the account updater.

Examples:

"2013-07-16T19:23:00.000+00:00"

mode
enum<string> | null

The mode to use with this payment method.

Available options:
card,
redirect,
applepay,
googlepay,
checkout-session,
click-to-pay,
gift-card
Examples:

"card"

scheme
enum<string> | null

The scheme of the card. Only applies to card payments.

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
Examples:

"visa"

additional_schemes
enum<string>[] | null

Additional schemes of the card besides the primary scheme. Only applies to card payment methods.

Examples:
["eftpos-australia"]
cit_last_used_at
string | null

The timestamp when this payment method was last used in a transaction for client initiated transactions.

Examples:

"2013-07-16T19:23:00.000+00:00"

last_used_at
string | null

The timestamp when this payment method was last used in a transaction.

Examples:

"2013-07-16T19:23:00.000+00:00"

buyer
object | null

The optional buyer for which this payment method has been stored.

external_identifier
string | null

The merchant reference that can be used to match the payment method against your own records.

Required string length: 1 - 200
Examples:

"card-12345"