GET /v1/charges/context
const url = 'https://seu-endereco-da-api/v1/charges/context';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://seu-endereco-da-api/v1/charges/context \ --header 'Authorization: Bearer <token>'Permissão que a Chave de acesso precisa: Emitir e cancelar cobranças pelo Asaas (charges:manage).
Authorizations
Seção intitulada “Authorizations”Parameters
Seção intitulada “Parameters”Query Parameters
Seção intitulada “Query Parameters”Responses
Seção intitulada “Responses”object
Whether an Asaas account is connected; a manual charge needs no connection
Null without an Asaas account
False without an Asaas account
Anything but null or approved blocks Asaas charges with asaas_account_in_analysis
Whether an Asaas charge can be canceled here; a manual charge is always cancelable
Whether the contact already has a CPF or CNPJ on file
object
Null for a manual charge
Methods the charge offers, in the order they are sent
Payment link: the Asaas invoice page, or the link typed for a manual charge
Pix copy and paste code
Boleto digitable line
Order items, only for a charge sent as order details
object
object
Asaas page with the proof of payment, known once the payment is confirmed
When the charge stops accepting payment
When the money became available in the Asaas account
How many times the payment message was sent again to the customer
Open deals of the contact the charge can be linked to
object
Open charge of this deal, if any
object
Null for a manual charge
Methods the charge offers, in the order they are sent
Payment link: the Asaas invoice page, or the link typed for a manual charge
Pix copy and paste code
Boleto digitable line
Order items, only for a charge sent as order details
object
object
Asaas page with the proof of payment, known once the payment is confirmed
When the charge stops accepting payment
When the money became available in the Asaas account
How many times the payment message was sent again to the customer
Pipelines a new deal can be opened in; empty without permission to manage deals
object
Example
{ "environment": "sandbox", "accountStatus": "analysis", "openCharge": { "provider": "asaas", "status": "creating", "environment": "sandbox", "methods": [ "pix" ] }, "openDeals": [ { "openCharge": { "provider": "asaas", "status": "creating", "environment": "sandbox", "methods": [ "pix" ] } } ]}Contact or deal not found