#SAjomi
1 messages · Page 1 of 1 (latest)
Hello 👋
We have a guide here
https://stripe.com/docs/payments/accept-a-payment
Have you looked at it already?
the problem is im working in angular and i dont do it in sessions thats why i want use the link generetae from templates but just price will be given from code
Even for angular, how you create the checkout session with the prices doesn't change.
thats why i want use the link generetae from templates but just price will be given from code
Not sure I completely follow
i mean if use this https://dashboard.stripe.com/test/payment-links for generate link is there some way to adjust price in code and this price will be shown in given checkout ?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sorry I am unclear on the flow you want to build. Can you give me an example?
im working at web app for parking reservation system if someone wants to reserve park spot he can click on reserve/pay and it will open url for checkout but i cant adjust price there (it is just for school project)
Are these prices static? Like once you create it, does it change?
the price are calculated from code mostly every checkout will have different prize based on time spent there * default price for hour given by ParkPlace the function looks like this
openStripeCheckout(totalPrice: number): void {
const PriceInStripe = Math.ceil(totalPrice * 100); // Calculate the quantity based on totalPrice
const url = `https://buy.stripe.com/test_XXXXXXXXXXX`;
const windowFeatures = 'width=800,height=600'; // Set the desired window features
window.open(url, '_blank', windowFeatures);
}
PaymentLinks are better geared towards products whose prices don't change once created
For your usecase, you'd need to create inline pricing on the fly for which you'd likely need to use Checkout Session API instead
can you maybe send me the link for some tutorial ?