PayAlpha
  1. Pix In
PayAlpha
  • Intro
  • Pix In
    • Create Pix In Transaction
      POST
    • Get Pix In Transaction
      GET
  • Pix Out
    • Create Pix Out Transaction
      POST
    • Get Pix Out Transaction
      GET
  • Webhooks (Reference)
    • Pix In - Payment Confirmed (transaction.paid)
      POST
    • Pix In - Refunded (transaction.refunded)
      POST
    • Pix Out - Transfer Confirmed (transfer.paid)
      POST
    • Pix Out - Transfer Failed (transfer.failed)
      POST
  • Wallets
    • Get Wallet Balances
      GET
  1. Pix In

Create Pix In Transaction

POST
{{baseUrl}}/api/v1/transactions
Creates a Pix payment request (Pix In) for receiving funds.
Amount: All values are in cents (e.g., 1000 = R$ 10.00).
Webhooks: If postbackUrl is provided, webhook notifications will be sent to this URL. If webhookSecret is also provided, webhooks will include an HMAC-SHA256 signature in the X-Webhook-Signature header.

Request Body Fields#

FieldTypeRequiredDescription
amountintegerYesAmount in cents (min: 100)
paymentMethodstringYesFixed value: pix
customerobjectYesPayer/customer information
customer.namestringYesPayer name
customer.emailstringNoPayer email
customer.phonestringNoPhone with area code, digits only
customer.documentobjectYesDocument information
customer.document.typestringYescpf or cnpj
customer.document.numberstringYesDocument number (digits only)
itemsarrayYesList of items/products
items[].titlestringYesItem title/description
items[].unitPriceintegerYesUnit price in cents
items[].quantityintegerYesQuantity of items
items[].tangiblebooleanNoWhether physical product
postbackUrlstringNoURL for webhook notifications
webhookSecretstringNoSecret key for HMAC signature
metadataobjectNoCustom metadata for tracking

Requisição

Authorization
Envie suas requisições HTTP com um cabeçalho
Authorization
que contenha a palavra Basic seguida por um espaço e uma string codificada em base64 username:password
Exemplo:
Authorization: Basic *****************
Parâmetros Header

Parâmetros Bodyapplication/json

Examples

Respostas

🟢201
application/json
Body

🟠400
🟠401
🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '{{baseUrl}}/api/v1/transactions' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "amount": 10000,
  "paymentMethod": "pix",
  "externalRef": "ORD-123",
  "customer": {
    "name": "John Smith",
    "email": "john@email.com",
    "phone": "11999999999",
    "document": {
      "type": "cpf",
      "number": "12345678910"
    }
  },
  "items": [
    {
      "title": "Pro Subscription",
      "unitPrice": 10000,
      "quantity": 1,
      "tangible": false
    }
  ],
  "postbackUrl": "https://webhook.example.com/postback",
  "webhookSecret": "your-secret-key-for-hmac",
  "metadata": {
    "orderId": "ORD-123"
  }
}'
Response Response Example
201 - 201 - Pix In Created
{
  "id": "bc06ccc9-c64f-4dc5-b54e-baabf08fbb1b",
  "amount": 500,
  "refundedAmount": 0,
  "companyId": "4d1a3c25-2cfc-4f72-b814-23d9fd168c8e",
  "paymentMethod": "pix",
  "status": "pending",
  "externalRef": "ORD-123",
  "postbackUrl": "https://webhook.example.com/postback",
  "metadata": {
    "item1": "item1",
    "item2": "item2"
  },
  "traceable": false,
  "secureId": "bc06ccc9-c64f-4dc5-b54e-baabf08fbb1b",
  "secureUrl": "https://pay.example.com/pay/bc06ccc9-c64f-4dc5-b54e-baabf08fbb1b",
  "createdAt": "2025-12-12T02:05:53.724Z",
  "updatedAt": "2025-12-12T02:05:53.724Z",
  "paidAt": null,
  "ip": "::1",
  "customer": {
    "id": "e00d270d-84de-4b94-8d1b-3bb26921e04f",
    "name": "John Smith",
    "email": "john@email.com",
    "phone": "11999999999",
    "createdAt": "2025-12-02T19:12:51.628Z",
    "document": {
      "number": "12345678910",
      "type": "cpf"
    }
  },
  "card": null,
  "pix": {
    "qrcode": "00020101021226880014br.gov.bcb.pix2566qrcode.example.com/pix/a1b2c3d4-e5f6-7890-abcd-ef12345678905204000053039865802BR5918COMPANY EXAMPLE LTDA6008SaoPaulo62070503***6304ABCD",
    "expiresAt": "2025-12-14T02:05:52.012Z"
  },
  "boleto": null,
  "shipping": null,
  "refusedReason": null,
  "items": [
    {
      "externalRef": null,
      "title": "Digital Product",
      "unitPrice": 500,
      "quantity": 1,
      "tangible": false
    }
  ],
  "splits": [],
  "refunds": [],
  "delivery": null,
  "fee": {
    "fixedAmount": 50,
    "spreadPercentage": 1.5,
    "estimatedFee": 58,
    "netAmount": 442,
    "pixInFeeType": "MIXED"
  }
}
Modificado em 2025-12-29 21:39:26
Página anterior
Pix In
Próxima página
Get Pix In Transaction
Built with