Skip to main content
If a route requests an attachment, upload it before creating the order. For identity or card verification, create an upload intent first. Sign private calls with HMAC v2 and replace 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

  1. Read the route contract.
    Request
    Find the field in result.operation_contract.contract.dynamic_fields. Read its key, the limits in file, and the path in upload.endpoint.
  2. Send one file to that path with POST and the public-api:files:write scope. This example uses field 81 in group in for route 2. Substitute the path returned by your exchanger.
    Upload
    Set TIMESTAMP, NONCE, and SIGNATURE for this request. Use the SHA-256 hash of the bytes of attachment.csv to calculate the signature. cURL sets the multipart boundary. Send one file field 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
  3. Put the token under the field key in the preflight and create-order bodies. For a field whose key is attachment and whose upload group is in, 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, call GET /api/v3/private/verifications/requirements?route_id=2 to check which verifications the route requires. Substitute your route ID.
  1. For identity verification, call GET /api/v3/private/verifications/identity. Use result.requirements.mode to choose the next action.
  2. Create an upload intent with POST /api/v3/private/files/upload-intents and public-api:files:write. For standalone verification, supply purpose. To tie the upload to an order, add resource_type: "order" and its identifier in resource_id. This example attaches the document to a manual form field called proof. Use the published field key.
    intent.json
    Create an upload intent
    For a card photo, set purpose: "card_verification". Read result.upload_intent.uuid, allowed_extensions, max_bytes, and expires_at from the 201 Created response. The initial status is pending.
  3. Upload the document using the signed file request above. Replace the path, filename, and signature.
    Verification upload request excerpt
    After 200 OK, check result.upload_intent.status. To check status again, call GET /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
For standalone submission, the API returns 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

Call GET /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 during POST /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.