Skip to main content
GET
/
api
/
products
/
payments
/
:orderId
curl -X GET https://juadah-backend.vercel.app/api/products/payments/66e4fa55-fdac-4ef9-91b5-733b97d1b862 \
  -H "Cookie: accessToken=your_access_token"
{
  "status": "success",
  "data": {
    "order_id": "66e4fa55-fdac-4ef9-91b5-733b97d1b862",
    "transaction_id": "d4e86f7c-3e4d-4f5e-8c3b-9a2b1c0d8e7f",
    "transaction_status": "settlement",
    "product_id": 1,
    "product_name": "Kue Bolu",
    "total_price": "50000",
    "completed_at": 1709456789000,
    "created_at": 1709456123000
  }
}

Overview

This endpoint allows you to check the status of a payment order using its order ID. It returns comprehensive information about the order including transaction status, product details, and timestamps.

Authentication

This endpoint requires authentication via cookie-based access token.

Path Parameters

orderId
string
required
The unique order ID (UUID format) returned when the order was created

Response

status
string
Response status, always “success” for successful requests
data
object
Order status details
curl -X GET https://juadah-backend.vercel.app/api/products/payments/66e4fa55-fdac-4ef9-91b5-733b97d1b862 \
  -H "Cookie: accessToken=your_access_token"
{
  "status": "success",
  "data": {
    "order_id": "66e4fa55-fdac-4ef9-91b5-733b97d1b862",
    "transaction_id": "d4e86f7c-3e4d-4f5e-8c3b-9a2b1c0d8e7f",
    "transaction_status": "settlement",
    "product_id": 1,
    "product_name": "Kue Bolu",
    "total_price": "50000",
    "completed_at": 1709456789000,
    "created_at": 1709456123000
  }
}

Notes

  • The order_id must be a valid UUID that was returned from the “Request Order Token” endpoint
  • The completed_at field is only populated when transaction_status is settlement or capture
  • Timestamps are in milliseconds since Unix epoch
  • The total_price is returned as a string to preserve decimal precision
  • This endpoint can be polled to check for payment completion after redirecting the customer to Midtrans