#nyxi_automatic-payment-methods

1 messages ยท Page 1 of 1 (latest)

wispy tangleBOT
proper minnowBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

wispy tangleBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1244994481288249407

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

deft tree
#

Hi there ๐Ÿ‘‹ we automatically show all Payment Method types that match the criteria of the intent being used. It looks like the intent you created used a presentment currency of dkk, which isn't supported by most of the Payment Method types you mentioned. The only one mentioned that seems to match the currency is MobilePay.

wispy tangleBOT
#

nyxi_automatic-payment-methods

deft tree
#

I'm still looking into that

sage flicker
#

ok

deft tree
#

Checking with teammates where the perfect tool for looking into this got moved to

sage flicker
#

Alright

#

maybe I need to provide return_url when creating the intent to make the elements support redirect-based payment methods?

#

(Which MobilePay is)

#

But docs say "only when confirm=true" which we dont

deft tree
sage flicker
#

aha, ok

deft tree
#

And that Connected Accounts seems to be inheriting defaults.

sage flicker
#

Ok I'll enable it now

#

I had enabled it on the connected account itself

#

It works now, but for Google Pay and MobilePay: Is there are way to remove this huge block of "You will be redirected" text? Would prefer it just checked the row and didn't expand at all.

#

(coloring/styling is WIP here)

deft tree
#

No, but I'll capture your feedback that this is something you'd be interested in having more control over in the future.

sage flicker
#

Yes please, I think this looks fairly bad to be honest

#

We had a custom payment selector before which was basically this, but with no row expansion if you don't need to provide info (like card)

#

Do you know how to change the color of the white block in the screenshot above? We're having a bit of trouble targeting it with the styling guide.

deft tree
#

Hm, not offhand. I know the Appearance API is the right approach if that is adjustable, but I'm not sure what the exact variable within it for those are.

sage flicker
#

Brute force then I guess

#

Something you could consider creating was a "config creator" where you can select each item and pick the color/whatever for it, then generate a config object. Would be very helpful.

#

I guess the inspect tool does 90% of that. We'll try.

deft tree
#

That's exactly what I was firing up to look for clues

sage flicker
#

The inner-most object here is classed as Block

#

but it ignores anything we give it and overrides it with a var() that contains a stripe elements variable

#

Tried with color as well to change text color, no dice

deft tree
#

What do you have right now for your appearance options?

sage flicker
#

I think we solved it by applying the variables first (step 2, after theme). We may not need to go into the rules at all.

#

It seems it applies colorBackground to the block

#

I think my guy just skipped a step ๐Ÿ˜„

deft tree
#

Glad you were able to get it sorted!

sage flicker
#

Hmm yea it's still playing games with us. Like it will color all input fields correctly (using .Input), but the email input for link login remains white

#

and looking at the inspector, it has .Input as its class

#

but it also has p-EmailField

deft tree
#

You're now talking about the section that appears when you click on the "something 1-click something" line that brings up Link?

sage flicker
#

yes

#

All other input fields are dark as expected

#

but email field is white. We can change it by styling the private selector, but the guide says that's a nono

deft tree
#

Hm, my suspicion is that one is broken.

sage flicker
#

That's unfortunate

deft tree
#

Sorry, I'm trying to test it out and confirm, but it's slow going.

sage flicker
#

Yeah no problem. Another thing. Since we're now moving to completely async handling (confirm on frontend, wait for webhook), is there a good way to provide an email that does not trigger the receipt email from Stripe?

#

Need to send an actual receipt for the product to the customer, but with this approach and in this case, we don't have any endpoints for data collection

#

Its like a single page with "prepay for your reservation" where the amount, product etc. is already set up

#

I can of course just make an endpoint for it, but would be nice to just do it all in one go

deft tree
#

metadata is what comes to mind
https://docs.stripe.com/metadata
though it feels a little odd to store an email address there. Are you creating and using Customer objects as part of your flow?

Learn how to use metadata to save additional information.

deft tree
#

I think metadata is the best fit then.

sage flicker
#

I can update the metadata on the client using the intent secret?

deft tree
#

I don't believe so.

sage flicker
#

Frontend collects the email

#

So I guess there's no way to do that then

#

We'll solve it with a dedicted endpoint then

#

I have some more questions though:

  1. If the payment intent is paid for after its amount was changed from another source, what happens? Does the client secret change and make it not work?
#
  1. How do we return the payment intent to "requires_payment_method" without actually giving it a payment method? but without canceling the intent
#

2 being if the webhook comes in and the amount was wrong because of 1. above

#

Webhook does capture, so it would just not capture it if the amount was wrong

deft tree
deft tree
sage flicker
sage flicker
deft tree
#

Hard to say without more context about how you built your integration. A deferred intents flow will throw an error at confirmation, I believe, due to the amount mismatch.

sage flicker
#

So I basically will never have to worry about the amount on a requires_capture intent being wrong, because it won't be possible to confirm it with the wrong amount?

deft tree
#

Depends on your flow, try it out

sage flicker
#

Assuming you update the amount from a different source; if the modification goes through, the payment cannot be confirmed later with the wrong amount.

#

I guess I'll try

deft tree
#

If you're using an intent-first flow, I don't think that same protection is in place, because the intent is the source of truth.

sage flicker
#

They're all looking at the intent

#

I shall confirm

deft tree
#

Yeah, I think that will let the payment be confirmed offhand.

sage flicker
#

but let's see

#

Possibly when trying to do the capture

wispy tangleBOT