PATCH /v1/integrations/asaas
PATCH
/v1/integrations/asaas
const url = 'https://seu-endereco-da-api/v1/integrations/asaas';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"chargesEnabled":true,"cancelEnabled":true,"notifyOnPayment":true,"winDealOnPayment":true,"defaultDueDays":1,"externalCharges":{"enabled":true,"channelId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","dealMode":"none","pipelineId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","stageId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","customerGroup":"example","minValueCents":1,"methods":["pix"],"ignoreSubscriptions":true}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://seu-endereco-da-api/v1/integrations/asaas \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "chargesEnabled": true, "cancelEnabled": true, "notifyOnPayment": true, "winDealOnPayment": true, "defaultDueDays": 1, "externalCharges": { "enabled": true, "channelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "dealMode": "none", "pipelineId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "stageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "customerGroup": "example", "minValueCents": 1, "methods": [ "pix" ], "ignoreSubscriptions": true } }'Permissão que a Chave de acesso precisa: Gerenciar a Central de apps (integrations:manage).
Authorizations
Seção intitulada “Authorizations”Request Bodyrequired
Seção intitulada “Request Bodyrequired”Media typeapplication/json
object
chargesEnabled
boolean
cancelEnabled
boolean
notifyOnPayment
boolean
winDealOnPayment
boolean
defaultDueDays
number
externalCharges
object
enabled
boolean
channelId
string format: uuid
dealMode
string
pipelineId
string format: uuid
stageId
string format: uuid
customerGroup
string
minValueCents
number
methods
Array<string>
ignoreSubscriptions
boolean
Responses
Seção intitulada “Responses”Media typeapplication/json
object
connected
required
boolean
id
string
environment
Sandbox keys create test charges only
string
apiKeyLast4
Last characters of the stored key; the key itself never leaves the server
string
chargesEnabled
boolean
cancelEnabled
boolean
notifyOnPayment
boolean
winDealOnPayment
boolean
defaultDueDays
number
connectedAt
string format: date-time
connectedByName
string
openChargesCount
Open charges whose payment stops being tracked on disconnect
number
accountName
Name of the Asaas account the key belongs to
string
origin
Created: the account was opened from inside the system
string
accountStatus
Null for an account connected by key; charging is blocked until approved
string
onboardingUrl
Where the account holder sends the pending documents
string
accountCreationAvailable
Only when disconnected: whether an Asaas account can be opened from here
boolean
externalCharges
Tracking of charges created straight in Asaas
object
enabled
required
boolean
channelId
required
Official WhatsApp number that messages the customers of these charges
string
dealMode
required
string
pipelineId
required
string
stageId
required
string
customerGroup
required
string
minValueCents
required
number
methods
required
Array<string>
ignoreSubscriptions
required
boolean
Example
{ "environment": "sandbox", "origin": "key", "accountStatus": "analysis", "externalCharges": { "dealMode": "none", "methods": [ "pix" ] }}Asaas is not connected