import { createReceiptStatusResponse } from '../../_lib/receipt-status';
import { requireV3X402Release } from '../../_lib/release';

export async function GET(
  _request: Request,
  context: { params: Promise<{ requestId: string }> | { requestId: string } },
): Promise<Response> {
  const closed = requireV3X402Release();
  if (closed) return closed;
  const { requestId } = await context.params;
  return createReceiptStatusResponse(requestId);
}
