Pular para o conteúdo

GET /v1/charges/context

GET
/v1/charges/context
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).

contactId
string format: uuid
dealId
string format: uuid
Media typeapplication/json
object
connected
required

Whether an Asaas account is connected; a manual charge needs no connection

boolean
environment
required

Null without an Asaas account

string
nullable
Allowed values: sandbox production
chargesEnabled
required

False without an Asaas account

boolean
accountStatus
required

Anything but null or approved blocks Asaas charges with asaas_account_in_analysis

string
nullable
Allowed values: analysis documents approved rejected
cancelEnabled
required

Whether an Asaas charge can be canceled here; a manual charge is always cancelable

boolean
hasPayerDocument
required

Whether the contact already has a CPF or CNPJ on file

boolean
defaultDueDate
required
string format: date
suggestedValueCents
required
number
nullable
suggestedDescription
required
string
nullable
openCharge
required
object
id
required
string
provider
required
string
Allowed values: asaas manual
contactId
required
string
dealId
required
string
nullable
status
required
string
Allowed values: creating pending overdue paid refunded chargeback canceled expired failed
environment
required

Null for a manual charge

string
nullable
Allowed values: sandbox production
valueCents
required
number
description
required
string
dueDate
required
string format: date
methods
required

Methods the charge offers, in the order they are sent

Array<string>
Allowed values: pix boleto payment_link
invoiceUrl
required

Payment link: the Asaas invoice page, or the link typed for a manual charge

string
nullable
pixCode
required

Pix copy and paste code

string
nullable
boletoLine
required

Boleto digitable line

string
nullable
order
required

Order items, only for a charge sent as order details

object
items
required
Array<object>
object
retailerId
required
string
name
required
string
amountCents
required
number
quantity
required
number
taxCents
required
number
shippingCents
required
number
discountCents
required
number
receiptUrl
required

Asaas page with the proof of payment, known once the payment is confirmed

string
nullable
failureReason
required
string
nullable
expiresAt
required

When the charge stops accepting payment

string format: date-time
nullable
paidAt
required
string format: date-time
nullable
availableAt
required

When the money became available in the Asaas account

string format: date-time
nullable
refundedAt
required
string format: date-time
nullable
canceledAt
required
string format: date-time
nullable
expiredAt
required
string format: date-time
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
createdByName
required
string
nullable
markedPaidByName
required
string
nullable
lastResentAt
required
string format: date-time
nullable
lastResentByName
required
string
nullable
resendCount
required

How many times the payment message was sent again to the customer

number
openDeals
required

Open deals of the contact the charge can be linked to

Array<object>
object
id
required
string
number
required
number
title
required
string
nullable
valueCents
required
number
openCharge
required

Open charge of this deal, if any

object
id
required
string
provider
required
string
Allowed values: asaas manual
contactId
required
string
dealId
required
string
nullable
status
required
string
Allowed values: creating pending overdue paid refunded chargeback canceled expired failed
environment
required

Null for a manual charge

string
nullable
Allowed values: sandbox production
valueCents
required
number
description
required
string
dueDate
required
string format: date
methods
required

Methods the charge offers, in the order they are sent

Array<string>
Allowed values: pix boleto payment_link
invoiceUrl
required

Payment link: the Asaas invoice page, or the link typed for a manual charge

string
nullable
pixCode
required

Pix copy and paste code

string
nullable
boletoLine
required

Boleto digitable line

string
nullable
order
required

Order items, only for a charge sent as order details

object
items
required
Array<object>
object
retailerId
required
string
name
required
string
amountCents
required
number
quantity
required
number
taxCents
required
number
shippingCents
required
number
discountCents
required
number
receiptUrl
required

Asaas page with the proof of payment, known once the payment is confirmed

string
nullable
failureReason
required
string
nullable
expiresAt
required

When the charge stops accepting payment

string format: date-time
nullable
paidAt
required
string format: date-time
nullable
availableAt
required

When the money became available in the Asaas account

string format: date-time
nullable
refundedAt
required
string format: date-time
nullable
canceledAt
required
string format: date-time
nullable
expiredAt
required
string format: date-time
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
createdByName
required
string
nullable
markedPaidByName
required
string
nullable
lastResentAt
required
string format: date-time
nullable
lastResentByName
required
string
nullable
resendCount
required

How many times the payment message was sent again to the customer

number
pipelines
required

Pipelines a new deal can be opened in; empty without permission to manage deals

Array<object>
object
id
required
string
name
required
string

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