using Gr4vy;
using Gr4vy.Models.Components;
using Gr4vy.Models.Requests;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
ListBuyerPaymentMethodsRequest req = new ListBuyerPaymentMethodsRequest() {};
var res = await sdk.Buyers.PaymentMethods.ListAsync(req);
// handle response{
"items": [
{
"method": "abitab",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_account_id": "<string>",
"cit_usage_count": 123,
"has_replacement": true,
"usage_count": 123,
"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",
"mode": "card",
"scheme": "visa",
"additional_schemes": [
"eftpos-australia"
],
"cit_last_used_at": "2013-07-16T19:23:00.000+00:00",
"last_used_at": "2013-07-16T19:23:00.000+00:00"
}
]
}List all the stored payment methods for a specific buyer.
using Gr4vy;
using Gr4vy.Models.Components;
using Gr4vy.Models.Requests;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
ListBuyerPaymentMethodsRequest req = new ListBuyerPaymentMethodsRequest() {};
var res = await sdk.Buyers.PaymentMethods.ListAsync(req);
// handle response{
"items": [
{
"method": "abitab",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_account_id": "<string>",
"cit_usage_count": 123,
"has_replacement": true,
"usage_count": 123,
"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",
"mode": "card",
"scheme": "visa",
"additional_schemes": [
"eftpos-australia"
],
"cit_last_used_at": "2013-07-16T19:23:00.000+00:00",
"last_used_at": "2013-07-16T19:23:00.000+00:00"
}
]
}payment-methods.read or 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 ID of the buyer to query payment methods for.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
The external identifier of the buyer to query payment methods for.
"buyer-12345"
The field to sort the payment methods by.
"last_used_at""last_used_at"
The direction to sort the payment methods in.
asc, desc The country code to filter payment methods by. This only applies to payment methods with a country value.
"US"
The currency code to filter payment methods by. This only applies to payment methods with a currency value.
"USD"
Successful Response
A list of items returned for this request.
Show child attributes
The type of this payment method.
abitab, affirm, afterpay, alipay, alipayhk, applepay, arcuspaynetwork, bacs, bancontact, bank, banked, bcp, becs, bitpay, blik, 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, p24, pagoefectivo, payid, paymaya, paypal, paypalpaylater, payto, payvalida, picpay, pix, plaid, pse, rabbitlinepay, razorpay, rapipago, redpagos, scalapay, sepa, servipag, shopeepay, singteldash, smartpay, sofort, spei, stitch, stripedd, stripetoken, tapi, tapifintechs, thaiqr, touchngo, truemoney, trustly, trustlyeurope, upi, venmo, vipps, waave, webpay, wechat, yape, zippay The ID for the payment method.
The ID of the merchant account this buyer belongs to.
The number of times this payment method has been used in transactions for client initiated transactions.
Whether this card has a pending replacement that hasn't been applied yet.
The number of times this payment method has been used in transactions.
Always payment-method.
"payment-method"The optional URL that the buyer needs to be redirected to to further authorize their payment.
"https://gr4vy.app/redirect/12345"
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.
"US"
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.
"USD"
The expiration date for the payment method.
5"12/30"
The unique hash derived from the payment method identifier (e.g. card number).
"a50b85c200ee0795d6fd33a5c66f37a4564f554355c5b46a756aac485dd168a4"
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.
320"1234"
The date and time when this card was last replaced by the account updater.
"2013-07-16T19:23:00.000+00:00"
The mode to use with this payment method.
card, redirect, applepay, googlepay, checkout-session, click-to-pay, gift-card, bank "card"
The scheme of the card. Only applies to card payments.
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 "visa"
Additional schemes of the card besides the primary scheme. Only applies to card payment methods.
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 ["eftpos-australia"]The timestamp when this payment method was last used in a transaction for client initiated transactions.
"2013-07-16T19:23:00.000+00:00"
The timestamp when this payment method was last used in a transaction.
"2013-07-16T19:23:00.000+00:00"
Was this page helpful?