#piyush1996
1 messages · Page 1 of 1 (latest)
Hi @lavish oasis Could you please help me to achieve link design like above attached screenshot ?
how can I include it in payment element?
did you read the doc I shared?
Yes I checked
What exactly do I need to include in code to enable the link payment ?
This section in the doc literally outlines that
https://stripe.com/docs/payments/link/payment-element-link#integration-options
Could you please check here and help mw what I am doing wrong ?
Tracelo let's you get a mobile phone's geo location and works on all phone types, networks and countries.
Just check the iframe so you will get idea
hello @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?
are you seeing any errors in your console?
The docs i linked earlier are the only ones you need to enable link. Have you registered your domain?
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#enable-checkout-link
Let me double check with a colleague
Can we hop on call? It will be easy to explain you the issue
We don't do calls.
Based on this section in the doc, all you need is allow customers to enter email (collect email with Payment Element flow)
https://stripe.com/docs/payments/link/add-link-elements-integration?link-integration-type=collect-email#design-your-integration
you don't need Link Authentication Element for this
can you share the code you're using for this?
can you remove
<div id="link-authentication-element"></div>
I still see the email field. Are you sure you removed the link authentication element?
Wait....build is running
is the payment intent related to a subscription?
Yes
do you have link enabled under
https://dashboard.stripe.com/settings/billing/invoice?
No, I just have enabled it
Still I am not getting option for Link
How can I add it https://dashboard.stripe.com/settings/billing/invoice in test mode ?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
if you add it to live mode, it should work for test mode too
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
you said the payment intent is from a Subscription but you're creating the payment intent by calling the API directly
I have subscription on website not using the different payment Intents for it
this is basically missing in my website
can you share an example PaymentIntent ID that you're using with Elements?
pi_xxx?
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
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
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
What should I tell them ?
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
Sure