List payment methods

Changed on

Retrieve a list of payment methods and the details for an existing customer. The list would include both valid and invalid payment methods.

get/billing/customers/{customerId}/paymentmethods

Request

  • Base URL
    https://api-sandbox.ezypay.com/v2
  • URL
    https://api-sandbox.ezypay.com/v2/billing/customers/{customerId}/paymentmethods
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://identity-sandbox.ezypay.com/token

Path parameters

customerIdstring required

Auto-generated unique identifier of the customer.

Query parameters

limitinteger

To paginate a large result set, use the 'limit' argument to limit the number of results returned per page up to a maximum of 100 records. For example, limit = 10 shows results 1-10.

cursorinteger

An cursor for use in pagination. Specify the number of objects to skip to fetch the next page of objects. For example, limit=10 and cursor=10 will show results for record 11 - 20.

Headers

merchantstring required

Merchant ID

Response

200

Example response

{
  "data": [
    {
      "paymentMethodToken": "96c77042-abe6-4cb0-8369-020687f1eeab",
      "customerId": "031d6fd8-f181-402a-82a3-68056639f3c0",
      "type": "CARD",
      "card": {
        "first6": "411111",
        "last4": "1111",
        "accountHolderName": "AU Test User",
        "type": "VISA",
        "expiryMonth": "01",
        "expiryYear": "99"
      },
      "valid": true,
      "primary": true
    }
  ],
  "paging": {
    "totalCount": 1
  }
}

Changes