Skip to main content
POST
/
payin
Criar Cobrança
curl --request POST \
  --url https://api.example.com/payin \
  --header 'Content-Type: application/json' \
  --data '
{
  "paymentMethod": "<string>",
  "amount": 123,
  "referenceId": "<string>",
  "payerIp": "<string>",
  "isPhysicalProduct": true,
  "webhookUrl": "<string>",
  "card": {
    "holderName": "<string>",
    "number": "<string>",
    "expirationMonth": "<string>",
    "expirationYear": "<string>",
    "cvv": "<string>",
    "installments": 123,
    "token": "<string>"
  },
  "customer": {
    "name": "<string>",
    "document": "<string>",
    "email": "<string>",
    "phone": "<string>",
    "address": {
      "street": "<string>",
      "number": "<string>",
      "complement": "<string>",
      "zipCode": "<string>",
      "city": "<string>",
      "state": "<string>"
    }
  },
  "items": [
    {
      "title": "<string>",
      "quantity": 123,
      "unitPrice": 123,
      "description": "<string>"
    }
  ]
}
'
Este é o endpoint principal da nossa API. Aqui você pode gerar cobranças instantâneas para seus clientes.

Body

paymentMethod
string
required
Método de pagamento. Valores aceitos: PIX, CREDIT_CARD, BOLETO.
amount
integer
required
Valor da transação em centavos. Exemplo: R$ 10,00 deve ser enviado como 1000.
referenceId
string
required
O ID do pedido no seu sistema (ex: “pedido_123”). Usaremos esse ID para comunicar atualizações via webhook.
payerIp
string
required
Endereço IP do cliente pagador (IPv4 ou IPv6).
isPhysicalProduct
boolean
required
true se houver entrega física, false para produtos digitais.
webhookUrl
string
URL onde você deseja receber as notificações de status (Webhooks).
O objeto card abaixo só é obrigatório se o paymentMethod for CREDIT_CARD.
card
object

Objeto Customer

Dados do cliente são obrigatórios para emissão de notas e análise de fraude.
customer
object
required

Objeto Items

Lista de itens que compõem o pedido.
items
array
required

Exemplos

curl --request POST \
  --url https://api.pagueoneip.com.br/payin \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: SUA_CHAVE_PUBLICA' \
  --header 'x-api-secret: SUA_CHAVE_SECRETA' \
  --data '{
  "paymentMethod": "PIX",
  "amount": 15000,
  "referenceId": "pedido_9988",
  "payerIp": "192.168.1.1",
  "isPhysicalProduct": false,
  "customer": {
    "name": "João da Silva",
    "document": "12345678909",
    "email": "[email protected]",
    "phone": "11999998888",
    "address": {
      "street": "Rua das Flores",
      "number": "123",
      "zipCode": "01001000",
      "city": "São Paulo",
      "state": "SP"
    }
  },
  "items": [
    {
      "title": "Assinatura Premium",
      "quantity": 1,
      "unitPrice": 15000
    }
  ]
}'

Respostas

{
  "id": "fc1a3b2c-...",
  "status": "PENDING",
  "amount": 15000,
  "paymentMethod": "PIX",
  "referenceId": "pedido_9988",
  "pix": {
    "qrcode": "00020126580014BR.GOV.BCB.PIX...",
    "expiration": "2024-01-01T12:30:00Z"
  }
}