Update settings of a document of a payment

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 payment
    • false: the file will be accessible regardless of payment status
  • type: New document type. Possible values are:

    • INVOICE
    • CONTRACT
    • MEDIA
    • DOCUMENT
    • SPREADSHEET
    • PROGRAM
    • OTHER

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
Path Params
string
required
string
required
Body Params
boolean
required
string
enum
required
Allowed:
Responses

404

Not found

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json