This endpoint is used to update the settings of a document that is already attached to a payment.
This call allows you to change the document type and its availability rule for the payer without having to upload the file again.
Main request parameters
-
id: Unique identifier of the payment in Asaas.
-
documentId: Unique identifier of the document linked to the payment.
-
availableAfterPayment: Defines when the document will be available to the payer.
true: the file will only be accessible after paymentfalse: the file will be accessible regardless of payment status
-
type: New document type. Possible values are:
INVOICECONTRACTMEDIADOCUMENTSPREADSHEETPROGRAMOTHER
Update behavior
This operation updates only the document settings of the existing file. The file itself is not replaced by this call.
This endpoint is useful for correcting an incorrect classification or adjusting the payer access rule after the document has already been created.
When to use
Use this endpoint when you need to:
- correct the type of a previously attached document
- change the availability rule after payment
- adjust access settings without re-uploading the file.
Next step in the flow
After updating the document, your application can:
- retrieve the document again
- list the payment documents to validate the change
- continue with the normal payment flow
404Not found
