#wmertens-attach
1 messages · Page 1 of 1 (latest)
Hi! What you described should work! Can you share the customer ID?
However note that now we recommend to use a SetupIntent instead of using the attach endpoint.
https://stripe.com/docs/api/setup_intents/create
Hi! Customer cus_LcUTx2A9Hjv9HX
and I attached pm here:
$ stripe payment_methods attach pm_card_visa --customer cus_LcUTx2A9Hjv9HX
=> "id": "pm_1KvGJQBLJBvhKXWrg0oP1Web",
This customer has 3 payment method attached:
Including pm_1KvGJQBLJBvhKXWrg0oP1Web
So it worked
ok - so apparently my problem is in the code that gets the paymentmethod, thanks.
When I attach a paymentmethod and then immediately list, it should show up, right? There's no period where it's still synchronising the change?
ah - I wasn't looking at .data 🤦♂️ Thanks for your help!
No problem! But like I said earlier, I would recommend to use a SetupIntent instead of attach https://stripe.com/docs/api/setup_intents/create
right - is this for deprecation reasons or other? It's just to setup my test environment, I don't use it in production