Links API DocsLinks API Docs

Retrieve Customer Payment Methods by Reference

GET/api/paymentmethod/customer/reference/{customerReference}

This endpoint retrieves all payment methods associated with a specific customer, identified by the `customerReference`. It returns details for each payment method linked to the customer reference.

Path Parameters

customerReferencestringrequired

Response

A successful response containing the list of payment methods associated with the customer reference.

resultobject

The result of the request, including status and any relevant messages.

Show result properties
resultType"Accepted" | "Declined" | "NotFound" | "ValidationFailed" | "Forbidden" | "Error"

The type of result indicating the status of the request.

merchantMessagestring

A message intended for the merchant, providing additional details about the result of the request.

logIdentifierstring

A unique identifier for the server log entry related to this request, useful for troubleshooting.

logAsErrorboolean

Indicates whether this log entry should be treated as an error.

merchantIdentifierstring

A unique identifier for the merchant associated with the payment methods.

customerIdentifierstring

A unique identifier for the customer whose payment methods are being retrieved.

customerReferencestring

An optional reference provided by the merchant to identify the customer.

paymentMethodsobject[]

A list of payment methods associated with the customer.

Show paymentMethods properties
paymentMethodIdentifierstring

The unique identifier for the payment method.

cardobject

Credit card information associated with the payment method.

Show card properties
cardNumberstring

The credit card number. This field is optional and should be stored securely.

expiryMonthinteger<int32>

The expiry month of the credit card.

expiryYearinteger<int32>

The expiry year of the credit card.

cardHolderNamestring

The name of the cardholder as it appears on the credit card.

cvvstring

The card verification value (CVV) for the credit card. This field is optional.

creditCardBrand"Unknown" | "MasterCard" | "Visa" | "Amex" | "Discover" | "JCB"

The brand of the credit card, such as Visa or MasterCard.

billingInformationobject

Billing address and contact details for the payment method.

Show billingInformation properties
firstLinestring

The first line of the billing address.

secondLinestring

The second line of the billing address.

citystring

The city of the billing address.

regionstring

The region or state of the billing address.

zipCodestring

The postal or zip code for the billing address.

countryAlpha3Codestring

The three-letter country code (ISO Alpha-3) for the billing address.

The request is invalid or contains incorrect parameters.

resultobject

The result object that contains the outcome and additional details of the API request.

Show result properties
resultType"Accepted" | "Declined" | "NotFound" | "ValidationFailed" | "Forbidden" | "Error"

The type of result indicating the status of the request.

merchantMessagestring

A message intended for the merchant, providing additional details about the result of the request.

logIdentifierstring

A unique identifier for the server log entry related to this request, useful for troubleshooting.

logAsErrorboolean

Indicates whether this log entry should be treated as an error.

No payment methods were found for the specified customer reference.

resultobject

The result object that contains the outcome and additional details of the API request.

Show result properties
resultType"Accepted" | "Declined" | "NotFound" | "ValidationFailed" | "Forbidden" | "Error"

The type of result indicating the status of the request.

merchantMessagestring

A message intended for the merchant, providing additional details about the result of the request.

logIdentifierstring

A unique identifier for the server log entry related to this request, useful for troubleshooting.

logAsErrorboolean

Indicates whether this log entry should be treated as an error.

Request
curl -X GET "https://testapi.linksmerchantservices.com/api/paymentmethod/customer/reference/<customerReference>"
Response
{
  "result": {
    "resultType": "Accepted",
    "merchantMessage": "string",
    "logIdentifier": "string",
    "logAsError": true
  },
  "merchantIdentifier": "string",
  "customerIdentifier": "string",
  "customerReference": "string",
  "paymentMethods": [
    {
      "paymentMethodIdentifier": "string",
      "card": {
        "cardNumber": "string",
        "expiryMonth": 0,
        "expiryYear": 0,
        "cardHolderName": "string",
        "cvv": "string",
        "creditCardBrand": "Unknown"
      },
      "billingInformation": {
        "firstLine": "string",
        "secondLine": "string",
        "city": "string",
        "region": "string",
        "zipCode": "string",
        "countryAlpha3Code": "string"
      }
    }
  ]
}