Skip to main content
Vindicia Knowledge Center

List all payment methods

List all payment methods

Retrieves all paymentmethods. During the Beta test, the API requires a filter by account

Route (URL) Parameters

None.

Query Parameters

Parameter Default Description Required
limit 20 A limit on the number of objects to be returned, between 1 and 100. No
starting_after none 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. No
ending_before none 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. No
account none Specify a particular account Yes (Beta)

Accepts

None.

Returns

JSON A list array with a data property that contains an array of up to limit PaymentMethods, 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 paymentmethods 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 id 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 id should match that of the first object returned here
  • cURL
  • Java
Example Request
curl -X GET \
-u acaff38d462f9430d5cbcbaf:a575771fc679b9de \
"https://api.prodtest.vindicia.com/payment_methods?limit=1&account=cust_1235"
          
The above command returns JSON structured like this:
{
    "object": "List",
    "data": [
        {
        "object": "PaymentMethod",
        "id": "paym_1235",
        "vid": "97b0915f6e65614462fdee6ffbc8385f3308188f",
        "created": "2016-05-24T17:41:29-07:00",
        "type": "CreditCard",
        "credit_card": {
            "object": "CreditCard",
            "vid": "0f0c86caef22b95b80f430cd4f8fc2df52a03f97",
            "account": "422277XXXXXX9507",
            "bin": "422277",
            "last_digits": "9507",
            "account_length": 16,
            "expiration_date": "201805"
            },
        "account_holder": "Sally W. Brown",
        "billing_address": {
            "object": "Address",
            "vid": "2eec375cdf13cd4998346796995099146448a651",
            "name": "Sally Brown",
            "line1": "123 Main Street",
            "city": "San Francisco",
            "district": "CA",
            "postal_code": "94105",
            "country": "US",
            "phone": "415-555-3212"
            },
        "customer_specified_type": "VI",
        "primary": true,
        "active": true
        }
        ],
        "total_count": 1,
    "url": "/payment_methods?limit=1&account=cust_1235",
    "next": "/payment_methods?limit=1&account=cust_1235&starting_after=paym_1235",
    "previous": "/payment_methods?limit=1&account=cust_1235&ending_before=paym_1235"
}
import com.vindicia.client.CashBox;
CashBox.apiKey = "acaff38d462f9430d5cbcbafa575771fc679b9de";
Map<string,> params = new HashMap<string,>();
params.put("limit",  1);
params.put("account",  "cust_1235");
PaymentMethod.list(params);
          
The above command returns JSON structured like this:
{
    "object": "List",
    "data": [
        {
        "object": "PaymentMethod",
        "id": "paym_1235",
        "vid": "97b0915f6e65614462fdee6ffbc8385f3308188f",
        "created": "2016-05-24T17:41:29-07:00",
        "type": "CreditCard",
        "credit_card": {
            "object": "CreditCard",
            "vid": "0f0c86caef22b95b80f430cd4f8fc2df52a03f97",
            "account": "422277XXXXXX9507",
            "bin": "422277",
            "last_digits": "9507",
            "account_length": 16,
            "expiration_date": "201805"
            },
        "account_holder": "Sally W. Brown",
        "billing_address": {
            "object": "Address",
            "vid": "2eec375cdf13cd4998346796995099146448a651",
            "name": "Sally Brown",
            "line1": "123 Main Street",
            "city": "San Francisco",
            "district": "CA",
            "postal_code": "94105",
            "country": "US",
            "phone": "415-555-3212"
            },
        "customer_specified_type": "VI",
        "primary": true,
        "active": true
        }
        ],
        "total_count": 1,
    "url": "/payment_methods?limit=1&account=cust_1235",
    "next": "/payment_methods?limit=1&account=cust_1235&starting_after=paym_1235",
    "previous": "/payment_methods?limit=1&account=cust_1235&ending_before=paym_1235"
}
          

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top