Developers
Open app
Deposits

Card / Apple Pay / Google Pay: start an order

POST/card/order
Requires a session: Authorization: Bearer <token>Limit: 10 / 10 min per user

Creates a Crossmint order for usd (rounded to cents) and returns its embedded-checkout URL; open url in an iframe on origin. method: "apple" offers Apple Pay and card, "card" offers card and Google Pay. Rail hyperliquid delivers USDC to the user's Cash (through their deposit address); rail polygon delivers USDC to their wallet on Polygon. Every call creates a new order; an unpaid one expires on its own. url carries the order's client secret: show it only to the user it's for. Only when GET /funding reports provider: "crossmint".

Request

curl -X POST 'https://api.slay.money/api/predict/card/order' \
  -H 'Authorization: Bearer $SLAY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"usd":100,"method":"card","rail":"hyperliquid"}'

Body

usdnumberrequired
Amount in USD. The maximum can change.
methodstring
One of card, appleDefault card
railstring
One of hyperliquid, polygonDefault hyperliquid

Responses

200The order and its checkout.
orderIdstring
urlstring
Embedded-checkout URL (contains the order's client secret).
originstring
One of https://www.crossmint.com, https://staging.crossmint.com
200 response
{
  "orderId": "8f3c2a1e-…",
  "url": "https://www.crossmint.com/sdk/2024-03-05/embedded-checkout?…",
  "origin": "https://www.crossmint.com"
}
400Outside the amount limits, or a network cards can't pay to.
400 response
{
  "error": "The minimum is $8."
}
401No valid session. Sign in again.
401 response
{
  "error": "Sign in first"
}
403Suspended, or card payments aren't available for this account.
403 response
{
  "error": "Card payments aren't available yet."
}
409No wallet yet.
409 response
{
  "error": "Set up your wallet first"
}
429Rate limit reached. Wait for the window to pass.
429 response
{
  "error": "Too many requests. Wait a moment."
}
502Crossmint or the deposit address failed.
502 response
{
  "error": "Couldn't start the payment. Try again."
}