#Pedru-customer-sources
1 messages · Page 1 of 1 (latest)
Hello! Can you give me a bit more detail? What code are you using that results in your getting that incorrect URL
So, the intention is to register the user and a subscription, so I consume the following URLs:
/v1/customers
/v1/tokens
/v1/customers/cus_KzIopT7LtuvfEr/sources
/v1/setup_intents
/v1/subscriptions
But sometimes when it comes to the third url it returns the empty customer ID
HI 👋 I'm just jumping in, let me catch up
What are you using to consume these APIs?
I'm consuming all these endpoints inside the code directly on the web front end
Could you describe the workflow you are trying to create?
When the customer fills out all my form including placing the card, he finishes the subscription purchase, in that I start consuming v1/customers to create the customer, then I save the customer ID in a variable and consume v1/tokens to save the customer's card in the token ID if that works I consume /v1/customers/(ID Customer)/sources to save the ID token in the customer and then I consume /v1/setup_intents to save the card in the customer and finally I create a subscription in /v1/subscriptions
So, based on what you've described, it sounds like in some cases the Customer ID is not returned, which is why you get the malformed URL?
Yes