Skip to main content
Retrieve the current status and details of a checkout session. Use this endpoint to verify whether a session was completed after the user is redirected back to your application. Only sessions belonging to your developer account can be accessed.
curl -X GET https://dhmad.tn/api/v1/sessions/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer sk_live_your_api_key_here"
{
  "session": {
    "sessionId": "550e8400-e29b-41d4-a716-446655440000",
    "escrowId": "507f1f77bcf86cd799439011",
    "action": "sign_contract",
    "targetUserEmail": "buyer@example.com",
    "status": "completed",
    "metadata": {
      "order_id": "ord_123"
    },
    "expiresAt": "2024-01-15T10:30:00Z",
    "completedAt": "2024-01-15T10:15:00Z",
    "createdAt": "2024-01-15T10:00:00Z"
  }
}

Path Parameters

sessionId
string
required
Session ID returned from the create checkout session endpoint

Response Fields

Error Responses

401 Unauthorized

{
  "error": "Unauthorized"
}

403 Forbidden

{
  "error": "Forbidden",
  "message": "You do not have access to this checkout session."
}

404 Not Found

{
  "error": "Checkout session not found"
}

Use this endpoint to verify session status after the user is redirected back to your application. If the redirect includes status=completed, you can call this endpoint to confirm and retrieve full session details. Treat webhooks as the source of truth for escrow state; this endpoint is for session-level verification.