#numan_webhooks
1 messages · Page 1 of 1 (latest)
👋 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/1305762200907939901
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
see this SS
What are the payment intent IDs?
And what's the PaymentIntent ID for the second payment?
this is custmer id
cus_PR7uSa3CdED3FH
he bought 3 subscriptions but he paid 5
let me share all of other fours
pi_3QFa7NGJRTFjj5zf0VPxbCrw
pi_3QFa7JGJRTFjj5zf0iYlgErI
pi_3QFa1zGJRTFjj5zf0nrZ92Cp
pi_3QFZvGGJRTFjj5zf1W0noFH0
pi_3QFZvCGJRTFjj5zf0m89HeY3
These subscriptions were created manually by your server through /v1/subscriptions API
https://dashboard.stripe.com/logs/req_AenHIqVzTBtC8p this is one of the creation request.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You should work with your engineer to troubleshoot the duplicate creation. One improvement you should consider is making requests idempotent https://docs.stripe.com/api/idempotent_requests
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok sure
can you please also guide me why I can't able to test link button
every time i am getting error when i try to pay through link and this user also pay through link
What’s the error?
just showing Something went wrong
Can you open browser console, inspect network and share with me the relevant error from stripe
sure
see this short video no api failed
https://www.loom.com/share/5ea6ed8e0469431f8b771aa5a237d934
Can you enable all traffic instead of just Fetch/XHR ?
Can you share with with. me the paymentIntent ID, and the token ID shown in the video?
{
"redacted_payment_details": {
"id": "csmrpd_test_61RTbrNRE439Bm5wf41AXNN4mVI4Y6a0",
"backup_ids": [],
"bank_account_details": null,
"billing_address": {
"administrative_area": null,
"country_code": "PK",
"dependent_locality": null,
"line_1": "424242424242",
"line_2": "424242424242",
"locality": "4242424242",
"name": "numan",
"postal_code": "57000",
"sorting_code": null
},
"billing_email_address": "helloworld@yopmail.com",
"card_details": {
"brand": "VISA",
"brand_enum": "visa",
"checks": {
"address_line1_check": "STATE_INVALID",
"address_postal_code_check": "STATE_INVALID",
"cvc_check": "STATE_INVALID"
},
"country": "COUNTRY_US",
"exp_month": 4,
"exp_year": 2025,
"funding": "CREDIT",
"last4": "4242",
"networks": [
"VISA"
],
"preferred_network": null,
"program_details": {
"background_color": null,
"card_art_network_id": null,
"card_art_url": null,
"foreground_color": null,
"height": null,
"program_name": null,
"width": null
}
},
"is_default": false,
"is_us_debit_prepaid_or_bank_payment": false,
"klarna_details": null,
"nickname": "",
"type": "CARD"
}
}
{
"id": "tok_1QKDu2GJRTFjj5zfrlFQyIpJ",
"object": "token",
"card": {
"id": "card_1QKDu2GJRTFjj5zf3s2a5np6",
"object": "card",
"address_city": "4242424242",
"address_country": "PK",
"address_line1": "424242424242",
"address_line1_check": "unchecked",
"address_line2": "424242424242",
"address_state": null,
"address_zip": "57000",
"address_zip_check": "unchecked",
"brand": "Visa",
"country": "US",
"cvc_check": "unchecked",
"dynamic_last4": null,
"exp_month": 4,
"exp_year": 2025,
"funding": "credit",
"last4": "4242",
"name": "numan",
"networks": {
"preferred": null
},
"tokenization_method": null,
"wallet": null
},
"client_ip": "39.49.149.171",
"created": 1731394122,
"livemode": false,
"type": "card",
"used": false
}
PaymentIntent Id starts with pi_ and token stats with tok_
not found payment id in these api see the response
are you using payment element?
yes
Are you passing a payment intent client secret or setupintent client secret to thsi payment element?
yes passing the key and consumer_session_client_secret
But you also need to pass a intent client secret to the payment element
Can you share with me the intent ID? be it paymentItent or setupIntent.
i am not sure where i found this but this is my code
const stripe = await loadStripe(this.publishableKey);
const elements = stripe?.elements();
const paymentRequest = stripe?.paymentRequest({
country: 'US',
currency: this.currency,
total: {
label: 'Total',
amount: this.price * 100,
},
requestPayerName: true,
requestPayerEmail: true,
});
const prButton = elements?.create('paymentRequestButton', {
paymentRequest,
} as any);
paymentRequest?.on('paymentmethod', (event) => {
const { billing_details } = event.paymentMethod;
this.addressValues = billing_details
this.tokenCreated(this.tokenCreatedButton);
});
const tokenHandler = (event: any) => {
this.tokenCreatedButton = event.token;
event.success("success")
};
const canMakePaymentResult = await paymentRequest?.canMakePayment();
if (canMakePaymentResult) {
paymentRequest?.on('token', tokenHandler);
prButton?.mount('#payment-request-button');
}
using this code i am creating these payment button and then create token and use thios token for payment
No you are not using payment element at all, you are using the legacy payment request button
so what should i need to do what is the new way to do this same thing
Your code listen to both token and paymentmethod events, and I don't see you call confirmPayment
https://docs.stripe.com/stripe-js/elements/payment-request-button I'd suggest you follow this guide for the integraiton. Alternatively you can consider migrate to express checkout element
actually i need to create the token and used this token on backend side for subscription because i have used the same flow for card element so in new way you shared is it possible same flow ?
I am not payment through confirmPayment i need token only and used this for payment through api