{ "error": { "type": "request_error", "code": "payment_method_in_use", "detail": "Can't delete a payment method that's in use on an active, trialing, paused, or past_due subscription.", "documentation_url": "https://developer.paddle.com/errors/payment_methods/payment_method_in_use" }, "meta": { "request_id": "00000000-0000-0000-0000-000000000000" }}Details
- Status code
- 400
- Error code
payment_method_in_use- Error message
- Can't delete a payment method that's in use on an active, trialing, paused, or past_due subscription.
Common causes
- A payment attempt on the most recent
completedtransaction for at least one of the customer'sactive,trialing,paused, orpast_duesubscriptions used this payment method. Subscriptions that arecanceleddon't block deletion.
Troubleshooting
- List subscriptions for this customer, filtering by
customer_idandstatus=active,trialing,paused,past_due. For each subscription, list transactions withsubscription_id,status=completed,order_by=updated_at[DESC], andper_page=1. The subscription uses this payment method if any entry in that transaction'spaymentsarray has a matchingpayment_method_id. - Update the payment method on each of those subscriptions, then retry the delete. Get a transaction to update payment method and pass it to Paddle.js, or create a customer portal session so the customer can update it.