Skip to main content
POST
/
open-api
/
checkout
/
order
Criar pedido
curl --request POST \
  --url https://api.mginex.com/open-api/checkout/order \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer": {
    "email": "[email protected]",
    "name": "<string>"
  },
  "items": [
    {
      "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "quantity": 2,
      "variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "paymentMethod": "PIX",
  "couponCode": "<string>"
}
'
{
  "success": true,
  "data": {
    "orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "paymentUrl": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Token de API gerado no painel da Mginex em Configurações > Open API

Body

application/json
customer
object
required
items
object[]
required
Minimum array length: 1
paymentMethod
enum<string>
required
Available options:
PIX,
CREDIT_CARD
couponCode
string | null

Response

200 - application/json

Pedido criado com sucesso

success
boolean
data
object