Skip to main content
GET
List All Payment Methods

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

limit
integer<int32>
default:20

A limit on the number of objects to be returned, between 1 and 100.

Required range: 1 <= x <= 100
starting_after
string

A cursor for use in pagination. starting_after is an object id that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

ending_before
string

A cursor for use in pagination. ending_before is an object id that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

account
string

Specify a particular account by id or vid A unique identifier. Optionally, this object can also be identified by its vid. Using a unique custom identifier is strongly encouraged.

Maximum string length: 128
include_children
boolean
default:false

include child account Payment Methods in results

Response

JSON A list array with a data property that contains an array of up to limit PaymentMethod, starting after the specified starting_after PaymentMethod (or ending before the specified ending_before PaymentMethod). Each entry in the array is a full PaymentMethod object. If no more PaymentMethods are available, the resulting array will be empty. This request should never throw an error. A list of PaymentMethod objects matching the query. Also:

  • “total_count”: Integer count of the number of PaymentMethod in the returned list.

  • “url”: The query string provided in the request

  • “next”: The route (partial URL) to the next PaymentMethod object (string to select the “next”); included vid should match that of the last object returned here

  • “previous”: The route (partial URL) to the previous PaymentMethod object (string to select the “previous”); included vid should match that of the first object returned here

object
enum<string>
Available options:
List
total_count
integer

Integer count of the number of items in the returned list.

data
object[]
url
string

The query string provided in the request

next
string

The route (partial URL) to the next PaymentMethod object (string to select the “next”); included id should match that of the last object returned here.

previous
string

The route (partial URL) to the previous PaymentMethod object (string to select the “previous”); included id should match that of the first object returned here.

Example:

"{ \"object\": \"List\", \"data\": [ { \"object\": \"PaymentMethod\", \"id\": \"CC_1672665754\", \"vid\": \"616cf2d79f783cc7214b70f3533be4edfbfe7b89\", \"created\": \"2023-01-02T13:22:35+00:00\", \"type\": \"CreditCard\", \"credit_card\": { \"object\": \"CreditCard\", \"vid\": \"55a1e7fe0b427d82a272db58e69c7ac3cf818981\", \"account\": \"512345XXXXXX2346\", \"bin\": \"512345\", \"type\": \"MC\", \"last_digits\": \"2346\", \"account_length\": 16, \"expiration_date\": \"202205\", \"last_au_request_date\": null, \"last_update_date\": null }, \"account_holder\": \"Donovan United\", \"billing_address\": { \"object\": \"Address\", \"vid\": \"e3dd2a7cc6ba57b8d4cdf5a9f927aca5e604cb81\", \"name\": \"Donovan United\", \"line1\": \"18649 High Street\", \"city\": \"Mumbai\", \"district\": \"MH\", \"postal_code\": \"411017\", \"country\": \"IN\" }, \"customer_description\": \"Credit Card\", \"primary\": true, \"active\": true, \"linked_subscription\": true } ], \"total_count\": 1, \"url\": \"/payment_methods?limit=1&account=Account_1672665754\", \"next\": \"/payment_methods?limit=1&account=Account_1672665754&starting_after=CC_1672665754\", \"previous\": \"/payment_methods?limit=1&account=Account_1672665754&ending_before=CC_1672665754\" }"