Saltar al contenido principal
POST
/
transactions
Criar transação
curl --request POST \
  --url https://api.sandbox.z2pay.com/transactions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "referenceCode": "<string>",
  "items": [
    {
      "description": "<string>",
      "quantity": 2,
      "amount": 2,
      "code": "<string>",
      "type": "<string>",
      "imageUrl": "<string>"
    }
  ],
  "customerId": "<string>",
  "currency": "<string>",
  "payments": [
    {
      "amount": 2,
      "installments": 1,
      "additionalInfo": {},
      "creditCard": {
        "id": "<string>",
        "token": "<string>",
        "statementDescriptor": "<string>",
        "billingAddress": {
          "street": "<string>",
          "number": "<string>",
          "complement": "<string>",
          "neighborhood": "<string>",
          "city": "<string>",
          "state": "<string>",
          "country": "<string>",
          "zipCode": "<string>"
        }
      },
      "boleto": {
        "expirationDate": "2023-11-07T05:31:56Z",
        "instructions": "<string>"
      },
      "pix": {
        "expirationDate": "2023-11-07T05:31:56Z"
      },
      "splitId": "<string>",
      "split": [
        {
          "recipientId": "<string>",
          "value": 1.01,
          "type": "sale",
          "processingFee": true,
          "liable": true
        }
      ]
    }
  ],
  "redirectUrl": "<string>",
  "postbackUrl": "<string>",
  "ip": "<string>",
  "additionalInfo": {},
  "maxInstallments": 2,
  "routerConfigId": "<string>"
}
'

Autorizaciones

x-api-key
string
header
requerido

API Key da Credential (gerada no Backoffice)

Encabezados

Idempotency-Key
string

Chave única para garantir idempotência da requisição (TTL 7 dias)

Cuerpo

application/json
referenceCode
string
requerido
Required string length: 1 - 255
items
object[]
requerido
customerId
string | null
customer
object
currency
string
payments
object[]
redirectUrl
string<uri>
postbackUrl
string<uri>
ip
string | null
additionalInfo
object
maxInstallments
integer
Rango requerido: x >= 1
routerConfigId
string | null

Respuesta

Transação criada