Retrieve a payment method

Changed on

Retrieves the payment method token details that belong to a customer.

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

Request

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

Path parameters

paymentMethodTokenstring required

Auto-generated unique identifier of the payment method token generated by the Ezypay Vault.

customerIdstring required

Auto-generated unique identifier of the customer.

Headers

merchantstring required

Merchant ID

Response

200

paymentMethodTokenstring
customerIdstring
typestring
bankunknown
invalidReasonunknown
lastUsedOnunknown
validboolean
primaryboolean

Example response

{
  "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
}

Changes