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
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
Unique API key issued manually through Telegram.
Path Parameters
The
orderRef (UUID) returned by Prepare EVM Order.Request Body
The
bytes32 order id (0x-hex) from the Gateway’s OrderCreated event.The transaction hash of your
createOrder submission.Response
Response state (
success).Human-readable message.
An order can only be submitted once, and only while in the
initiated state.
Re-submitting returns 400.