#nielsen_paymentlink-customdomain

1 messages ยท Page 1 of 1 (latest)

modern gullBOT
#

๐Ÿ‘‹ 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/1438931056614179018

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

limber surge
#

Hi, can you share the request you're making? When you say 'it does not work', what does this mean exactly? Can you share more please?

modern gullBOT
steady solstice
#

so we created a custom domain in the Stripe Dashboard so that, when payment links are created, they are created with that custom domain. If i generate a payment link from the Stripe Dashboard it does indeed use the custom domain. But when generating payment links using the Java SDK, it uses buy.stripe.com

#

// 1. Create a Price with custom_unit_amount enabled
PriceCreateParams priceParams = PriceCreateParams.builder()
.setCurrency("usd")
.setProductData(
PriceCreateParams.ProductData.builder()
.setName("Min Balance")
.build()
)
.setUnitAmount(0L)
.build();

        Price price = Price.create(priceParams);

        // 2. Create a Payment Link with the custom price
        PaymentLinkCreateParams linkParams = PaymentLinkCreateParams.builder()
                .addLineItem(
                        PaymentLinkCreateParams.LineItem.builder()
                                .setPrice(price.getId())
                                .setQuantity(1L)
                                .build()
                )
                .setSubmitType(PaymentLinkCreateParams.SubmitType.PAY)
                .setOnBehalfOf("acct_1Pj61wIGqClPX8Ho")
                .setTransferData(PaymentLinkCreateParams.TransferData.builder()
                        .setDestination("acct_1Pj61wIGqClPX8Ho")
                        .build())
                .addPaymentMethodType(PaymentLinkCreateParams.PaymentMethodType.US_BANK_ACCOUNT)
                .addPaymentMethodType(PaymentLinkCreateParams.PaymentMethodType.CARD)
                .setPaymentIntentData(PaymentLinkCreateParams.PaymentIntentData.builder()
                        .putMetadata("payorId", "123")
                        .build())
                .putMetadata("yay", "yay")

                .build();

        PaymentLink paymentLink = PaymentLink.create(linkParams);
        System.out.println("Payment link created successfully!");

        System.out.println(paymentLink);
        System.out.println("URL: " + paymentLink.getUrl());
limber surge
#

Can you share the example request to create the payment link where you expect the custom domain please?

steady solstice
#

req_ZGQRGHYHucwspj

limber surge
#

Can you share the request that you made via the Dashboard?

#

If you omit the on_behalf_of: "acct_1Pj61wIGqClPX8Ho", does it work as expected?

steady solstice
#

req_VVXrL5KYutD1oS

#

Removing the onbehalfof does give me the right custome domain

#

does that mean we have to configure a custome domain for each connected account?

steady solstice
#

Ok I see, I will do that then. Last question, when creating payment link, do we have the option to show the email that is in Stripe for a specific Customer?

forest tulip
#

๐Ÿ‘‹ Hi, pgskc has to head out so i'll be taking over the thread ๐Ÿ™‚

#

You can append this to the end of the payment link and the customer email field will be prefilled
This example is for customer@example.com %40 is the url-encoded of the @ symbol
?prefilled_email=customer%40example.com

#

If you want the pre-filled email to be non-editable
?locked_prefilled_email=customer%40example.com

steady solstice
#

Is that email supposed to be associated with the payment method? or can it be any email?

forest tulip
#

Payment Methods don't have email address associated to them directly generally.

#

A Customer object will have an associated email address, and that customer may have Payment Methods attached, but there is no email address assocaited to the Payment Method directly.

steady solstice
#

What does this email address field accomplish then?

forest tulip
#

What customer the transaction is associated with.

steady solstice
#

Will it create a new customer with that email address? or will it attempt to find one? I think some of our customers don't have email addresses.

forest tulip
steady solstice
#

Ok, we for sure dont' want to create one.

#

a new customer that is.

forest tulip
#

Email address is required though.

steady solstice
#

Ok, so when the email is supplied, if it doesn't find a customer associated with that email what will it do?

#

or if it finds multiple customers with the same email?

forest tulip
#

if you for example specify if_required and it's a situation that doesn't require a customer to be created (one time payment for example) it will use a guest customer object

steady solstice
#

Right now I'm not specifying any of the options. I don't see in the docs what i the default behaviour

forest tulip
#

'if_required' is the default

#

with always being the alternative.

steady solstice
#

Ok got it. That's the behaviour we want. It was requested of me to show the email of the customer, however I wasn't sure what that would actually do. So in our case, since we have "if required" on by default, putting the customer's email there wouldn't really do anything?

forest tulip
#

It will make a guest customer object with that email associated so you can identify who the payment came from, that guest customer however doesn't keep any payment method information stored on it. It's essentially just a way to track the transaction.

steady solstice
#

Ok and one hopefully last thing. I'm trying to use test mode for the links, is it possible to do this with connected accounts and custom domains? The connected account in our production environment doesn't exist in test mode.

forest tulip
#

I'd suggest onboarding a test connected account to your test platform.

#

I believe technically you can onboard, a live account to your test account, but it's very much not recommended, lots of issues with this. it won't show up in your list of connected accounts, on the test mode dashboard for example.

#

and an account connected already to you live mode won't have any connection to your account in test mode by default

steady solstice
#

We do have test accounts we can use and when I tried to use the custome domain it says it's already being used

forest tulip
#

Where are you seeing this? Where are you trying to set the custom domain?

steady solstice
#

So in test mode, I tried to add the same custom domain as in production mode.

#

I guess we should have a separate domain for test mode?

forest tulip
#

I believe your test mode and live mode share the same custom domains.

#

at least when I toggle out of test mode and back to live mode I see the same exact domains registered on my account.

#

Just to back up, you are trying to setup these domains on the connected accounts correct?

#

not the platform?

#

based on your original question.

steady solstice
#

Yes, connected accounts

#

It seems to work for the platfom account like you said. Prod and test mode use the same custome domain there

forest tulip
#

how are you setting the domain on the CA?

steady solstice
#

I go to view dashboard as this account

#

from there I go to Business and Custom Domains

forest tulip
#

do you have the account id for the CA you are trying to set it on?

steady solstice
#

the test one right?

forest tulip
#

yes,

steady solstice
#

acct_1PgvZNRPHgC7qKjm

modern gullBOT
kindred cloud
#

nielsen_paymentlink-customdomain

#

Do you have an example PaymentLink I can look at instead?

steady solstice
#

well right now, we don't have a custom domain setup for a connected account in test mode. I want to use the same custome domain I have in a prod connected account with a test mode connected account

kindred cloud
#

hum

#

My gut: we don't want any Connect platforms to do this by hand and it's just "luck" it works

What are you really trying to build? Are you using Standard accounts? If so they should configure the domain, not you

steady solstice
#

I believe we have custom

#

they don't configure Stripe themselvves.

kindred cloud
#

amazing

#

So if you are a Connect platform with Custom accounts you absolutely should not do any of this on connected accounts at all.
Everything should be done on your own platform account instead

steady solstice
#

It seems to do that on it's own once we include the onbehalfOf parameter

#

that seems to be the way we need to do it so that the branding for the payment link is included

#

per each connect account

kindred cloud
#

Hmmmm i see so you are doing everything on the platform but you are saying that you still seem to have to configure the domain at each individual connected account level for the custom domain to work? But you want the same domain for all connected accounts?

steady solstice
#

yes

#

no each connect account should have it's own domain. We originally thought we should use one custom domain for the platform account. And have CNAME records for each connect account on our side

#

But that didn't work once we saw that creating payment links using onbehalfof, forces the connect accounts domain

kindred cloud
#

(sorry misread what you said)

#

I'm super lost, sorry

steady solstice
#

no worries

kindred cloud
#

Do you want the exact same domain
or do you want a different domain?

steady solstice
#

we for sure want different domains for each connect account.

kindred cloud
#

I'm fairly confident this makes no sense feature wise for Connect + Custom. Like what if you have 10k connected accounts. Managing this by hand in the Dashboard just feels ridiculously painful to me

#

But yeah I don't have the answer for this since it's mostly a Dashboard question. I recommend moving to our support team for 1:1 support directly and guidance on how to handle this.

steady solstice
#

Ok, so you think it's better to have the one custom domain in the platform account. And then we use CNAME records to put to the custome domain?

kindred cloud
#

Not really. Basically we (Stripe) decided to use the connected account's domain with OBO. But that makes absolutely no sense (well to me at least) since there's no API for it.

#

I assume you are using Custom accounts on purpose/by design? Because conceptually Standard accounts + letting each individual business decide to configure this and pay for it or not would make more sense

steady solstice
#

Ok and to confirm, using the onBehalfOf parameter when creating payment links, and having that payment link page use the connect account's branding and custom domain (or default) is expected behavior?

kindred cloud
#

So I think you're doing exactly what is expected. It just wasn't expected by me and makes limited sense to me ๐Ÿ˜“

steady solstice
#

Ok I understand. That helps at least to know. Now I can see how we should handle it

kindred cloud
#

I just don't see a world where we'll add an API for this anytime soon though.

So let's go back to your real ask: it worked fine for you in Live mode but you had a problem in Test mode?

steady solstice
#

Yea I was just hoping to do testing in our staging environments. Where we create payment links and see the custom domain there. But it won't let us use the same custom domain from the live connect account in a separate test connect account

kindred cloud
#

But it won't let us use the same custom domain from the live connect account in a separate test connect account
that's the part I'm hung up on.

#

Do you have an example connected account where you configured a custom domain and it works in Live mode already?

steady solstice
#

Yes, it's still in the process of adding the domain but it's this one.acct_1Phv8kIx7St4tW9N

kindred cloud
#

okay but then it doesn't work yet right? Like if you create a PaymentLink in Live mode for them does it use that domain already?

steady solstice
#

Not yet it seems. I tried creating a link using the test mode API key and I still the see the default. plink_1STS6VIv5qZ8Xj8Ox05ZysjG

#

somehow that doesn't throw an error because that account doesn't exist in test mode

kindred cloud
#

yeah that's normal, you have access to Live and Test mode for all your connected accounts

steady solstice
#

How come it doesn't actually show up in the connected accounts list in test mode?

kindred cloud
#

for reasons I won't get into :p

#

My "gut" is that once the domain is approved in Live mode for that connected account, it will work just fine in Test mode too. But it has to be approved first so you have to wait for that step to complete

steady solstice
#

Ok, I can wait and see, if it doesn't work should contact devs here? or is this something that would need to go through support like you mentioned earlier?

kindred cloud
#

Coming back here is fine I think though most of us don't know much about Dashboard flows. But it "should work" so yeah come back if you have a clear example where for the same connected account your PaymentLink in Live mode works with the custom domain and the Test mode one doesn't (and share exact PaymentLink ids plink_123)

steady solstice
#

Ok will do. Thank you

kindred cloud
#

sure, sorry for the long back and forth but hopefully it just works in a few days ๐Ÿ™‚
I'll keep pushing internally on a better solution for Connect platforms but that's likely years away for an API for custom domains sadly (because of the CNAME and all the config, it's not an easy stateful API)
Have a great day