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


var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/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",
      "additional_schemes": [
        "visa"
      ],
      "approval_target": "any",
      "approval_url": "https://api.example.app.gr4vy.com/payment-methods/ffc88ec9-e1ee-45ba-993d-b5902c3b2a8c/approve",
      "buyer": {
        "type": "buyer",
        "id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
        "billing_details": {
          "type": "billing-details",
          "first_name": "John",
          "last_name": "Lunn",
          "email_address": "john@example.com",
          "phone_number": "+1234567890",
          "address": {
            "city": "London",
            "country": "GB",
            "postal_code": "789123",
            "state": "Greater London",
            "state_code": "GB-LND",
            "house_number_or_name": "10",
            "line1": "10 Oxford Street",
            "line2": "New Oxford Court",
            "organization": "Gr4vy"
          },
          "tax_id": {
            "value": "12345678931",
            "kind": "gb.vat"
          }
        },
        "created_at": "2013-07-16T19:23:00.000+00:00",
        "display_name": "John L.",
        "external_identifier": "user-789123",
        "merchant_account_id": "default",
        "updated_at": "2013-07-16T19:23:00.000+00:00",
        "account_number": "1234567"
      },
      "country": "US",
      "created_at": "2013-07-16T19:23:00.000+00:00",
      "currency": "USD",
      "details": {
        "bin": "412345",
        "card_type": "credit",
        "card_issuer_name": "Bank"
      },
      "expiration_date": "07/24",
      "external_identifier": "user-789123",
      "has_replacement": false,
      "label": "john@example.com",
      "last_replaced_at": "2023-07-26T19:23:00.000+00:00",
      "merchant_account_id": "default",
      "method": "card",
      "mode": "card",
      "scheme": "visa",
      "status": "succeeded",
      "updated_at": "2013-07-16T19:23:00.000+00:00",
      "fingerprint": "20eb353620155d2b5fc864cc46a73ea77cb92c725238650839da1813fa987a17",
      "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
    }
  ],
  "limit": 1,
  "next_cursor": "ZXhhbXBsZTE",
  "previous_cursor": null
}
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.

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"

status
enum<string>[]

Filters the results to only the payment methods for which the status matches with any of the provided status values.

Available options:
processing,
buyer_approval_required,
succeeded,
failed
Example:
["succeeded", "processing"]
external_identifier
string

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

Example:

"xid123"

limit
integer<int32>
default:20

Defines the maximum number of items to return for this request.

Required range: 1 <= x <= 100
Example:

1

cursor
string<>

A cursor that identifies the page of results to return. This is used to paginate the results of this API.

For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the next_cursor field. Similarly the previous_cursor can be used to reverse backwards in the list.

Example:

"ZXhhbXBsZTE"

Response

Returns a list of payment methods.

A list of stored payment methods.

items
Payment method · object[]

A list of stored payment methods.

limit
integer<int32>
default:20

The limit applied to request. This represents the number of items that are at maximum returned by this request.

Required range: 1 <= x <= 100
Example:

1

next_cursor
string | null

The cursor that represents the next page of results. Use the cursor query parameter to fetch this page of items.

Required string length: 1 - 1000
Example:

"ZXhhbXBsZTE"

previous_cursor
string | null

The cursor that represents the next page of results. Use the cursor query parameter to fetch this page of items.

Required string length: 1 - 1000
Example:

null