Aller au contenu

List payment methods for a Customer

La référence API est disponible en anglais uniquement.

GET/customers/{customer_id}/payment_methods

Lists all the applicable payment methods for a particular Customer ID.

Path parameters

  • customer_idstringrequired

    The unique identifier for the customer account

Query parameters

  • client_secretstring, nullable

    This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK

  • accepted_countriesarray of string (enum), nullable

    The two-letter ISO currency code

  • accepted_currenciesarray of string (enum), nullable

    The three-letter ISO currency code

  • amountinteger, nullable

    The amount accepted for processing by the particular payment method.

  • recurring_enabledboolean, nullable

    Indicates whether the payment method is eligible for recurring payments

  • installment_payment_enabledboolean, nullable

    Indicates whether the payment method is eligible for installment payments

  • limitinteger, nullable

    Indicates the limit of last used payment methods

  • card_networksarray of string (enum), nullable

    Indicates whether the payment method is eligible for card netwotks

Responses

  • 200Payment Methods retrieved
  • 400Invalid Data
  • 404Payment Methods does not exist in records

Request

curl --request GET \
  --url https://sandbox.cardencer.com/customers/{customer_id}/payment_methods \
  --header 'api-key: snd_...'

Response

{
  "customer_payment_methods": [
    {
      "payment_token": "7ebf443f-a050-4067-84e5-e6f6d4800aef",
      "payment_method_id": "pm_iouuy468iyuowqs",
      "customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
      "payment_method": "card",
      "requires_cvv": true,
      "default_payment_method_set": true
    }
  ]
}