#piyush1996

1 messages · Page 1 of 1 (latest)

wanton saddleBOT
lavish cape
#

Hi @lavish oasis Could you please help me to achieve link design like above attached screenshot ?

lavish cape
#

how can I include it in payment element?

lavish oasis
#

did you read the doc I shared?

lavish cape
#

Yes I checked

#

What exactly do I need to include in code to enable the link payment ?

lavish cape
#

Do we have any example to add the same way ?

#

I am looking for any axample code

lavish cape
#

Could you please check here and help mw what I am doing wrong ?

#

Just check the iframe so you will get idea

#

hello @lavish oasis

lavish oasis
#

I can't just look at the page and tell whats wrong, that's not how things work.

Have you followed the docs I linked above step by step?
Are you seeing any errors?

lavish cape
#

Yes, I followed the steps

#

This is what I am getting in payment link

lavish oasis
#

are you seeing any errors in your console?

lavish cape
#

Nope

#

I am looking for this design for link

#

Rest I will handle it from my side

lavish oasis
lavish cape
#

Yes it is registered

lavish oasis
#

Let me double check with a colleague

lavish cape
#

Can we hop on call? It will be easy to explain you the issue

lavish oasis
#

you don't need Link Authentication Element for this

wanton saddleBOT
lavish cape
#

Still not able to find solution

#

I am already following docs steps

lavish oasis
#

can you share the code you're using for this?

lavish cape
#

this is the code in React

lavish oasis
#

can you remove

<div id="link-authentication-element"></div>

lavish cape
#

Yes sure

#

Anything else sir?

lavish oasis
#

I still see the email field. Are you sure you removed the link authentication element?

lavish cape
#

Wait....build is running

lavish oasis
lavish cape
#

I have removed it

#

Can you please check now ?

#

@lavish oasis

lavish oasis
#

is the payment intent related to a subscription?

lavish cape
#

Yes

lavish oasis
lavish cape
#

No, I just have enabled it

#

Still I am not getting option for Link

lavish oasis
#

if you add it to live mode, it should work for test mode too

lavish cape
#

I have added it but still not getting option of link

#

@Post('/create-payment-intents', { transformRequest: true })
async PaymentIntents(
@Res() res: IExtendedResponse,
@Body() body: PaymentIntentsPayload,
) {
try{
const { currency, customer, paymentMethodType, amount } = body;
const paymentInfo = await this._stripeApi.PaymentIntents({
customer,
currency,
amount,
automatic_payment_methods: { enabled: true },
});
console.log(paymentInfo);
return res.success({ data: paymentInfo, code: "PATMENT_INTEND_CREATED" });
} catch (error) {
throw error;
}
}

#

this is create-payment-intents code

lavish oasis
#

you said the payment intent is from a Subscription but you're creating the payment intent by calling the API directly

lavish cape
#

I have subscription on website not using the different payment Intents for it

#

this is basically missing in my website

lavish oasis
#

can you share an example PaymentIntent ID that you're using with Elements?
pi_xxx?

lavish cape
#

Sure

#

pi_3O7ftBLFvpGNSJY70IHl2M6r

#

{
"id": "pi_3O7ftBLFvpGNSJY70IHl2M6r",
"object": "payment_intent",
"amount": 100,
"amount_capturable": 0,
"amount_details": {
"tip": {}
},
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": {
"allow_redirects": "always",
"enabled": true
},
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3O7ftBLFvpGNSJY70IHl2M6r_secret_SOS42rnSAQZ7ACRYqnW8ZgREh",
"confirmation_method": "automatic",
"created": 1698850765,
"currency": "cad",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": null,
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_configuration_details": {
"id": "pmc_1NKwa8LFvpGNSJY7exRbWG32",
"parent": null
},
"payment_method_options": {
"card": {
"installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
},
"link": {
"persistent_token": null
}
},
"payment_method_types": [
"card",
"link"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "requires_payment_method",
"transfer_data": null,
"transfer_group": null
}

#

Can you please check this ? @lavish oasis

lavish oasis
#

I think your code is fine

#

I think your account is missing necessary configuration for this to work, you'd need to contact our support team to have this configuration enabled

https://support.stripe.com/?contact=true

lavish cape
#

What should I tell them ?

lavish oasis
#

You can say that link in passthrough mode isn't working on payment element on your Canadian account.

If you want to just test it, you can create a test US based account and you'll see that your code works fine for that

lavish cape
#

Sure

lavish oasis
#

apologies for the delay here

#

and the confusion

lavish cape
#

It's okay

#

You helped me a lot

#

Let me take it through support chat now