DocsPayment MethodsList

List Payment Methods

Get a list of payment methods for the authenticated user.

Endpoint

GET ${baseUrl}/users/payment-methods

Response

interface PaymentMethodsResponse {
  success: boolean
  data: {
    type: 'PP' | 'CC'
    token: string
    last4: string | null
    ppAccount: string | null
    userId: string
    image: string
    desc: string
  }[]
}

Example Request

const response = await fetch('${baseUrl}/users/payment-methods', {
  headers: {
    Authorization: 'Basic YOUR_API_KEY',
  },
})
 
const data = await response.json()

Error Codes

Status CodeDescription
200Success
401Unauthorized
403Forbidden
500Server Error