Creates a dynamic Pix: JSON with `oferta` (`pacote` with `usd`, or `saldo` with `centavos`) and the payer.

The payment releases what was bought by itself: the pack becomes the cred_… token already in the response; the balance goes to the logged-in account's organization. The first purchase needs documento (CPF or CNPJ, sent to the gateway and not stored here) and nome; email, pagina and navegador_id are optional. With forma: "cartao_boleto" the charge is open: the response brings pagamento_em, the gateway page where you pay by card, boleto or Pix (due in three days). With forma: "cartao" and cartao (titular, numero, mes, ano, cvv, documento, email, cep, numero_endereco, telefone), the charge is paid by card in the same request: 200 with estado: "pago", 202 with conferir while the issuer reviews it, 422 when the card is declined; the card is not stored. Set usd to an amount from pacotes or exatos in the GET response. The server sets the amount in cents and rejects amounts that the app has not declared. Returns: { id, credito, forma, pix, pagamento_em, estado, estado_em, cancelamento }

post/api/credito/asaas

Request

  • Base URL: https://agentalog.com
  • URL: https://agentalog.com/api/credito/asaas
  • Auth: none required

Response

{ id, credito, forma, pix, pagamento_em, estado, estado_em, cancelamento }

idstring required

Charge id, to follow up.

creditostring required

For a pack: the cred_… token, shown ONCE; valid when the payment arrives.

formastring required

pix (the default), cartao or cartao_boleto.

pixobject required

copia_e_cola, imagem (PNG QR, data URI) and expira_em; pix form only.

pagamento_emstring required

In the cartao_boleto form: the gateway payment page.

estadostring required

In the cartao form: pago, or pendente with conferir.

estado_emstring required

Where to follow the payment.

cancelamentostring required

Capability to cancel a pending Pix or boleto charge.

Changes

No recorded changes to this operation across all 1 revision of this API.