Skip to main content
POST
/
v1
/
payments
Create payment
curl --request POST \
  --url https://api.quentli.com/v1/payments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": {
    "amount": 150000,
    "currency": "MXN",
    "description": "Colegiatura Enero 2025",
    "customerId": "cus_1234567890abcdefghij",
    "paymentMethodId": "pm_1234567890abcdefghij",
    "meta": null,
    "makeAttempt": true
  }
}
'
{
  "payment": {
    "id": "p_1234567890abcdefghij",
    "createdAt": "2025-01-15T18:30:00.000Z",
    "updatedAt": "2025-01-15T18:30:00.000Z",
    "amount": 150000,
    "currency": "MXN",
    "description": "Colegiatura Enero 2025",
    "type": "CARD",
    "status": "COMPLETE",
    "isCompleted": true,
    "paymentTime": "2025-01-15T18:30:00.000Z",
    "customerId": "cus_1234567890abcdefghij",
    "organizationId": "org_1234567890abcdefghij",
    "skipTaxInvoice": false,
    "paymentMethodId": "pm_1234567890abcdefghij",
    "metadata": null,
    "meta": null
  },
  "attempt": {
    "id": "pa_1234567890abcdefghij",
    "createdAt": "2025-01-15T18:30:00.000Z",
    "type": "CARD",
    "success": true,
    "scheduled": false,
    "automatic": true,
    "errorType": null
  },
  "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"
    }
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Request body for creating a direct payment.

input
object
required

Response

Payment created

Created payment with optional attempt result and customer details.

payment
object
required

A payment record for a completed or pending transaction.

attempt
object
required

The payment attempt result, if makeAttempt was true.

customer
object
required

The customer details.