Retrieves a non-paginated data array of all non-deleted payment methods associated with a customer.
Retrieve a list of all non-deleted payment methods associated with a specific customer. This endpoint is useful for displaying saved payment options to the customer or managing their payment methods.
Key Features
- Fetch payment methods for a specific customer.
- Provides payment method details without exposing sensitive information.
- Useful for customer account management.
Usage Notes
Customer Validation: Ensure the customer_id provided corresponds to an existing customer.
Ordering: Payment methods are ordered by created_at in descending order.
Non-Paginated Response: This endpoint returns all payment methods without pagination.
Response Structure
Code | Response | Reason |
---|---|---|
200 | Success | Returns an array of payment method objects associated with the customer. |
400 | Bad Request | Invalid customer_id format. |
401 | Unauthorized | Authentication failed. |
404 | Not Found | The customer does not exist. |
500 | Internal Server Error | An unexpected error occurred on the server. |
Important Considerations
Data Privacy: Ensure compliance with privacy laws when accessing customer payment methods.
Error Handling: Implement error handling for scenarios where the customer does not exist or has no payment methods.
Security: Do not expose sensitive payment method details to unauthorized parties.