POST
/
v1
/
sessions
curl --request POST \
  --url https://api.malga.io/v1/sessions \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --header 'X-Client-Id: <api-key>' \
  --data '{
  "amount": 100,
  "name": "Loja 1",
  "merchantId": "1b0c6960-702a-4074-95c2-eed2790c16a1",
  "dueDate": "2022-10-25T09:28:45.000Z",
  "createLink": true,
  "paymentMethods": [
    {
      "paymentType": "pix",
      "expiresIn": 30
    }
  ],
  "items": [
    {
      "name": "Item 1",
      "description": "Item do carrinho",
      "unitPrice": 1000,
      "quantity": 1,
      "tangible": false
    }
  ]
}'
{
  "id": "1b0c6960-702a-4074-95c2-eed2790c16a1",
  "name": "Nome da sessão",
  "status": "created",
  "isActive": true,
  "clientId": "1b0c6960-702a-4074-95c2-eed2790c16a1",
  "orderId": null,
  "amount": 100,
  "currency": "BRL",
  "capture": true,
  "merchantId": "69aea152-ba70-49a3-a31c-044ac1651146",
  "dueDate": "2022-10-25T09:28:45.000Z",
  "description": "Promoção Black Friday",
  "statementDescriptor": "LOJA JOAO",
  "paymentMethods": [
    {
      "paymentType": "credit",
      "installments": 1
    }
  ],
  "items": [
    {
      "id": "78601913-a176-4d71-b7e8-abb6fc49a340",
      "name": "Item 1",
      "description": "Descrição do item",
      "unitPrice": 10000,
      "quantity": 1,
      "tangible": false
    }
  ],
  "createdAt": "2022-10-25T09:28:45.000Z",
  "updatedAt": "2022-10-25T09:28:45.000Z",
  "publicKey": "1b0c6960-702a-4074-95c2-eed2790c16a1"
}

Authorizations

X-Client-Id
string
header
required
X-Api-Key
string
header
required

Body

application/json

Response

201 - application/json
Created

The response is of type object.