After Stripe redirects the user back to your success page, call this endpoint with theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ALEJ4NDRO2025/urban-store/llms.txt
Use this file to discover all available pages before exploring further.
order_id and the payment_intent_id extracted from the URL parameters. The server retrieves the PaymentIntent directly from Stripe to verify its status — if it is succeeded, the order is marked paid, paid_at is recorded, and expires_at is cleared. No reliance on webhooks is required for this flow.
Endpoint
Authentication
Bearer token required. Returns401 if the token is missing or invalid.
Request Body
MongoDB ObjectId of the order being paid. The order must belong to the authenticated user.
Stripe PaymentIntent ID, beginning with
pi_. This value is available as the payment_intent query parameter in Stripe’s redirect URL after a successful checkout.Behavior
- Both
order_idandpayment_intent_idare required; a400is returned if either is missing. - The order is fetched and verified to belong to the authenticated user (
404if not found). stripe.PaymentIntent.retrieve(payment_intent_id)is called. AStripeErrorreturns400.- If
intent.status == 'succeeded':order.status→"paid"order.paid_at→ current UTC timeorder.expires_at→None- Order is saved.
- Any other Stripe status returns
400with the raw status string.
Typical frontend flow: Stripe redirects to
https://yourstore.co/order/success?payment_intent=pi_...&order_id=.... On that page, read both parameters from the URL and POST them to this endpoint before showing the confirmation UI.Request Example
Response — 200 OK (payment succeeded)
Always
"paid" when the payment was successfully confirmed.Human-readable confirmation message:
"Pago confirmado".Response — 400 (payment not completed)
When Stripe’sPaymentIntent status is anything other than succeeded, the server returns 400 with the raw Stripe status:
Error Responses
| Status | Condition |
|---|---|
401 Unauthorized | Token missing, malformed, or expired |
400 Bad Request | order_id or payment_intent_id not provided |
400 Bad Request | Stripe returned a non-succeeded status |
400 Bad Request | Stripe API returned a StripeError |
404 Not Found | Order not found or does not belong to authenticated user |