ayushman
Member
Could you add an API endpoint to delete specific payment methods for a customer? We are integrating PSB with our SaaS and we are not doing it through the client portal as client portal has many extra options that cannot be hidden. We are depending on the API instead.
Can you also let us know how a payment method is selected in case we have multiple payment methods assigned to a customer (default payment method)?
Example:
{
"status": "success",
"message": "PaymentMethod data",
"data": [
{
"createdAt": "2023-01-25T13:16:41.832Z",
"updatedAt": "2023-01-25T13:17:02.782Z",
"id": "xxxxxxxxxxx",
"customer_id": "xxxxxxxxxxxxxxxxx",
"type": "stripe",
"gateway": {
"id": "xxxxxxxxxxxxxx",
"name": "Stripe",
"type": "stripe"
},
"last_four_digits": "4242",
"expiry_month": 11,
"expiry_year": 2026
},
{
"createdAt": "2023-01-25T13:13:04.030Z",
"updatedAt": "2023-01-25T13:13:04.030Z",
"id": "xxxxxxxxxxxxxxx",
"customer_id": "xxxxxxxxxxx",
"type": "stripe",
"gateway": {
"id": "xxxxxxxxxxxxxxxxxxx",
"name": "Stripe",
"type": "stripe"
},
"last_four_digits": "1111",
"expiry_month": 11,
"expiry_year": 2024
},
{
"createdAt": "2023-01-25T08:21:44.485Z",
"updatedAt": "2023-01-25T08:21:44.485Z",
"id": "xxxxxxxxxxxxxxxxxx",
"customer_id": "xxxxxxxxxxxxxxxxxxxx",
"type": "stripe",
"gateway": {
"id": "xxxxxxxxxxxxxxxxxxxx",
"name": "Stripe",
"type": "stripe"
}
}
]
}
Can you also let us know how a payment method is selected in case we have multiple payment methods assigned to a customer (default payment method)?
Example:
{
"status": "success",
"message": "PaymentMethod data",
"data": [
{
"createdAt": "2023-01-25T13:16:41.832Z",
"updatedAt": "2023-01-25T13:17:02.782Z",
"id": "xxxxxxxxxxx",
"customer_id": "xxxxxxxxxxxxxxxxx",
"type": "stripe",
"gateway": {
"id": "xxxxxxxxxxxxxx",
"name": "Stripe",
"type": "stripe"
},
"last_four_digits": "4242",
"expiry_month": 11,
"expiry_year": 2026
},
{
"createdAt": "2023-01-25T13:13:04.030Z",
"updatedAt": "2023-01-25T13:13:04.030Z",
"id": "xxxxxxxxxxxxxxx",
"customer_id": "xxxxxxxxxxx",
"type": "stripe",
"gateway": {
"id": "xxxxxxxxxxxxxxxxxxx",
"name": "Stripe",
"type": "stripe"
},
"last_four_digits": "1111",
"expiry_month": 11,
"expiry_year": 2024
},
{
"createdAt": "2023-01-25T08:21:44.485Z",
"updatedAt": "2023-01-25T08:21:44.485Z",
"id": "xxxxxxxxxxxxxxxxxx",
"customer_id": "xxxxxxxxxxxxxxxxxxxx",
"type": "stripe",
"gateway": {
"id": "xxxxxxxxxxxxxxxxxxxx",
"name": "Stripe",
"type": "stripe"
}
}
]
}