#alexelba-paymentlink
1 messages ยท Page 1 of 1 (latest)
payment link will not work can not attach correct tax
ah yeah then you'd def need a client+ server-side integration as well
if doing server client side what will be best way. For email,phone, name, stripe credit card collection form. Click subscribe. Client Site Collect Payment on success submit form> Create a customer/ create subscription
the best way? Checkout in my opinion, it collects most of those things for you
it will be great, is it possible to collect meta during checkout as well?
is there document to see what fields I can collect with javascript
yep the API ref, and yes you can collect metadata, let me link to you
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
metadata is a field there too
so all done on client side?
or server side
this link looks like all done server side
server-side
if it was done client-side, a malicious customer could make arbitrary API requests on your account using your publishable key
very few things are possible with your publishable key
will this create duplicate customer?
it will but you can pass a customer to not make Checkout create one
https://stripe.com/docs/api/payment_methods/create for this method how do I pass the customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
do I need to attach after to the customer or I can pass customer to it?
why are you using that API endpoint?
that is PaymentMethod create
you don't need that
you should be using Checkout otherwise you're making this a complicated integration
users are not logged in
so they checkout as guest need make sure I don't create duplicate
clients
@tame lava also going to continue with your other questions here too
let me paste them in
what are allowed characters in email
Hello, I am trying to debug issue with customer emails, when creating customer it has + in it the stripe throws error
do you have an example of that email issue? is that in Stripe Checkout? somewhere else?
so they checkout as guest need make sure I don't create duplicate
so how would that work? it is a guest customer so you cannot identify if that is cus_123 or cus_456 so how would you deduplicate?
here is request id
thanks for request ID! looking
@tame lava look up the request https://dashboard.stripe.com/test/logs/req_mELIB9IFGJdzTx in the Dashboard and see the params you passed, a url encoding issue
you need to pass the full raw string, which you aren't passing currently
for the email?
one sec
I'm not pasting it here as this is a public channel
don't want to leak the email there
but look at the request/response in the Dashboard Request Log link
and you'll see the issue
you are not passing hello+pizza@gmail.com , your + and @ are url encoded which they do not need to be
I am using the stripe php client
$customer = $stripe->customers->create([
'description' => ' Customer',
'email' => $email,
'phone' => $phone,
'name' => $name,
]);
this parameters are plan text not encoded
I just made sure the $email is not encoded
btw if I just pass hello.pizza@gmail.com
it works fine
yeah because the issue is before this
where-ever you're getting $email from
because $name is fine
and others are fine too
I just did hard coded
yes hardcoding should work and it doe
does
that is expected
my point is
add a log to print out $email in your code, before that customer->create() API call
log out all your variables, $phone and $name as well
and you'll see the difference in what you're passing to the Stripe API
my point is, something in your code before that API call is url encoding the email
I'm stepping away but a colleague is around to help out
๐ that would be me!
Is there any way (https://stripe.com/docs/js/appendix/style) add border to elements
Complete reference documentation for the Stripe JavaScript SDK.
Yup! You should read https://stripe.com/docs/js/element/the_element_container - basically, you'd add the border to the container that you are mounting the element to
Complete reference documentation for the Stripe JavaScript SDK.
this will make a border for all together
I want saparate border for each element
card number to have own border
zip own border etc
Are you using the card Element, or the separate cardNumber , cardExpiry, cardCvc elements?
card
var stripeElements = stripe.elements();
var stripeCard = stripeElements.create('card', {style: style, hidePostalCode:true});
should I create saparate elements ?
I can do it if this only way
If you want each of them to have their own border then the only way to do it would be with the three separate elements
where can i find full list of card components I can create separately? (cardNumber , cardExpiry, cardCvc)
should I use card or payment method to collect payments for subscriptions?
I am not clear when should I use payment when I used card
The card element is what you use to create a Payment Method
Ah, so you're asking about the difference between the Payment element and card elements
Yup ๐
Either one will work! Payment Element is a newer offering and is meant to make it easier to ask multiple payment method types in a single element (not just card).
I was looking at it, but I can not see any parameter which I can spacify if I want lets say alipay,card and wechat
it says I can pick order but
does not say which one i want to show
I believe you would set that when you create the subscription at payment_settings.payment_method_types (see https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_settings-payment_method_types)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thanks will cehck it out