Subscription references a payment method ID missing from the customer’s payment methods list
Hello Dodo Payments Support,
We found an apparent inconsistency between a subscription’s payment_method_id and the customer’s saved payment methods in Test Mode.
Steps to reproduce
- Create and pay for a subscription using a test card.
- Cancel the subscription.
- Create a new subscription for the same customer.
Manually enter the same card details again instead of selecting the saved card:
- same card number
- same expiration date
- same CVV
- Retrieve the new subscription and the customer’s payment methods.
It appears Dodo recognizes and deduplicates the same physical card, so it does not create another entry in the customer payment methods list. However, the new subscription receives a different payment_method_id.
Customer
cus_0Nit5PNSWnwbGgdhx4axM
Subscriptions
[
{
"subscription_id": "sub_0NjJ5ZzTvDYx0LfQ7g6xI",
"status": "active",
"payment_method_id": "pm_AGUnSlI1V3f5smOg8vl2",
"created_at": "2026-07-16T11:59:54.850786Z",
"next_billing_date": "2027-07-16T12:00:09.877212Z",
"customer_id": "cus_0Nit5PNSWnwbGgdhx4axM"
},
{
"subscription_id": "sub_0Nit5dA8lhUEHkRNh72Nn",
"status": "cancelled",
"payment_method_id": "pm_gPZpWXKk4eSuzuXi9fu5",
"created_at": "2026-07-10T14:44:34.167194Z",
"next_billing_date": "2027-07-16T06:13:35.337024Z",
"customer_id": "cus_0Nit5PNSWnwbGgdhx4axM"
},
{
"subscription_id": "sub_0Nit5POGOGvsoWzevyVhX",
"status": "failed",
"payment_method_id": null,
"created_at": "2026-07-10T14:43:24.043795Z",
"next_billing_date": "2026-07-10T14:43:24.043795Z",
"customer_id": "cus_0Nit5PNSWnwbGgdhx4axM"
}
]
The active subscription references:
pm_AGUnSlI1V3f5smOg8vl2
Customer payment methods response
GET /customers/cus_0Nit5PNSWnwbGgdhx4axM/payment-methods returns:
[
{
"payment_method_id": "pm_gPZpWXKk4eSuzuXi9fu5",
"payment_method": "card",
"payment_method_type": "credit",
"recurring_enabled": true,
"last_used_at": "2026-07-10T14:44:49.850Z",
"card": {
"card_network": "visa",
"card_type": "credit",
"last4_digits": "4242",
"expiry_month": "12",
"expiry_year": "2034"
}
}
]
Therefore, the active subscription references pm_AGUnSlI1V3f5smOg8vl2, but that ID is absent from the customer’s payment methods list.
Impact
Our UI cannot determine which saved payment method is currently used by the active subscription. Comparing payment method IDs produces no match, and Dodo does not expose an endpoint to retrieve payment method details directly by ID.
Expected behavior
We would expect one of the following:
- The active subscription to reference the existing canonical customer payment method ID, or
- The new payment method ID to appear in the customer payment methods list, or
- An API field/endpoint that maps a subscription payment method ID to its canonical customer payment method.
Could you confirm whether this behavior is expected and recommend the correct way to identify the customer payment method currently used by a subscription?
0 Comments
Sign in to comment
No comments yet. Be the first to share your thoughts!
