Skip to main content
POST
/
v1
/
customer
/
getPaymentMethods
get payment methods
curl --request POST \
  --url https://api.unprice.dev/v1/customer/getPaymentMethods \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerId": "cus_1H7KQFLr7RepUyQBKdnvY",
  "provider": "stripe"
}
'
[
  {
    "id": "<string>",
    "name": "<string>",
    "last4": "<string>",
    "expMonth": 123,
    "expYear": 123,
    "brand": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Body of the request

customerId
string
required

The customer ID

Example:

"cus_1H7KQFLr7RepUyQBKdnvY"

provider
enum<string>
required

The payment provider

Available options:
stripe,
square
Example:

"stripe"

Response

The result of the get payment methods

id
string
required
name
string | null
required
last4
string
expMonth
number
expYear
number
brand
string