Skip to main content
POST
/
v1
/
sender
/
orders
/
{id}
/
submitted
{
  "orderId": "0x9a3f1c7e2b4d5f6a8c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
  "txHash": "0xabc123def456..."
}
{
  "status": "success",
  "message": "Submission recorded — we'll poll status and webhook you on changes",
  "data": {
    "orderRef": "c7326d65-dfff-44c2-8bcc-c0756dfb6c0a",
    "gatewayId": "0x9a3f1c7e2b4d5f6a8c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
    "status": "pending"
  }
}
After your wallet submits createOrder(...) with the params from Create Order — EVM & Starknet, the Gateway emits an OrderCreated event carrying the orderId. Report that orderId (and the tx hash) back to Rails with this call. Rails is non-custodial and does not index EVM/Starknet chains, so this callback is how it learns the order exists. Once recorded, Rails polls the settlement aggregator by (chainId, orderId) and delivers a webhook to your configured URL on each settlement state change (settled, refunded, expired).

Header Parameters

API-Key
string
required
Unique API key issued manually through Telegram.

Path Parameters

id
string
required
The orderRef (UUID) returned by Prepare EVM Order.

Request Body

orderId
string
required
The bytes32 order id (0x-hex) from the Gateway’s OrderCreated event.
txHash
string
required
The transaction hash of your createOrder submission.

Response

status
string
Response state (success).
message
string
Human-readable message.
data
object
orderRef
string
Rails order id.
gatewayId
string
The recorded on-chain order id.
status
string
Lifecycle state — now pending.
An order can only be submitted once, and only while in the initiated state. Re-submitting returns 400.

Example Payloads

{
  "orderId": "0x9a3f1c7e2b4d5f6a8c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
  "txHash": "0xabc123def456..."
}
{
  "status": "success",
  "message": "Submission recorded — we'll poll status and webhook you on changes",
  "data": {
    "orderRef": "c7326d65-dfff-44c2-8bcc-c0756dfb6c0a",
    "gatewayId": "0x9a3f1c7e2b4d5f6a8c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
    "status": "pending"
  }
}