Skip to main content
An attachment (pat_*) is a private file, such as an invoice or receipt, kept with one of your party’s outgoing transactions. The recipient can’t see it.
Payment attachments are in early access and subject to change. To request Payment attachments access, contact hi@natural.com.

Example

GET /attachments/{attachmentId}
The object is everything inside data. The field names below are relative to it: attributes.filename is data.attributes.filename in the response.

Fields

string
required
Attachment ID (pat_*).
string
required
Resource type. Always attachment.
object
required
The attachment’s details.

Limits

A file must be a PDF, PNG or JPEG of at most 20,000,000 bytes. A PDF must be unencrypted and have at least one page, and a PNG or JPEG at most 20,000,000 pixels. A file whose content isn’t a valid PDF, PNG or JPEG, including an image over the pixel limit, returns 400. A transaction holds at most 100 attachments, not counting deleted ones; the next upload returns 409. A file can’t be replaced: upload a new attachment instead.

Access

Reading attachments needs one of payments.read, direct.read, wallets.read, refunds.read or chargebacks.read; uploading or deleting needs one of payments.create, direct.create, wallets.transfer, wallets.withdraw, refunds.create or chargebacks.respond. Each applies to the wallet the transaction used, or to the whole party when the transaction has no wallet.

Events

This resource sends no webhook events.

Other objects

These endpoints in the group don’t return this object:
  • Export attachment references (GET /attachments/export) returns no resource object.
  • Download attachment (GET /attachments/{attachmentId}/download) returns no resource object.

Errors

These endpoints have no resource-specific error codes. They return the generic errors and the validation errors (422) in the Error Handling guide.

Sandbox simulations

None.