#jmartinez-pass-user-info
1 messages ยท Page 1 of 1 (latest)
Hello ๐
what fields are you trying to include?
If Stripe's customer object supports it then you can pass it as key-value pair while creating the customer
If not, you can use metadata to hold on to those additional fields https://stripe.com/docs/api/customers/create?lang=node
I am trying to pass a token, do I have to do it inside custom_fields or is it somewhere else?
what do you mean by token? what is the use-case here? Can you provide examples?
A token will be 16 characters which will be letters and numbers, e.g. 25GF1S3DFS6FD4S9
what are you trying to do with the token?
custom_fields is only used to show this information on invoices
https://stripe.com/docs/api/customers/object?lang=node#customer_object-invoice_settings-custom_fields
The token is for you to know what discount you have to give to the user, so we need to pass it on to you
Okay wait hold on, let's step back for a moment as this is getting confusing.
Is this token a promotion code created on Stripe?
It is not yet created, because we are testing, but it will be created
You probably want to use promotion_code field on the customer then
https://stripe.com/docs/api/customers/create?lang=node#create_customer-promotion_code
Yes, that field works for me, but then you are going to send the information to our SAP system, would the promotion code field be sent?
You mean via the webhook?
Yes, webhook or SAP makes an API call
yeah the customer will have a discount object on them on which you can expand to get the promotion_code
https://stripe.com/docs/api/customers/object?lang=node#customer_object-discount
https://stripe.com/docs/api/discounts/object?lang=node
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok and another thing
The user registers in our systems and we send you the data, how do you send this data to SAP?
I'm not sure as this would depend on your SAP system but your development team should be able to implement webhooks to receive real time updates
https://stripe.com/docs/webhooks
If not, you'd need to poll the API to retrieve relevant information
Ok, if not, you can also ask for the cleintes data every X amount of time every day, can't you?