📝
Integrate Kado
  • Kado Documentation
  • Kado Products
    • ⬆️Kado On-Ramp
    • ⬇️Kado Off-Ramp
  • Integrations
    • 🧰Integrate Kado
      • ⚒️The Widget
        • 🖼️iframe Embed (Recommended)
        • 🔗New Window/Tab
        • 🔭Widget + React Demo
        • 📱Widget + Mobile Demo
      • ⚒️The Hybrid API
        • Get Quote
        • Pay via Kado Widget
        • Get Order Status
        • Advanced
      • ⚒️Sandbox
    • ✏️Customizing Your Integration
      • ✏️Parameters
      • ✏️Mobile ACH Linking
      • ✏️Integrate Stellar SEP-24 Anchor
    • 👍Best Practices
    • 🔢Data & Analytics
  • References
    • 🚀Upcoming Features
    • ❓FAQs and Coverage
Powered by GitBook
On this page
  • Get order status
  • Using order status to initiate off-ramps

Was this helpful?

  1. Integrations
  2. Integrate Kado
  3. The Hybrid API

Get Order Status

Get Order Status by ID

PreviousPay via Kado WidgetNextAdvanced

Last updated 8 months ago

Was this helpful?

Continue by polling for the order status using Get Order endpoint. The order status endpoint contains detailed information about the order including buy/receive amount, fees, order type, order status, etc.

Sometimes, payments will fail due to a user's bank or card provider not allowing a purchase. To ensure that the user's payment was accepted, check the paymentStatus field of the response.

This field can be one of:

  1. "pending" - payment is pending confirmation. This will be the initial state, and will update to "success" or "failed":

    1. "failed" - user was not charged because their bank or card provider did not allow the purchase, or they did not pass fraud checks

    2. "success" - payment succeeded and the user was charged successfully

If paymentStatus: "success", use the transferStatus response to track the on-chain transfer status of the assets.

transferStatus can be one of:

  1. "uninitiated" - Crypto has not yet been disbursed. This is the status when payment is processing and crypto is being traded within the user's account

  2. "pending" - Crypto is in transit

  3. "failed" - Something failed during fulfillment

  4. "settled" - Crypto is settled in the user's wallet

  5. "unknown" - Crypto transit status is unknown. Reach out to Kado Support if funds don't arrive within 10 minutes

The humanStatusField is a human-friendly status message that lets either you as the integrator, or a user of your site, know where the order is in the fulfillment process.

Get order status

GET https://api.kado.money/v2/public/orders/:orderId

Path Parameters

Name
Type
Description

orderId*

String

The Order ID for the associated transaction. When using sessionId to "bring your own" order ID, that can be used here as well.

Using order status to initiate off-ramps

For wallet integrators looking for a seamless off-ramping experience, you can choose to initiate off-ramps within your application once a deposit address is created in Kado. To do so, follow these steps:

  1. After a user confirms the order in the widget, Kado will send a window.postMessage event with the orderId.

  2. Get the order status using the orderId from step 2 and the Get Order Status API endpoint.

  3. Initiate a send of the payAmount.amount from the order status response to the depositAddress in that same response.

  4. [Optional] If widget has been closed, re-open widget to https://app.kado.money/ramp/order/{orderId} to show the status of that order.

Initiate the off-ramp flow as instructed in the section with URL param product=SELL.

🧰
⚒️
Pay via Kado Widget
The final step... almost there, dev =]