Retrieve primary payment method

Changed on

Retrieve the payment method details of the customer's primary payment method.

get/billing/customers/{customerId}/paymentmethods/primary

Request

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

Path parameters

customerIdstring required

Auto-generated unique identifier of the customer.

Headers

merchantstring

Merchant ID

Response

200

paymentMethodTokenstring
customerIdstring
typestring
bankunknown
invalidReasonunknown
lastUsedOnunknown
validboolean
primaryboolean

Example response

{
  "paymentMethodToken": "187b485f-1f40-4c35-8c0d-81f87888ffcd",
  "customerId": "37a2e1dd-c1d9-4fda-a077-6908877aa84c",
  "type": "CARD",
  "card": {
    "first6": "498765",
    "last4": "8769",
    "accountHolderName": "JaneDoe",
    "type": "VISA",
    "expiryMonth": "12",
    "expiryYear": "25"
  },
  "valid": true,
  "primary": true
}

Changes