Skip to main content
POST
Create a payment intent

Authorizations

x-api-key
string
header
required

Body

application/json

Request body for creating a payment intent. Payment intents represent card-present payment requests that are processed by POS terminals.

amount
number<decimal>
required

The amount to charge in MXN. Must be a positive number.

Example:

350.5

currency
enum<string>
required

Currency code. Must be MXN.

Available options:
MXN
Example:

"MXN"

externalId
string
required

Your unique identifier for this payment intent. Must be unique per organization.

Example:

"order_12345_pos"

terminalCode
string

Serial number of the target POS terminal. If provided, the payment intent is routed to that specific terminal and any other pending intents for that terminal are automatically cancelled. If omitted, the payment intent is available to any terminal in your organization.

Example:

"TERMINAL-001"

redirectAppId
string

Android application id of the app the Compago POS app returns to after the payment finishes (successfully or cancelled). Overrides the integration configured locally on the terminal. If omitted, the terminal falls back to its local integration configuration. Requires the app to be installed on the terminal device.

Maximum string length: 255
Example:

"com.mycompany.pos"

Response

Payment intent created successfully

The created payment intent object

id
string<uuid>
required

Unique identifier of the payment intent

Example:

"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"

status
enum<string>
required

Initial status is always PENDING

Available options:
PENDING
amount
number<decimal>
required

The payment amount

currency
string
required
Example:

"MXN"

externalId
string
required

Your external identifier

redirectAppId
string | null

Android application id the terminal returns to after the payment finishes, if provided at creation

Example:

"com.mycompany.pos"

organizationId
string<uuid>

The organization that owns this payment intent

Example:

"11111111-2222-3333-4444-555555555555"

terminalId
string<uuid>

The terminal associated with this payment intent, if any

Example:

"66666666-7777-8888-9999-000000000000"

createdAt
string<date-time>
updatedAt
string<date-time>