Get order and transactions
Retrieves order details along with associated transactions
GET
/orders/{orderId}
Retrieves order details along with associated transactions
Path Parameters
orderId
string
required
path
Unique order identifier
Example:
"5392f7a7-d472-4d6b-9848-bd07117fb82d"Responses
200
Order and transactions retrieved successfully
application/jsonsuccess
boolean
REQUIRED
message
string
REQUIRED
data
object
REQUIRED
order
unknown
REQUIRED
depositTxs
object[]
REQUIRED
Deposit transactions (payment from user)
Array of:
orderId
string (uuid)
REQUIRED
Associated order ID
chain
number
REQUIRED
Chain where transaction occurred
from
string | null
Sender address (can be null)
txHash
string
REQUIRED
Transaction hash
amount
string
REQUIRED
Transaction amount
createdAt
number
REQUIRED
Transaction timestamp
relayTxs
object[]
REQUIRED
Cross-chain relay transactions
Array of:
orderId
string (uuid)
REQUIRED
Associated order ID
chain
number
REQUIRED
Chain where relay occurred
txHash
string
REQUIRED
Relay transaction hash
status
string
REQUIRED
Relay transaction status
Enum:
pending, success, failure, refund, delayed, waitingcreatedAt
number
REQUIRED
Relay timestamp
executeTx
unknown | null
REQUIRED
refundTxs
object[]
REQUIRED
Refund transactions if order failed
Array of:
orderId
string (uuid)
REQUIRED
Associated order ID
chain
number
REQUIRED
Chain where refund occurred
txHash
string
REQUIRED
Refund transaction hash
amount
string
REQUIRED
Refunded amount
status
string
REQUIRED
Refund status
Enum:
success, failurecreatedAt
number
REQUIRED
Refund timestamp
points
number | null
REQUIRED
Points awarded for this order (only present when order status is executed)
statusCode
number
REQUIRED
400
Bad request
404
Order not found
curl -X GET 'https://mainnet.anyspend.com/orders/5392f7a7-d472-4d6b-9848-bd07117fb82d'
const response = await fetch('https://mainnet.anyspend.com/orders/5392f7a7-d472-4d6b-9848-bd07117fb82d', {
method: 'GET'
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://mainnet.anyspend.com/orders/5392f7a7-d472-4d6b-9848-bd07117fb82d')
print(response.json())
200
Response
{
"success": true,
"message": "Get order and transactions successfully",
"data": {
"order": {
"id": "5392f7a7-d472-4d6b-9848-bd07117fb82d",
"recipientAddress": "0xb34facb90a200251318e8841c05102366f2158cf",
"globalAddress": "0xa640beaa78eeb64bb269f2baf8202b9a7316e123",
"srcChain": 8453,
"dstChain": 8453,
"srcTokenAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"dstTokenAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"srcAmount": "93354000",
"status": "executed",
"errorDetails": null,
"createdAt": 1752505794679,
"expiredAt": 1752506694679,
"onrampMetadata": {
"country": "US",
"vendor": "stripe-web2",
"paymentMethod": "",
"redirectUrl": "https://www.anyspend.com",
"stripeAmountInCents": 9900
},
"creatorAddress": "0xb34facb90a200251318e8841c05102366f2158cf",
"partnerId": null,
"oneClickBuyUrl": null,
"stripePaymentIntentId": "pi_3Rko0sJnoDg53PsP0PDLsHkR",
"settlement": {
"actualDstAmount": "93354000"
},
"type": "swap",
"payload": {
"expectedDstAmount": "99000000"
},
"metadata": {
"srcToken": {
"chainId": 8453,
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"metadata": {
"logoURI": "https://polygonscan.com/token/images/usdc_32.png"
}
},
"dstToken": {
"chainId": 8453,
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"metadata": {
"logoURI": "https://coin-images.coingecko.com/coins/images/6319/large/usdc.png?1696506694"
}
}
}
},
"depositTxs": [
{
"orderId": "5392f7a7-d472-4d6b-9848-bd07117fb82d",
"chain": 8453,
"from": "0xa7539e73700B1726aBA29526606442A491Ef5747",
"txHash": "0x60ece99a645201668d20db6775a6b3d30967433ff0750b356cdad46d3e13f9c8",
"amount": "93354000",
"createdAt": 1752505811105
}
],
"relayTxs": [
{
"orderId": "5392f7a7-d472-4d6b-9848-bd07117fb82d",
"chain": 8453,
"txHash": "0x9df917e14bb089f74763d1d2662761d75c97a5a068b8a9e411c3d384c9c40d19",
"status": "success",
"createdAt": 1752505817654
}
],
"executeTx": null,
"refundTxs": [],
"points": 100
},
"statusCode": 200
}
GET
/orders/{orderId}