Skip to main content
GET
/
v1
/
payment-sessions
/
{id}
Get payment session
curl --request GET \
  --url https://api.quentli.com/v1/payment-sessions/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "ps_1234567890abcdefghij",
  "createdAt": "2025-01-15T18:00:00.000Z",
  "updatedAt": "2025-01-15T18:00:00.000Z",
  "status": "PENDING",
  "displayMode": "CUSTOMER_PORTAL",
  "origin": "API",
  "expiresAt": null,
  "totalAmount": 150000,
  "currency": "MXN",
  "returnUrl": null,
  "cancelUrl": null,
  "organizationId": "org_1234567890abcdefghij",
  "items": [
    {
      "description": "Colegiatura Enero 2025",
      "amount": 150000,
      "quantity": 1,
      "currency": "MXN"
    }
  ],
  "customer": {
    "id": "cus_1234567890abcdefghij",
    "createdAt": "2025-01-10T12:00:00.000Z",
    "updatedAt": "2025-01-10T12:00:00.000Z",
    "name": "Juan Pérez",
    "username": "juan_perez_01",
    "organizationId": "org_1234567890abcdefghij",
    "acceptedServiceAgreement": true,
    "skipTaxInvoice": false,
    "emailVerified": false,
    "phoneNumberVerified": true,
    "hasChangedPassword": true,
    "email": "juan@example.com",
    "phoneNumber": "+525512345678",
    "secondaryPhoneNumber": null,
    "archivedAt": null,
    "archivedById": "u_1234567890abcdefghij",
    "signatureAcceptedAt": "2025-01-10T12:00:00.000Z",
    "optedOutWhatsappAt": null,
    "optedInWhatsappAt": "2025-01-05T10:00:00.000Z",
    "startedWhatsappAt": "2025-01-05T09:55:00.000Z",
    "replyWithAssistant": false,
    "metadata": [
      {
        "key": "studentId",
        "value": "A-1029"
      }
    ],
    "meta": {
      "studentId": "A-1029"
    }
  },
  "metadata": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Organization API key using Authorization: Bearer sk_....

Path Parameters

id
string
required

Identifier of the payment session.

Response

object | null

Payment session details

Payment session details. Returns null if not found.

id
string
required

Unique identifier of the payment session.

Example:

"ps_1234567890abcdefghij"

createdAt
string<date-time>
required

When the session was created.

Example:

"2025-01-15T18:00:00.000Z"

updatedAt
string<date-time>
required

When the session was last updated.

Example:

"2025-01-15T18:00:00.000Z"

status
enum<string>
required

Current session status.

Available options:
PENDING,
FINALIZED,
CANCELED,
EXPIRED
Example:

"PENDING"

displayMode
enum<string>
required

How the payment UI is presented.

Available options:
CUSTOMER_PORTAL,
CUSTOM,
EMBEDDED
Example:

"CUSTOMER_PORTAL"

origin
enum<string>
required

How the session was created.

Available options:
API,
INVOICE,
LISTING
Example:

"API"

expiresAt
required

Optional expiration date of the session.

Example:

null

totalAmount
number
required

Total amount in minor currency units.

Example:

150000

currency
string
required

ISO 4217 currency code.

Example:

"MXN"

returnUrl
string | null
required

URL to redirect to after successful payment.

Example:

null

cancelUrl
string | null
required

URL to redirect to if the payer cancels.

Example:

null

organizationId
string
required

Identifier of the owning organization.

Example:

"org_1234567890abcdefghij"

items
object[]
required

Line items in the session.

customer
object
required

Customer associated with the session, if any.

metadata
object[] | null
required

Session-level metadata entries.