Skip to main content
GET
/
buyers
/
payment-methods
List payment methods for buyer
using RestSharp;


var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/buyers/payment-methods");
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);
{
  "items": [
    {
      "type": "payment-method",
      "id": "77a76f7e-d2de-4bbc-ada9-d6a0015e6bd5",
      "merchant_account_id": "default",
      "method": "card",
      "label": "1111",
      "scheme": "visa",
      "additional_schemes": [
        "visa"
      ],
      "expiration_date": "11/25",
      "approval_target": "any",
      "approval_url": "https://api.example.app.gr4vy.com/payment-methods/ffc88ec9-e1ee-45ba-993d-b5902c3b2a8c/approve",
      "currency": "USD",
      "country": "US",
      "last_replaced_at": "2023-07-26T19:23:00.000+00:00",
      "has_replacement": false,
      "last_used_at": "2013-07-16T19:23:00.000+00:00",
      "usage_count": 5,
      "cit_last_used_at": "2013-07-16T19:23:00.000+00:00",
      "cit_usage_count": 2
    }
  ]
}
This endpoint requires the payment-methods.read or embed scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

buyer_id
string

Filters the results to only the items for which the buyer has an id that matches this value.

Example:

"8724fd24-5489-4a5d-90fd-0604df7d3b83"

buyer_external_identifier
string

Filters the results to only the items for which the buyer has an external_identifier that matches this value.

Example:

"user-12345"

country
string

Filters the results to only the items which support this country code. A country is formatted as 2-letter ISO country code.

Example:

"US"

currency
string

Filters the results to only the items which support this currency code. A currency is formatted as 3-letter ISO currency code.

Example:

"USD"

sort_by
enum<string>

Used by the payment method filter to sort the results by an specific usage field. Set of fields to order results.

Available options:
last_used_at,
usage_count,
cit_last_used_at,
cit_usage_count
Example:

"last_used_at"

order_by
enum<string>
default:desc

Used to show the results ascending or descending order. Ordering direction for the results.

Available options:
asc,
desc
Example:

"desc"

Response

Returns a list of available payment methods for a buyer, filtered by the given currency and country code.

A list of stored payment methods in summarized format.

items
Payment Method (Summary) · object[]

A list of stored payment methods in summarized format.