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 "desc"
The country code to filter payment methods by. This only applies to payment methods with a country value.
^[A-Z]{2}$"US"
The currency code to filter payment methods by. This only applies to payment methods with a currency value.
^[A-Z]{3}$"USD"
Successful Response
A list of items returned for this request.
Show child attributes