Get Order Status

Get Order Status by ID

The final step... almost there, dev =]

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. Initiate the off-ramp flow as instructed in the Pay via Kado Widget section with URL param product=SELL.

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

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

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

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

Last updated

Was this helpful?