Confirm Order

Overview

This endpoint confirms an order based on the provided order ID. It is used to transition an order from a pending state to a confirmed state, indicating that the order is being processed.

HTTP Request

PUT /order/confirm

Request Body

To confirm an order, provide the order ID in the request body as a JSON object.

Request JSON Object

Field

Type

Description

orderId

string

The unique identifier for the order to be confirmed.

Sample Request Body

{
  "orderId": "xNQolCGOWz6s79hcmyKE"
}

Response

The response to a successful order confirmation includes a message indicating the order was confirmed successfully.

Successful Response

{
    "message": "Order confirmed successfully",
    "data": {
        "id": "Wu8EAmysBelFSkOf0nfb",
        "state": "confirmed"
    }
}

Status Codes

The endpoint returns the following status codes:

Status Code

Description

200

OK - The order has been confirmed successfully.

400

Bad Request - The request body does not contain a valid orderId.

404

Not Found - The provided orderId does not correspond to any pending order.

500

Internal Server Error - We had a problem with our server. Try again later.

Code

Message

Fix

404

Not Found

419

Expired

400

You have insufficient funds in your wallet to create this order

Example Request

Using curl to make a request to confirm an order:

curl -X PUT "{{base_url}}/order/confirm" \
     -H "Content-Type: application/json" \
     -d '{"orderId": "xNQolCGOWz6s79hcmyKE"}'

Notes

  • Ensure that the orderId provided in the request body is correct and corresponds to an existing order that can be confirmed.

  • This operation should only be performed once per order. Repeated confirmations will fail automatically by the system

You will receive the order via your provided webhook address. Read more

Last updated