curl -X GET https://api.vaniykempire.com/api/payments/status/pi_3MtwBwLkdIwHu7ix28a3tqPa \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
{
"purchase": {
"_id": "65f1a2b3c4d5e6f7g8h9i0j1",
"user": "507f1f77bcf86cd799439011",
"content": {
"_id": "507f191e810c19729de860ea",
"title": "Advanced React Patterns",
"description": "Learn advanced React patterns and best practices",
"type": "course",
"thumbnailUrl": "https://cdn.vaniykempire.com/thumbnails/react-course.jpg"
},
"amount": 29.99,
"stripePaymentIntentId": "pi_3MtwBwLkdIwHu7ix28a3tqPa",
"status": "completed",
"purchasedAt": "2024-03-15T10:30:00.000Z"
}
}
Retrieve the status and details of a payment by Stripe payment intent ID
curl -X GET https://api.vaniykempire.com/api/payments/status/pi_3MtwBwLkdIwHu7ix28a3tqPa \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
{
"purchase": {
"_id": "65f1a2b3c4d5e6f7g8h9i0j1",
"user": "507f1f77bcf86cd799439011",
"content": {
"_id": "507f191e810c19729de860ea",
"title": "Advanced React Patterns",
"description": "Learn advanced React patterns and best practices",
"type": "course",
"thumbnailUrl": "https://cdn.vaniykempire.com/thumbnails/react-course.jpg"
},
"amount": 29.99,
"stripePaymentIntentId": "pi_3MtwBwLkdIwHu7ix28a3tqPa",
"status": "completed",
"purchasedAt": "2024-03-15T10:30:00.000Z"
}
}
Retrieves the purchase record and status for a specific Stripe payment intent. This endpoint is used to check whether a payment has been completed, is still pending, has failed, or has been refunded.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/PhemiT/vaniykeempire-api/llms.txt
Use this file to discover all available pages before exploring further.
pi_). This is returned when creating a payment intent or can be obtained from Stripe webhooks.Show purchase properties
pending, completed, failed, or refunded| Status | Description |
|---|---|
pending | Payment intent created, waiting for payment completion |
completed | Payment successfully processed by Stripe |
failed | Payment failed (card declined, insufficient funds, etc.) |
refunded | Payment was refunded by an administrator |
curl -X GET https://api.vaniykempire.com/api/payments/status/pi_3MtwBwLkdIwHu7ix28a3tqPa \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
{
"purchase": {
"_id": "65f1a2b3c4d5e6f7g8h9i0j1",
"user": "507f1f77bcf86cd799439011",
"content": {
"_id": "507f191e810c19729de860ea",
"title": "Advanced React Patterns",
"description": "Learn advanced React patterns and best practices",
"type": "course",
"thumbnailUrl": "https://cdn.vaniykempire.com/thumbnails/react-course.jpg"
},
"amount": 29.99,
"stripePaymentIntentId": "pi_3MtwBwLkdIwHu7ix28a3tqPa",
"status": "completed",
"purchasedAt": "2024-03-15T10:30:00.000Z"
}
}
| Status Code | Description |
|---|---|
| 200 | Payment status retrieved successfully |
| 401 | Not authenticated |
| 404 | Payment intent not found or doesn’t belong to user |
| 500 | Server error |
paymentIntentId and authenticated userIdtitle, description, type, and thumbnailUrl fieldssrc/controllers/paymentController.js:133-151