> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wovepay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Criar cobrança avulsa

> Pagamento único: boleto, cartão ou PIX na Conta Padrão. Não é assinatura recorrente.

<RequestExample>
  ```bash cURL — boleto theme={null}
  curl -X POST 'https://api.wovepay.com/v1/billings/create' \
    -H 'X-API-Key: wp_live_SUA_CHAVE' \
    -H 'Content-Type: application/json' \
    -d '{
      "method": "BOLETO",
      "amount": 79.9,
      "description": "Pedido 123",
      "dueDate": "2026-08-15",
      "externalReference": "pedido-123",
      "customer": {
        "name": "Cliente Exemplo",
        "taxId": "12345678909",
        "email": "cliente@exemplo.com"
      }
    }'
  ```

  ```bash cURL — débito (fatura hospedada) theme={null}
  curl -X POST 'https://api.wovepay.com/v1/billings/create' \
    -H 'X-API-Key: wp_live_SUA_CHAVE' \
    -H 'Content-Type: application/json' \
    -d '{
      "method": "CARD_DEBIT",
      "amount": 49.9,
      "description": "Pedido 456",
      "customer": {
        "name": "Cliente Exemplo",
        "taxId": "12345678909"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "success": true,
    "message": "Cobrança criada com sucesso",
    "data": {
      "id": "clx_billing",
      "status": "PENDING",
      "statusLabel": "Pendente",
      "method": "BOLETO",
      "amount": 79.9,
      "netAmount": 76.91,
      "feeAmount": 2.99,
      "notificationFeeAmount": 0,
      "installmentCount": 1,
      "description": "Pedido 123",
      "dueAt": "2026-08-15",
      "dueDate": "2026-08-15",
      "paidAt": null,
      "estimatedCreditDate": null,
      "invoiceUrl": "https://...",
      "bankSlipUrl": "https://...",
      "digitableLine": "23790...",
      "pixCopyPaste": null,
      "pixEncodedImage": null,
      "externalId": "pay_abc123",
      "externalReference": "pedido-123",
      "accountTransactionId": "clx_ledger",
      "createdAt": "2026-05-30T10:00:00.000Z",
      "customer": {
        "id": "12345678909",
        "name": "Cliente Exemplo",
        "taxId": "12345678909"
      }
    },
    "requestId": "req_abc123"
  }
  ```
</ResponseExample>

### Corpo da requisição

<ParamField body="method" type="string" required>
  `BOLETO`, `CARD_CREDIT`, `CARD_DEBIT`, `CARD_VOUCHER` ou `PIX`.
</ParamField>

<ParamField body="amount" type="number" required>
  Valor em reais.
</ParamField>

<ParamField body="customer" type="object" required>
  Pagador: `name`, `taxId` (CPF/CNPJ), `email` e `phone` opcionais, `id` opcional (referência interna).
</ParamField>

<ParamField body="description" type="string">
  Descrição exibida ao pagador.
</ParamField>

<ParamField body="dueDate" type="string">
  YYYY-MM-DD (boleto; padrão +3 dias).
</ParamField>

<ParamField body="installmentCount" type="number">
  Parcelas 1–21 (`CARD_CREDIT`).
</ParamField>

<ParamField body="cardToken" type="string">
  Token do cartão (`CARD_CREDIT` / `CARD_VOUCHER`).
</ParamField>

<ParamField body="creditCard" type="object">
  Dados do cartão na primeira cobrança (`CARD_CREDIT` / `CARD_VOUCHER`).
</ParamField>

<ParamField body="creditCardHolderInfo" type="object">
  Titular: `name`, `email`, `cpfCnpj`, `postalCode`, `addressNumber`, `phone`.
</ParamField>

<ParamField body="remoteIp" type="string">
  IP do comprador (`CARD_CREDIT` / `CARD_VOUCHER`). Se omitido, usa o IP da requisição.
</ParamField>

<ParamField body="externalReference" type="string">
  ID do seu sistema (armazenado em `data.externalReference`).
</ParamField>

<Note>
  Pagamento **único**. Para cobrança **recorrente** use `POST /subscriptions/create`.
</Note>

### Cartão de crédito (`CARD_CREDIT`)

Primeira cobrança com `creditCard` + `creditCardHolderInfo` + `remoteIp`, ou `cardToken` em cobranças seguintes. A resposta inclui `data.creditCardToken` para reutilização. Alternativa: `POST /billings/tokenize-card`.

### Cartão de débito (`CARD_DEBIT`)

A Asaas **não** aceita captura transparente de débito. Crie a cobrança sem dados de cartão e redirecione o pagador para `data.invoiceUrl`.

<Warning>
  Enviar `creditCard`, `cardToken` ou `creditCardHolderInfo` em `CARD_DEBIT` retorna **400**.
</Warning>


## OpenAPI

````yaml POST /billings/create
openapi: 3.1.0
info:
  title: WovePay API
  description: >
    API pública merchant da WovePay. Autenticação via header `X-API-Key:
    wp_live_...`.

    Respostas de sucesso usam o envelope `{ success, message, data, requestId
    }`.

    Campos internos (`accountId`, `metadata`, histórico de entregas de webhook,
    etc.) não são expostos.

    `providerTransactionId` aparece como `referenceId`; `providerInfractionId`
    como `infractionId`.

    Rate limit global: 100 requisições por minuto por API key (HTTP 429). Sem
    chave, limite por IP.
  version: 1.0.0
servers:
  - url: https://api.wovepay.com/v1
    description: Produção
security:
  - apiKeyAuth: []
tags:
  - name: pix
    description: >-
      Cobranças PIX (receber), reembolsos de depósito recebido e transferências
      PIX (enviar). Alias legado em payouts/* para envios.
  - name: transfer-internal
    description: Transferências entre contas WovePay
  - name: transfer-scheduled
    description: Transferências programadas (agendar, repetir ou por saldo)
  - name: crypto
    description: Depósitos e transferências em criptomoeda
  - name: billings
    description: >-
      Cobranças avulsas (pagamento único) — boleto, cartão ou PIX na Conta
      Padrão (PF ou PJ)
  - name: subscriptions
    description: >-
      Assinaturas recorrentes com ciclo fixo — boleto, cartão ou PIX na Conta
      Padrão (PF ou PJ)
  - name: account
    description: Saldo e extrato
  - name: subaccount
    description: Subcontas merchant (carteiras lógicas sob a conta principal)
  - name: meds
    description: Disputas MED
  - name: webhooks
    description: Endpoints de webhook de saída
  - name: payouts
    description: Alias de transfer-pix para saques PIX
  - name: customers
    description: Clientes da loja (CRM)
  - name: products
    description: Produtos e entregas digitais
  - name: coupons
    description: Cupons de desconto para links
  - name: payment-links
    description: Links de pagamento e checkout hospedado
paths:
  /billings/create:
    post:
      tags:
        - billings
      summary: Criar cobrança avulsa
      description: >-
        Pagamento único (boleto, cartão ou PIX). Para recorrência use
        `/subscriptions/create`.
      operationId: createBilling
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBilling'
      responses:
        '200':
          $ref: '#/components/responses/SuccessEnvelope'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    CreateBilling:
      type: object
      required:
        - method
        - amount
        - customer
      properties:
        method:
          type: string
          enum:
            - BOLETO
            - CARD_CREDIT
            - CARD_DEBIT
            - CARD_VOUCHER
            - PIX
          description: >-
            CARD_DEBIT gera fatura hospedada (invoiceUrl); não envie dados de
            cartão. CARD_CREDIT e CARD_VOUCHER exigem cardToken ou creditCard +
            remoteIp.
        amount:
          type: number
          minimum: 0.01
        customer:
          $ref: '#/components/schemas/PublicCustomer'
        description:
          type: string
        dueDate:
          type: string
          format: date
        installmentCount:
          type: integer
          minimum: 1
          maximum: 21
        cardToken:
          type: string
          description: Token do cartão para reutilização em cobranças futuras.
        creditCard:
          $ref: '#/components/schemas/CreditCard'
        creditCardHolderInfo:
          $ref: '#/components/schemas/CreditCardHolderInfo'
        remoteIp:
          type: string
          description: IP do comprador (CARD_CREDIT / CARD_VOUCHER).
        authorizeOnly:
          type: boolean
        externalReference:
          type: string
    PublicCustomer:
      type: object
      required:
        - name
        - taxId
      properties:
        id:
          type: string
          description: ID no seu sistema (default taxId)
        name:
          type: string
        taxId:
          type: string
          description: CPF/CNPJ somente dígitos
        email:
          type: string
          format: email
        phone:
          type: string
    CreditCard:
      type: object
      required:
        - holderName
        - number
        - expiryMonth
        - expiryYear
        - ccv
      properties:
        holderName:
          type: string
        number:
          type: string
        expiryMonth:
          type: string
        expiryYear:
          type: string
        ccv:
          type: string
    CreditCardHolderInfo:
      type: object
      required:
        - name
        - email
        - cpfCnpj
        - postalCode
        - addressNumber
        - phone
      properties:
        name:
          type: string
        email:
          type: string
          format: email
        cpfCnpj:
          type: string
        postalCode:
          type: string
        addressNumber:
          type: string
        addressComplement:
          type: string
        phone:
          type: string
        mobilePhone:
          type: string
    SuccessEnvelope:
      type: object
      required:
        - success
        - message
        - data
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Operação concluída com sucesso
        data:
          type: object
          additionalProperties: true
        requestId:
          type: string
    ErrorEnvelope:
      type: object
      required:
        - success
        - message
        - error
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: Subconta inativa
        error:
          type: object
          properties:
            code:
              type: string
              example: Bad Request
            statusCode:
              type: integer
              example: 400
        requestId:
          type: string
          example: req_abc123
  responses:
    SuccessEnvelope:
      description: Operação concluída.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SuccessEnvelope'
          examples:
            default:
              summary: Sucesso
              value:
                success: true
                message: Operação concluída com sucesso
                data: {}
                requestId: req_abc123
    Forbidden:
      description: Chave sem permissão para este endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Chave `wp_live_...` criada em Integrações → Chaves de API no dashboard.

````