Skip to main content
An attachment is a supporting document — usually an invoice — stored against the business and referenced from a payment by an opaque id. There are two reasons to use them:
  1. Some international destinations will not accept a payment without one.
  2. An identity document for a beneficial owner is uploaded the same way (see International onboarding).

Uploading

Send the document in a part named file. PDF, JPEG and PNG are accepted, up to 8 MB.
The bytes are write-only: the response is the id plus enough metadata to recognise which file it was, and nothing in this API reads a document back. Upload once and reference the id from as many payments as you need.

Referencing one from a payment

Two constraints:
  • The attachment must belong to the same entity as the payment. An id from another entity is a 404, not a 403 — the response does not distinguish “not yours” from “does not exist”.
  • The document is attached when the payment is created. PATCH /payments/{paymentId} has no attachmentId: there is nothing to change it to, and re-associating a document on a payment that is already moving is not something the rails support. If the wrong document went out, cancel the payment and create it again.
Sending an attachmentId where nothing requires one is always accepted.

When a document is required

The requirement is the currency provider’s, not ours, and it is evaluated per payment at creation: The risk rating belongs to the destination country and is maintained by the provider, so treat the requirement as data rather than a list you can hard-code: a country can move between ratings without any change to this API. Because the medium-risk case keys off “have you paid this counterparty before”, the same corridor can require a document for a new counterparty and not for an established one. Do not cache the answer per country.

Handling 400 ATTACHMENT_REQUIRED

When it applies and no attachmentId is given, POST /payments fails with:
Nothing is created, so recovery is: upload the document, then retry the same payment with attachmentId set. Use a new Idempotency-Key for the retry — the original key is bound to the body you first sent, and reusing it with a different body returns 409 IDEMPOTENCY_KEY_REUSED. If you would rather never see this error, the simplest robust integration is to attach the invoice on every international payment where you have one. It is accepted everywhere, so there is no branch to get wrong.

See also