{
"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"
}
}
API Reference
Submit On-chain Order
Report the on-chain orderId after submitting createOrder on an EVM or Starknet chain, so Rails can track the order and webhook you on status changes.
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
string
required
Unique API key issued manually through Telegram.
Path Parameters
string
required
The
orderRef (UUID) returned by Prepare EVM Order.Request Body
string
required
The
bytes32 order id (0x-hex) from the Gateway’s OrderCreated event.string
required
The transaction hash of your
createOrder submission.Response
string
Response state (
success).string
Human-readable message.
object
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"
}
}