Guides

Orders

An order represents a single exchange operation — converting funds from one asset to another. This page covers creating, retrieving, listing, and cancelling orders, as well as the order lifecycle.

Order Lifecycle

Every order progresses through a series of statuses:

Order lifecycle: new, processing, hold and failed on the left; cancelled, done, stopped, rejected and rollbacked are terminal states

Double circles are terminal states. The full set of transitions:

FromTo
newprocessing, hold, cancelled, rejected
processingdone, hold, failed, rejected, stopped, rollbacked
holdprocessing, new, rejected
failedprocessing (retried by Stablegate), stopped, rollbacked

Terminal states — the order does not move on its own: done, rejected, cancelled, stopped, rollbacked. The only exception: Stablegate operations can complete a stopped order manually, which moves it to done.

failed is not terminal: an order can be retried back into processing. cancelled is reachable only from new. An order that receives no deposit by valid_until is cancelled automatically; the check runs hourly, so the cancellation can land up to an hour after valid_until.

Order Statuses

StatusDescription
newOrder has been created and is awaiting a deposit from the customer
processingDeposit received; the exchange is being processed
doneExchange completed successfully; funds have been delivered to the destination
holdOrder has been paused for manual review
failedOrder failed during processing (check error_message for details). Not a final state — Stablegate can retry it back into processing
rejectedOrder was rejected by Stablegate, or its payout was rejected by the payment provider
cancelledOrder was cancelled
stoppedOrder was manually stopped by Stablegate operations while it was processing or after it failed; any in-flight operations were halted and the order does not advance on its own. Operations can later complete it manually (done)
rollbackedOrder was rolled back by Stablegate operations after processing failed. Rare; final

Create an Order

Submit a new exchange order for a customer.

Endpoint:

POST /v1/customers/{customer_uuid}/orders/

Request Body

FieldTypeRequiredDescription
source.railstringYesSource payment rail (e.g., sepa, ethereum)
source.assetstringYesSource asset code (e.g., EUR, USDT)
source.amountnumber | stringYesAmount the customer will send
destination.railstringYesDestination payment rail
destination.assetstringYesDestination asset code
destination.client_accountstringNoDestination account identifier: IBAN for fiat, wallet address for crypto
destination.client_account_uuidstring (UUID)NoUUID of a registered external account (bank account or wallet)
account_uuidstring (UUID)NoInternal account UUID (if applicable)
third_party_document_uuidstring (UUID)NoUUID of an invoice the customer already has (a document of type proof_of_third_party_deal, such as the one of a cancelled order) to attach to this order. See Third-Party Payouts and the Invoice
For destination, provide either client_account (raw IBAN or wallet address) or client_account_uuid (UUID of a previously registered external account). Using client_account_uuid is recommended as it references a verified account. In both cases the destination must be an account registered for this customer; an unregistered IBAN or address is refused.
Only source.amount exists. An order cannot be created from the amount the customer should receive; use check-fees with destination.amount to find the source amount first.

Example: On-Ramp Order (EUR → USDC)

Request:

curl https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/ \
  --request POST \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: order_c1d2e3f4_onramp_001' \
  --data '{
  "source": {
    "rail": "sepa",
    "asset": "EUR",
    "amount": 1000
  },
  "destination": {
    "rail": "ethereum",
    "asset": "USDC",
    "client_account_uuid": "wa1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d"
  }
}'

Response:

{
  "uuid": "od1e2f3a-4b5c-6d7e-8f9a-0b1c2d3e4f5a",
  "reference": "SG-20250115-ABCDEF",
  "state": "new",
  "deposit_address": "",
  "source": {
    "rail": "sepa",
    "asset": "EUR",
    "amount": "1000.00",
    "deposit_bank_info": {
      "iban": "LT603250000000000001",
      "bank_name": "Stablegate UAB",
      "bank_code": "REVOLT21",
      "bank_country": "LT",
      "holder_name": "STGG AG",
      "bank_address": "Konstitucijos pr. 21B, 08130 Vilnius, Lithuania"
    },
    "transaction_hash": null,
    "deposit_status": null
  },
  "destination": {
    "rail": "ethereum",
    "asset": "USDC",
    "amount": "978.50",
    "client_account": "0xDC1dCb46fC96C46c4F294866AFCA81874041bB2",
    "transaction_hash": "0x9b1e4c7f2a5d8b3c6f0e9d2a4b7c1e5f8a3d6b9c2e5f1a4b7c0d3e6f9a2b5c8d",
    "payment_reference": null
  },
  "commission": {
    "asset": "EUR",
    "amount": "15.00"
  },
  "account": {
    "uuid": "ac1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
    "code": "TRD-001",
    "name": "Trading Account",
    "type": "trading"
  },
  "error_message": null,
  "created_at": "2025-01-15T10:45:00.000Z",
  "valid_until": "2025-01-15T11:45:00.000Z"
}

Key response fields for on-ramp:

  • source.deposit_bank_info — Stablegate's bank details where the customer must send the EUR transfer; the customer must enter holder_name as the recipient
  • reference — The payment reference the customer must include in their SEPA transfer
  • valid_until — The order will expire if no deposit is received by this time

Example: Off-Ramp Order (USDT → EUR)

Request:

curl https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/ \
  --request POST \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: order_c1d2e3f4_offramp_001' \
  --data '{
  "source": {
    "rail": "ethereum",
    "asset": "USDT",
    "amount": 500
  },
  "destination": {
    "rail": "sepa",
    "asset": "EUR",
    "client_account_uuid": "ba1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e"
  }
}'

Response:

{
  "uuid": "od2f3a4b-5c6d-7e8f-9a0b-1c2d3e4f5a6b",
  "reference": "SG-20250115-GHIJKL",
  "state": "new",
  "deposit_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
  "source": {
    "rail": "ethereum",
    "asset": "USDT",
    "amount": "500.000000",
    "deposit_bank_info": null,
    "transaction_hash": null,
    "deposit_status": null
  },
  "destination": {
    "rail": "sepa",
    "asset": "EUR",
    "amount": "473.25",
    "client_account": "DE89370400440532013000",
    "transaction_hash": null,
    "payment_reference": "SGPAY-20250115-000123"
  },
  "commission": {
    "asset": "USDT",
    "amount": "10.00"
  },
  "account": {
    "uuid": "ac1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
    "code": "TRD-001",
    "name": "Trading Account",
    "type": "trading"
  },
  "error_message": null,
  "created_at": "2025-01-15T10:50:00.000Z",
  "valid_until": "2025-01-15T11:50:00.000Z"
}

Key response fields for off-ramp:

  • deposit_address — The Ethereum address where the customer must send USDT
  • destination.client_account — The customer's IBAN where EUR will be delivered

Response Fields

FieldTypeDescription
uuidstring (UUID)Unique identifier for the order
referencestringPayment reference (must be included in fiat transfers)
statestringCurrent order status
deposit_addressstringCrypto address for deposits (off-ramp and crypto-to-crypto)
source.railstringSource payment rail
source.assetstringSource asset code
source.amountstringAmount to be sent by the customer
source.deposit_bank_infoobject | nullStablegate bank details for fiat deposits (on-ramp only)
source.deposit_bank_info.ibanstringStablegate IBAN the customer sends the transfer to
source.deposit_bank_info.bank_namestringName of the Stablegate bank
source.deposit_bank_info.bank_codestringBIC of the Stablegate bank
source.deposit_bank_info.bank_countrystringCountry of the Stablegate bank
source.deposit_bank_info.holder_namestring | nullPayee name to put on the transfer (the Stablegate legal entity)
source.deposit_bank_info.bank_addressstring | nullAddress of the Stablegate bank
source.transaction_hashstring | nullBlockchain transaction hash of the customer's crypto deposit. Set once the deposit is detected; null before that and for bank deposits
source.deposit_statusstring | nullStatus of the customer's deposit: received, confirmed, credited, on_hold or rejected (see Deposit Status). null until a deposit is detected
destination.railstringDestination payment rail
destination.assetstringDestination asset code
destination.amountstringAmount to be received
destination.client_accountstringCustomer's destination account (IBAN or wallet address)
destination.transaction_hashstring | nullBlockchain transaction hash of the crypto payout. Set once Stablegate sends the payout; null before that and for bank payouts
destination.payment_referencestring | nullReference of the bank payout as the payment provider reports it. Set once the payout is sent; null for crypto payouts

Both payout fields are filled once the payout leaves Stablegate, so show them to the customer as proof of delivery: destination.transaction_hash for crypto, destination.payment_reference for a bank transfer. They stay null while the order is waiting for the deposit or still processing. | commission.asset | string | Asset the commission is charged in | | commission.amount | string | Fee amount | | account.uuid | string (UUID) | Internal account UUID | | account.type | string | Account type (trading or internal_iban) | | error_message | string | null | Error details if the order failed | | created_at | string (ISO 8601) | Order creation timestamp | | valid_until | string (ISO 8601) | null | Deadline for the deposit. The window is set by your account configuration, so the values in the examples are illustrative. An order with no deposit by this time is cancelled; null once a deposit is attached | | exchange_rate | string | null | Exchange rate currently applied to the order: destination asset units per one source asset unit. null when the order has no exchange step | | rate_valid_until | string (ISO 8601) | null | Time until which exchange_rate and destination.amount are held. null once the deposit is received | | third_party_document_required | boolean | true when the order pays out to a third-party bank account and its source amount is above the invoice threshold. Until the invoice is attached, the order is not executed automatically. See Third-Party Payouts and the Invoice | | third_party_document_uuid | string (UUID) | null | The invoice attached to the order (a customer document of type proof_of_third_party_deal); null while none is attached |

Rate and amounts before the deposit. While an order is new and has no deposit, Stablegate re-prices it periodically: exchange_rate and destination.amount are recalculated, and rate_valid_until shows until when the current values hold. Read the order again after that time to show the customer up-to-date numbers. When the deposit arrives, the amounts are calculated from the amount actually received, and the order is no longer re-priced.Note: the single-order endpoints return the status in a field named state; the list endpoint returns the same value as status. Read state when polling one order, status when scanning a list. The list endpoint's status query parameter filters on these same values.

Deposit Status

The order state stays new from the moment the customer's deposit is seen until it is credited, so state alone cannot tell you that the money has arrived. source.deposit_status fills that gap:

ValueMeaning
nullNo deposit detected yet
receivedDeposit seen (on-chain or on the bank account); the compliance check is in progress
confirmedCompliance check passed; the funds are being credited to the order
creditedFunds credited; the order moves to processing
on_holdDeposit is under manual compliance review
rejectedDeposit was refused and will not fund the order; contact support for the refund

Webhooks fire only on order state changes, so poll Get Order Details while the order is new if you want to show the customer that the deposit has been seen.

How Deposits Are Matched

Crypto. deposit_address belongs to the customer and the destination account, and is the same for every order with that destination. A transfer that lands on it is attached to the customer's newest open order on that address; the amount is not used for matching. The order is then recalculated from the amount actually received, so an over- or underpayment changes the payout rather than failing the order. Keep one open order per customer and destination at a time. A transfer smaller than 1 USDT or 1 USDC is not processed. A transfer sent over another network or in another token is not detected at all; recovery is a manual request to support.

Bank. A SEPA transfer is matched by the reference from deposit_bank_info, with holder_name as the payee. A transfer without the reference stays unmatched until Stablegate support resolves it.

A deposit with no open order. If the customer pays after the order was cancelled — including the automatic cancellation at valid_until — and no other order on the same address, or on the same reference for a bank transfer, is open, the transfer stays unmatched. Stablegate records it, but it does not fund an order: source.deposit_status stays empty for it and no webhook fires. The money is not lost: contact your account manager with the customer UUID, the order UUID, the amount, the asset and the transaction hash or the bank reference, and Stablegate operations resolve the deposit. Create a new order for a new transfer — a deposit that has already landed is not picked up by it.


Activate an Account with a Verification Order

An account with Standard Verification trades only after activation, so permissions.can_trade stays false until the customer makes a test deposit from their own bank account. A verification order collects that deposit: it carries the bank details of the verification ledger, and Stablegate fixes the amount at one unit of the deposit asset, kept as the order commission.

A regular order does not activate the account. Create the verification order instead:

Endpoint:

POST /v1/customers/{customer_uuid}/orders/verification/

Request body:

FieldTypeRequiredDescription
source.railstringYesBank rail the customer pays from: sepa, sepa_instant, swift, ach or wire
source.assetstringYesFiat asset of the deposit, for example EUR
account_uuidstring (UUID)NoCustomer account to credit; the customer's default account when omitted

Request:

curl https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/verification/ \
  --request POST \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "source": {
    "rail": "sepa",
    "asset": "EUR"
  }
}'

Response: 200 OK with the order details. source.deposit_bank_info holds the account to pay into, reference holds the payment reference to give to the customer, and destination is null.

Show the customer the payee, the IBAN and the reference. Once the deposit arrives, the order completes on its own and permissions.can_trade turns true — poll Get Order Details for the order and Get Customer Details for the permission.

Only bank rails and fiat assets are accepted: a crypto rail or a crypto asset is refused with 422. When verification is not configured for the requested rail, the call answers 400 and passes the message from Stablegate — contact your account manager to have the rail set up.

Get Order Details

Retrieve the current state of an order. Use this endpoint to monitor the order status.

Endpoint:

GET /v1/customers/{customer_uuid}/orders/{order_uuid}/

Request:

curl https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/od1e2f3a-4b5c-6d7e-8f9a-0b1c2d3e4f5a/ \
  --header 'X-Api-Key: YOUR_API_KEY'

Response (order in processing):

{
  "uuid": "od1e2f3a-4b5c-6d7e-8f9a-0b1c2d3e4f5a",
  "reference": "SG-20250115-ABCDEF",
  "state": "processing",
  "deposit_address": "",
  "source": {
    "rail": "sepa",
    "asset": "EUR",
    "amount": "1000.00",
    "deposit_bank_info": {
      "iban": "LT603250000000000001",
      "bank_name": "Stablegate UAB",
      "bank_code": "REVOLT21",
      "bank_country": "LT",
      "holder_name": "STGG AG",
      "bank_address": "Konstitucijos pr. 21B, 08130 Vilnius, Lithuania"
    },
    "transaction_hash": null,
    "deposit_status": "credited"
  },
  "destination": {
    "rail": "ethereum",
    "asset": "USDC",
    "amount": "978.50",
    "client_account": "0xDC1dCb46fC96C46c4F294866AFCA81874041bB2"
  },
  "commission": {
    "asset": "EUR",
    "amount": "15.00"
  },
  "account": {
    "uuid": "ac1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
    "code": "TRD-001",
    "name": "Trading Account",
    "type": "trading"
  },
  "error_message": null,
  "created_at": "2025-01-15T10:45:00.000Z",
  "valid_until": null
}

Tracking Status Updates

There are two ways to track order status changes:

Webhooks (recommended): Configure a webhook to receive real-time POST notifications whenever an order status changes. This is more efficient and eliminates the need for polling.

Polling: If you cannot receive webhooks, poll the order endpoint periodically:

async function waitForCompletion(customerUuid, orderUuid, intervalMs = 5000) {
  const terminalStatuses = ["done", "rejected", "cancelled", "stopped"];

  while (true) {
    const order = await request("GET", `/v1/customers/${customerUuid}/orders/${orderUuid}/`);

    console.log(`Order ${orderUuid}: ${order.state}`);

    if (terminalStatuses.includes(order.state)) {
      return order;
    }

    await new Promise((resolve) => setTimeout(resolve, intervalMs));
  }
}

List Orders

Retrieve a list of orders for a customer with optional filtering.

Endpoint:

GET /v1/customers/{customer_uuid}/orders/

Query Parameters

ParameterTypeDefaultDescription
limitinteger100Maximum number of orders to return
offsetinteger0Number of orders to skip (for pagination)
statusarray—Filter by status: new, processing, done, hold, failed, rejected, cancelled, stopped
incoming_rails_codestring—Filter by source rail (e.g., sepa)
outgoing_rails_codestring—Filter by destination rail (e.g., ethereum)
incoming_asset_codestring—Filter by source asset (e.g., EUR)
outgoing_asset_codestring—Filter by destination asset (e.g., USDC)
created_at__gtedate—Orders created on or after this date (YYYY-MM-DD)
created_at__ltedate—Orders created on or before this date
sortstringdescSort direction: asc or desc
order_bystringidField to sort by: id, external_id, created_at, updated_at, status, incoming_amount, outgoing_amount

The response carries the number of orders that match the same filters, ignoring pagination, in the X-Total-Count header.

Request:

curl 'https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/?status=done&status=processing&limit=10&sort=desc&order_by=created_at' \
  --header 'X-Api-Key: YOUR_API_KEY'

Response:

[
  {
    "uuid": "od1e2f3a-4b5c-6d7e-8f9a-0b1c2d3e4f5a",
    "reference": "SG-20250115-ABCDEF",
    "legal_entity_uuid": "le1a2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "account": {
      "uuid": "ac1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
      "code": "TRD-001",
      "name": "Trading Account",
      "type": "trading"
    },
    "status": "done",
    "deposit_address": "",
    "incoming_rails": {
      "code": "sepa",
      "name": "SEPA",
      "type": "bank"
    },
    "incoming_provider": null,
    "incoming_asset_code": "EUR",
    "incoming_amount": "1000.00",
    "outgoing_rails": {
      "code": "ethereum",
      "name": "Ethereum",
      "type": "crypto"
    },
    "outgoing_provider": null,
    "outgoing_asset_code": "USDC",
    "outgoing_amount": "978.50",
    "outgoing_client_account": "0xDC1dCb46fC96C46c4F294866AFCA81874041bB2",
    "commission_amount": "15.00",
    "commission_asset_code": "EUR",
    "error_message": null,
    "created_at": "2025-01-15T10:45:00.000Z"
  }
]
The list response uses different field names than the single-order response. Notably, the list uses status (not state), incoming_rails/outgoing_rails objects, and separate incoming_amount/outgoing_amount fields.

List Response Fields

FieldTypeDescription
uuidstring (UUID)Order UUID
referencestringPayment reference
legal_entity_uuidstring (UUID)Legal entity UUID
accountobjectInternal account details
statusstringCurrent order status (new, processing, done, hold, failed, rejected, cancelled, stopped)
deposit_addressstringCrypto deposit address (empty for on-ramp)
incoming_railsobjectSource rail details (code, name, type)
incoming_providerobject | nullSource provider details
incoming_asset_codestringSource asset code
incoming_amountstring | nullSource amount, a decimal string
outgoing_railsobjectDestination rail details (code, name, type)
outgoing_providerobject | nullDestination provider details
outgoing_asset_codestringDestination asset code
outgoing_amountstring | nullDestination amount, a decimal string
outgoing_client_accountstringCustomer's destination account (IBAN or wallet address)
commission_amountstring | nullFee amount, a decimal string
commission_asset_codestring | nullAsset the commission is charged in; the same value as commission.asset in the order details
error_messagestring | nullError details if the order failed
created_atstring (ISO 8601)Order creation timestamp

List All Orders

Retrieve the orders of every customer of your partner account, newest first. Use it for operations dashboards and reconciliation without walking customers one by one.

Endpoint:

GET /v1/orders/

Query Parameters

The filters are the same as on the per-customer list, plus client_uuid to narrow the list to one customer.

ParameterTypeDefaultDescription
limitinteger100Maximum number of orders to return
offsetinteger0Number of orders to skip (for pagination)
client_uuidstring (UUID)—Only orders of this customer
statusarray—Filter by status: new, processing, done, hold, failed, rejected, cancelled, stopped
incoming_rails_codestring—Filter by source rail (e.g., sepa)
outgoing_rails_codestring—Filter by destination rail (e.g., ethereum)
incoming_asset_codestring—Filter by source asset (e.g., EUR)
outgoing_asset_codestring—Filter by destination asset (e.g., USDC)
created_at__gtedate—Orders created on or after this date (YYYY-MM-DD)
created_at__ltedate—Orders created on or before this date
sortstringdescSort direction: asc or desc
order_bystringidField to sort by: id, external_id, created_at, updated_at, status, incoming_amount, outgoing_amount

The response carries the number of orders that match the same filters, ignoring pagination, in the X-Total-Count header.

Request:

curl 'https://api.stablegate.com/v1/orders/?status=done&client_uuid=c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f&limit=10' \
  --header 'X-Api-Key: YOUR_API_KEY'

The response holds the same order list as the per-customer endpoint; the fields are described in List Response Fields.


Cancel an Order

Cancel an order that has not yet been fully processed.

Endpoint:

POST /v1/customers/{customer_uuid}/orders/{order_uuid}/cancel/

Request:

curl https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/od1e2f3a-4b5c-6d7e-8f9a-0b1c2d3e4f5a/cancel/ \
  --request POST \
  --header 'X-Api-Key: YOUR_API_KEY'

Response: 204 No Content

Only orders in new can be cancelled. Once an order has moved to processing, hold, or any terminal state, cancelling it fails.

Third-Party Payouts and the Invoice

A payout to a third party's bank account, not the customer's own, needs an invoice or a contract behind it when the order is large. Stablegate decides this once, when the order is created, and returns the result in third_party_document_required:

  • Only bank payouts to a third-party account are checked. Payouts to the customer's own bank account and to crypto addresses never need an invoice.
  • You decide whether an account belongs to the customer or to a third party: the flag is set when the account is registered, see External Accounts. The order tells the result as third_party_document_required.
  • The source amount of the order, converted to EUR, is compared with the threshold: 15 000 EUR unless your account configuration sets another value. The threshold itself does not need an invoice: an order of exactly 15 000 EUR has third_party_document_required: false.
  • When the source amount cannot be converted to EUR, the invoice is required.
  • The flag does not change after creation, even when the deposit differs from the order amount and the order is recalculated.

An order that needs an invoice is created as usual, without an error. Until the invoice is attached it is not executed automatically: after the deposit is confirmed, the order stays new with source.deposit_status: confirmed and waits for Stablegate operations, who can approve and execute it manually. Once the invoice is attached, the order is processed under the usual auto-processing rules; if the deposit has already arrived, processing resumes.

There are two ways to give the invoice:

  • After creation (recommended): upload the file with Attach an Invoice. The order must still be new.
  • At creation: pass third_party_document_uuid with the UUID of an invoice the customer already has, for example the third_party_document_uuid of a cancelled order that you create again. A document can back one active order only; the document of a cancelled or rejected order is free to use again.

Stablegate operations review the content of the document; the API does not check it.

Attach an Invoice

Uploads the invoice or contract file and attaches it to the order in one call.

Endpoint:

POST /v1/customers/{customer_uuid}/orders/{order_uuid}/third-party-document/

The request body is multipart/form-data:

FieldTypeRequiredDescription
filefileYesInvoice or contract file
namestringNoDocument name; the file name by default

Request:

curl 'https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/od3a4b5c-6d7e-8f9a-0b1c-2d3e4f5a6b7c/third-party-document/' \
  --request POST \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --form '[email protected]' \
  --form 'name=Invoice 2025-0142'

Response: 200 OK with the order details; third_party_document_uuid now holds the attached document:

{
  "uuid": "od3a4b5c-6d7e-8f9a-0b1c-2d3e4f5a6b7c",
  "reference": "SG-20250115-MNOPQR",
  "state": "new",
  "deposit_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
  "source": {
    "rail": "ethereum",
    "asset": "USDT",
    "amount": "20000.000000",
    "deposit_bank_info": null,
    "transaction_hash": null,
    "deposit_status": null
  },
  "destination": {
    "rail": "sepa",
    "asset": "EUR",
    "amount": "19320.00",
    "client_account": "FR7630006000011234567890189"
  },
  "commission": {
    "asset": "EUR",
    "amount": "10.00"
  },
  "account": {
    "uuid": "ac1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
    "code": "TRD-001",
    "name": "Trading Account",
    "type": "trading"
  },
  "error_message": null,
  "third_party_document_required": true,
  "third_party_document_uuid": "dc4b5c6d-7e8f-9a0b-1c2d-3e4f5a6b7c8d",
  "created_at": "2025-01-15T11:00:00.000Z",
  "valid_until": "2025-01-15T12:00:00.000Z"
}

The call is refused with 400 when the order does not need an invoice, already has one, or is no longer new; the file is not stored in these cases. An order that is not found answers 404.

Retries. A re-sent multipart body differs from the first one, so a retry with the same Idempotency-Key is answered with 422 instead of the cached response. After a timeout or a 5xx, read the order first: when third_party_document_uuid is set, the invoice is attached and the call must not be repeated.

Best Practices

  • Always check fees and limits before creating an order to avoid failures.
  • Use client_account_uuid instead of raw account identifiers when possible — it references a registered and verified account.
  • Store the order uuid on your side immediately after creation for tracking and reconciliation.
  • Use webhooks to receive real-time order status updates instead of polling.
  • If polling, use a reasonable interval (e.g., every 5–10 seconds) and stop when a terminal status is reached.
  • Handle all terminal states: done (success), rejected, cancelled, stopped — each may require different handling in your application. failed is not terminal: an order can move from failed back to processing, so don't treat it as the end of the line.
  • Instruct your customers to include the reference in SEPA transfers, otherwise the deposit may not be matched to the order.
  • Check third_party_document_required in the create response and attach the invoice right away when it is true; without it the order waits for Stablegate operations.

Ready to integrate?

Tell us about your use case and we will enable Partner API access for your account.
Copyright © 2026