Documents
Upload the identity and business documents a verification asks for.
When a verification needs a document, its requirements_due lists it as document.<type>, for example document.passport. Upload the file here. Superpay stores it encrypted and uses it to satisfy the requirement.
| Endpoint | Scope | Does |
|---|---|---|
POST /v1/originators/{id}/documents | originators:write | Upload a document for an originator |
GET /v1/originators/{id}/documents | originators:read | List an originator's documents |
POST /v1/beneficiaries/{id}/documents | beneficiaries:write | Upload a document for a beneficiary |
GET /v1/beneficiaries/{id}/documents | beneficiaries:read | List a beneficiary's documents |
POST /v1/business-verification/documents | treasury:manage | Upload a document for your own business |
GET /v1/business-verification/documents | treasury:read | List your business's documents |
- Uploads take no
Idempotency-Key: they are idempotent by content. See Uploading the same file again. - A document cannot be downloaded, replaced or deleted through the API. Upload only what a verification asks for.
- Test and live documents are separate, like every other object.
Upload a document#
/v1/originators/{id}/documentsoriginators:write/v1/beneficiaries/{id}/documentsbeneficiaries:write/v1/business-verification/documentstreasury:manageThe request is multipart/form-data, not JSON, with these parts:
document_typestringRequiredA text part: one of the document types the owner accepts, in lower case, e.g. passport.
filefileRequiredThe file, one per request. The part must declare its own Content-Type: application/pdf, image/jpeg or image/png. At most 10 MiB. The file name is ignored.
subjectstringFor your business only: whose document it is, among the people of your business. controller, or beneficial_owners[n], counted from 0 in the order your business verification lists its owners. Required for an identity document of your business. Send it at most once.
Send each part once, in any order. Any other part fails the request with 400 REQUEST_BODY_INVALID. Let your HTTP client set the request's Content-Type header with its boundary.
curl https://api.withsuperpay.com/v1/originators/org_01M2FPKH20W4N5X6M3P9R2T1VA/documents \
-H "Authorization: Bearer $SUPERPAY_TOKEN" \
-F document_type=passport \
-F "file=@passport.pdf;type=application/pdf"import requests
with open("passport.pdf", "rb") as f:
res = requests.post(
"https://api.withsuperpay.com/v1/originators/org_01M2FPKH20W4N5X6M3P9R2T1VA/documents",
headers={"Authorization": f"Bearer {token}"},
data={"document_type": "passport"},
# The three-part tuple sets the file's Content-Type; without it the upload is refused.
files={"file": ("passport.pdf", f, "application/pdf")},
timeout=60,
)import { readFile } from 'node:fs/promises';
const form = new FormData();
form.append('document_type', 'passport');
form.append('file', new Blob([await readFile('passport.pdf')], { type: 'application/pdf' }), 'passport.pdf');
const res = await fetch(
'https://api.withsuperpay.com/v1/originators/org_01M2FPKH20W4N5X6M3P9R2T1VA/documents',
{ method: 'POST', headers: { Authorization: `Bearer ${await getToken()}` }, body: form },
);{
"object": "kyc_document",
"id": "kyd_01M2FQ8W3E5R7T9Y1V3K5N7P9A",
"owner_type": "originator",
"owner_id": "org_01M2FPKH20W4N5X6M3P9R2T1VA",
"document_type": "passport",
"content_type": "application/pdf",
"size_bytes": 482133,
"sha256": "9f2c4d0b8e7a6c5b4a39281706f5e4d3c2b1a09f8e7d6c5b4a3928170605f4e3",
"forwarding": [
{ "capability": "cross_border", "status": "NOT_SUPPORTED" }
],
"retention_until": "2031-09-30T10:15:04Z",
"uploaded_at": "2026-09-30T10:15:04Z",
"livemode": false
}201 Created means the document is stored. There is no Location header.
File rules#
| Rule | Detail |
|---|---|
| Type | application/pdf, image/jpeg or image/png, declared on the file part. image/jpg, application/octet-stream and a missing type are refused with DOCUMENT_CONTENT_TYPE_UNSUPPORTED |
| Content | The file must start the way its type does: a PDF with %PDF-, a JPEG with bytes FF D8 FF, a PNG with the PNG signature. Otherwise DOCUMENT_CONTENT_MISMATCH |
| Size | At most 10 MiB (10,485,760 bytes). Larger: DOCUMENT_TOO_LARGE. An empty file is refused |
| Count | One file part per request |
| Name | The file name is neither stored nor returned |
Whose document it is#
A document of an originator or a beneficiary is that person's own, and takes no subject.
Your business uploads documents about itself, and about its people. An identity document (government_id, passport, national_id, drivers_license or residence_permit) says who one person is, so your business must say whose it is:
curl https://api.withsuperpay.com/v1/business-verification/documents \
-H "Authorization: Bearer $SUPERPAY_TOKEN" \
-F document_type=government_id \
-F subject=controller \
-F "file=@controller-passport.pdf;type=application/pdf"| Document of your business | subject |
|---|---|
government_id, passport, national_id, drivers_license, residence_permit | Required |
proof_of_address, pan_card, and a person's bank_statement | Optional |
The business's own documents, e.g. ein_letter or certificate_of_incorporation | Not allowed |
beneficial_owners[0] is the first owner your business verification lists, beneficial_owners[1] the second, up to beneficial_owners[99]. Superpay checks that a subject is written correctly, not that your verification has a person in that place: a document for a place nobody is in is stored and cannot be handed on, and its forwarding then reads FAILED.
A subject is a place in the business verification you have submitted, as it stands when you upload:
- Submit your business verification first. Until then a document with a
subjectis refused with422 DOCUMENT_SUBJECT_UNAVAILABLE. So is one for a business that was verified outside this API: its people's documents go where it was verified. - If you correct your business verification, check its people's identity documents. A place may be another person's after a correction, so an identity document that was uploaded before it and had not been handed on yet is not handed on: its
forwardingreadsFAILED. Upload it again; the same file is then a new document. One that was already handed on (FORWARDED) stays as it is.
Uploading the same file again#
The same file, for the same owner, document_type and subject, is the same document. Uploading it again returns 200 OK with the document already stored, unchanged, and does nothing else. The same bytes under another type, owner or subject are a new document, 201. So is a file with a subject uploaded again after you corrected your business verification.
sha256 is the hex SHA-256 of the file: compute it before you upload to know whether you already have.
Document types#
document_type | Originator | Beneficiary | Your business |
|---|---|---|---|
passport | Yes | Yes | Yes |
national_id | Yes | Yes | Yes |
drivers_license | Yes | Yes | Yes |
residence_permit | Yes | Yes | Yes |
government_id | Yes | Yes | Yes |
proof_of_address | Yes | Yes | Yes |
pan_card | Yes | Yes | Yes |
bank_statement | Yes | Yes | Yes |
certificate_of_incorporation | — | — | Yes |
certificate_of_good_standing | — | — | Yes |
articles_of_organization | — | — | Yes |
operating_agreement | — | — | Yes |
ein_letter | — | — | Yes |
regulatory_license | — | — | Yes |
business_registration | — | — | Yes |
ownership_chart | — | — | Yes |
proof_of_business_address | — | — | Yes |
other | — | — | Yes |
government_id is a government-issued photo identity document of whichever kind the person has: a passport, a national identity card or a driver's license. Upload it under this type when requirements_due lists document.government_id.
Your business can also upload its controller's and owners' personal documents under its own name, saying whose each is. A type the owner does not accept is refused with 400 INVALID_ARGUMENT on document_type.
What an upload does#
For an originator or a beneficiary#
An upload re-checks the party straight away, in the same request:
- a
document.<type>requirement it satisfies disappears fromrequirements_due; - a verification waiting only for it moves from
REQUIREMENTS_DUEtoPENDING, and is sent on for verification; - if the verification view changed, an
originator.verification_updatedorbeneficiary.verification_updatedevent is sent.
The verification's outcome comes later. A party that is already verified is not affected. A deleted party accepts no documents.
For your business#
The upload is stored. If your business verification lists document.<type> for it in requirements_due, Superpay hands it to its custody partner, and forwarding says how far that has got. A document of a type nobody has asked for is kept, and is handed over if the verification later asks for that type.
The document.<type> entry stays in requirements_due until the custody partner has confirmed what it asked for; then the verification changes and business.verification_updated is sent. A document that was handed over can leave its entry listed for some minutes. There is no set time for the review that follows.
Upload business documents after your business verification exists, and only the ones its requirements_due lists.
A business verified with the form is asked for the same documents. Its people upload them in the form, or you upload them here: both store the same documents.
List documents#
/v1/originators/{id}/documentsoriginators:read/v1/beneficiaries/{id}/documentsbeneficiaries:read/v1/business-verification/documentstreasury:readcurl https://api.withsuperpay.com/v1/originators/org_01M2FPKH20W4N5X6M3P9R2T1VA/documents \
-H "Authorization: Bearer $SUPERPAY_TOKEN"{
"object": "list",
"data": [
{
"object": "kyc_document",
"id": "kyd_01M2FQ8W3E5R7T9Y1V3K5N7P9A",
"owner_type": "originator",
"owner_id": "org_01M2FPKH20W4N5X6M3P9R2T1VA",
"document_type": "passport",
"content_type": "application/pdf",
"size_bytes": 482133,
"sha256": "9f2c4d0b8e7a6c5b4a39281706f5e4d3c2b1a09f8e7d6c5b4a3928170605f4e3",
"forwarding": [{ "capability": "cross_border", "status": "NOT_SUPPORTED" }],
"retention_until": "2031-09-30T10:15:04Z",
"uploaded_at": "2026-09-30T10:15:04Z",
"livemode": false
}
],
"has_next": false
}- The newest 100 documents, newest first.
has_nextistruewhen there are older ones. There are no cursors or filters. - A deleted beneficiary's documents are still listed.
- The business list always answers
200, even before you submit your business verification.
The document object#
| Field | Type | Description |
|---|---|---|
object | string | kyc_document |
id | string | kyd_… |
owner_type | string | originator, beneficiary or business |
owner_id | string | The org_… or ben_… id. Left out for business, which is you |
document_type | string | As uploaded |
subject | string | Whose document it is among the people of your business, as uploaded: controller or beneficial_owners[n]. Left out when the upload had none |
content_type | string | application/pdf, image/jpeg or image/png |
size_bytes | integer | The file's size |
sha256 | string | Lower-case hex SHA-256 of the file |
forwarding | array | Where the document goes: one entry per verification it is handed to, as capability and status. [] when there is none, or none yet |
retention_until | string | The end of the document's retention period, five years after upload by default. It is not a deletion date |
uploaded_at | string | RFC 3339, UTC |
livemode | boolean | true for live, false for test |
The file itself is never returned.
Forwarding#
forwarding[].capability names what the verification is for, never who does it: cross_border, domestic, identity or payouts for a party, custody for your business.
For an originator or a beneficiary the list is fixed when you upload. For your business the custody entry appears when your business verification asks for the document's type: at once if it is asking when you upload, later if it comes to ask. List your documents to see it.
status | Meaning | What you do |
|---|---|---|
NOT_SUPPORTED | Superpay's operations team hands the document over | Nothing |
PENDING | Superpay is sending it | Nothing |
FORWARDED | Sent | Nothing |
FAILED | It was refused, or it could not be handed on: its subject names nobody in your business verification, or a place in a verification you have since corrected; or Superpay kept trying and could not hand it on | Upload a clearer file, or the file again with the right subject. Contact Superpay if it fails again, or if you did nothing wrong: Superpay's operations team can hand it on |
A FAILED document is not sent again. Upload a new one: a different file, the same file with another subject, or the same file after a correction.
Errors#
Errors are problem documents. Authentication and scope errors are listed on Errors. Uploads never return idempotency errors.
| Code | HTTP | When | What you do |
|---|---|---|---|
REQUEST_BODY_INVALID | 400 | The body is not multipart/form-data with a boundary, has a part other than document_type, file and subject, or cannot be read | Send only those parts |
INVALID_ARGUMENT | 400 | A part is missing or wrong. errors[] names it; see below | Fix the part |
DOCUMENT_TOO_LARGE | 400 | The file is over 10 MiB | Send a smaller file |
DOCUMENT_CONTENT_TYPE_UNSUPPORTED | 400 | The file part's type is missing or not PDF, JPEG or PNG | Declare the right type |
DOCUMENT_CONTENT_MISMATCH | 400 | The file's bytes do not match its declared type | Send the file as it is, with its true type |
ORIGINATOR_NOT_FOUND, BENEFICIARY_NOT_FOUND | 404 | No such party in this mode | Check the id and mode |
DOCUMENT_OWNER_NOT_ACCEPTING | 422 | The party was deleted, or its personal data erased | Nothing: it accepts no documents |
DOCUMENT_SUBJECT_UNAVAILABLE | 422 | The upload has a subject, and your business has no business verification submitted through this API for it to be a place in | Submit your business verification first. If your business was verified elsewhere, send its people's documents there |
INTERNAL | 500 | Unexpected error | Retry. Uploading the same file again is safe |
The body is checked before the owner, so a bad upload to an unknown party returns 400, not 404.
field | code | message |
|---|---|---|
document_type | parameter_missing | document_type is required |
document_type | parameter_value_invalid | document_type must be one of the document types accepted for a {owner} |
document_type | parameter_value_invalid | one document_type is allowed, and it is one of the document types |
file | parameter_missing | a file part is required, or a non-empty file is required |
file | parameter_value_invalid | exactly one file part is allowed |
subject | parameter_missing | say whose identity document this is: controller or beneficial_owners[n] |
subject | parameter_value_invalid | subject must be controller or beneficial_owners[n], counted from 0 as the business verification counts them |
subject | parameter_value_invalid | only a document about a person has a subject |
subject | parameter_value_invalid | subject says which of a business's people a document is of; a party's document is the party's own |
subject | parameter_value_invalid | one subject is allowed: controller or beneficial_owners[n] |