Skip to main content
Use this endpoint to create a new payment order in CertoPay. An order represents the commercial intent to charge a specific amount to a registered customer, and must be created before any payment method (Pix, boleto, or credit card) can be applied. You must supply a valid customerId obtained from POST /api/customers, along with the charge amount expressed in centavos (the smallest Brazilian currency unit). The returned order id becomes the orderId you will reference when processing the actual payment.

Request

X-Api-Key
string
required
Your CertoPay secret API key. Include it in every request as X-Api-Key: sk_live_sua_chave_aqui.
customerId
string
required
The UUID of the customer being charged. This is the id returned by POST /api/customers. The customer must already exist in your account.
amount
integer
required
Total charge amount in centavos (Brazilian cents). For example, 29700 represents R$ 297,00. Must be a positive integer greater than zero.

Response

A successful request returns HTTP 201 Created with the newly created order object.
id
string
Unique UUID assigned to this order. Save this value — it is required as orderId in all downstream payment requests.
customerId
string
UUID of the customer linked to this order, echoed from the request.
amount
integer
Charge amount in centavos, echoed from the request.
status
string
Current status of the order. Newly created orders always start as "PENDING". Other possible values as the order progresses: "PAID", "CANCELLED", "EXPIRED".
createdAt
string
ISO 8601 timestamp recording when the order was created (e.g. "2026-06-26T10:00:00Z").
Save the id returned in this response — it becomes the orderId required in all subsequent payment requests (Pix, boleto, and credit card). Without it you cannot charge the customer.

Example

curl -X POST https://v2.certopaybrasil.com/api/orders \
  -H "X-Api-Key: sk_live_sua_chave_aqui" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "uuid-do-customer",
    "amount": 29700
  }'
201 Created
{
  "id": "uuid-do-pedido",
  "customerId": "uuid-do-customer",
  "amount": 29700,
  "status": "PENDING",
  "createdAt": "2026-06-26T10:00:00Z"
}