https://your-exchange with your exchanger’s address.
Before you begin, get an API key with the scopes for the calls you need.
Attach a file to an order field
-
Read the route contract.
Find the field inRequest
result.operation_contract.contract.dynamic_fields. Read itskey, the limits infile, and the path inupload.endpoint. -
Send one file to that path with
POSTand thepublic-api:files:writescope. This example uses field81in groupinfor route2. Substitute the path returned by your exchanger.SetUploadTIMESTAMP,NONCE, andSIGNATUREfor this request. Use the SHA-256 hash of the bytes ofattachment.csvto calculate the signature. cURL sets the multipart boundary. Send onefilefield per request. The quickstart script signs the same bytes and sets the multipart boundary. Use the endpoint and file type returned for your field.201 Created excerpt -
Put the token under the field key in the preflight and create-order bodies. For a field whose
keyisattachmentand whose upload group isin, use the following fragment.Order body excerpt
A successful creation attaches the file to the order. The token is valid until
expires_at for one integration, route, and field. Upload the file again for another order.
Prepare a document for verification
Before creating an order, callGET /api/v3/private/verifications/requirements?route_id=2 to check which verifications the route requires. Substitute your route ID.
-
For identity verification, call
GET /api/v3/private/verifications/identity. Useresult.requirements.modeto choose the next action. -
Create an upload intent with
POST /api/v3/private/files/upload-intentsandpublic-api:files:write. For standalone verification, supplypurpose. To tie the upload to an order, addresource_type: "order"and its identifier inresource_id. This example attaches the document to a manual form field calledproof. Use the published field key.intent.jsonFor a card photo, setCreate an upload intentpurpose: "card_verification". Readresult.upload_intent.uuid,allowed_extensions,max_bytes, andexpires_atfrom the201 Createdresponse. The initial status ispending. -
Upload the document using the signed file request above. Replace the path, filename, and signature.
AfterVerification upload request excerpt
200 OK, checkresult.upload_intent.status. To check status again, callGET /api/v3/private/files/upload-intents/{intent}.
The
expires_at deadline applies both to uploading and to submitting the uploaded document. After the exchanger cleans up an unused intent, reading it returns HTTP 404.
Submit a verification
Submission requires
public-api:verifications:write. This order-specific request uses the full_name and proof fields returned by a manual form. Substitute the committed upload UUID.
verification.json
Submit the verification
200 OK excerpt
201 Created and result.verification. For an order, read result.submitted and the updated result.requirements. If you submit both blocks and either fails, neither is submitted.
For order-specific card verification, use the card or account the customer pays from in card.card_number and the primary photo UUID in card.file_intent. If card.additional_photos.enabled in the requirements allows extra photos, put their UUIDs in additional_file_intents inside card.
Check status and get payment instructions
CallGET /api/v3/private/verifications/identity/{verification} or GET /api/v3/private/verifications/cards/{verification} with public-api:verifications:read. For a new identity verification, pass verification.uuid as returned. For a card, save the numeric ID from result.verification.id or result.submitted.card.id and pass it as a string in the path. This identifies the particular submission even if a customer verifies their card again for the same order. Append /actions to check whether another submission is available after rejection (allowed_actions.resubmit_after_reject.allowed in result.actions).
For an order, call GET /api/v3/private/exchange/orders/{order}/verifications and read identity and card in result.requirements.
Card approval applies to the card or account the customer pays from. Check
blocks_payment on the order itself, even when the customer already has an approved card in their profile. Once verification clears, use the status from a fresh payment instructions response.
Account for AML when creating an order
If the exchanger checks the destination address at order creation, that check runs duringPOST /api/v3/private/exchange/orders. The value can_create_order: true in preflight confirms the local rules. The value checks.external: "deferred" indicates that external checks wait until creation.
If the check stops order creation, the API returns HTTP 422 with error.code: "validation_failed". Read error.details.fields and show the customer the relevant message. Depending on its settings, the exchanger may also run AML checks when verifying incoming payment or before an automatic payout. Once an order exists, follow its order and payment status.
Recover after a network error
You can send an Idempotency-Key with the direct upload, intent creation,commit, and verification submission. Save a separate key for each request before sending it. On retry, use the same key and request with a fresh signature. For multipart, also preserve the filename and the file part’s MIME type. The multipart boundary can change.
If the commit response is lost, read the current status by UUID. If the intent is committed and still within its deadline, submit the verification. If it is pending and still within its deadline, retry the upload with its original key. When the API returns a saved response with Idempotency-Replayed: true, its status reflects the original operation. Use GET to read the current status.
Handle errors and protect documents
In production, send documents and file tokens over HTTPS. Keep the HMAC secret on your integration server. Exclude documents, file tokens, and payment details from request logs and traces. In a test environment, use test data to exercise upload, rejection, and resubmission.
Create an order
Send file tokens with the rest of the order form.
Get payment instructions
Fetch payment instructions and check payment status.