Confirm Order API
The API is used to confirm the orders created by the “Create Order API“ only when payment method is “ONLINE”, No need to call this API in “COD” orders. Merchant partners must call this API to confirm the orders created by the Create Order API in the previous step.
Depending upon the payment_method chosen in the Create Order API additional information might be needed from the merchant partner to complete this API call.
If the payment_method is ONLINE, 1mg will check the status of the payment for this order in the merchant partner system before confirming the order. Merchants need to provide 1mg with a set of APIs to enable 1mg to check the status of the payment, refund payment, etc in the merchant partner system. These APIs are explained in the payment APIs section for the main doc.
Path Parameters
- merchant_id string required
- merchant_confirm_1mg_id string required
Header Parameters
- X-Access-Key string
Default value:
1mg_client_access_key
- application/json
Request Body
- merchant_order_id string
- order_id string
- 200
- 500
OK
Response Headers
- application/json
- Schema
- Example (from schema)
- Example
Schema
- object
{}
{
"data": {
"merchant_order_id": "2333asa3s25224",
"order_id": "PO29523371880004"
},
"partial_complete": false,
"is_success": true,
"status_code": 200
}
Internal Server Error
Response Headers
- application/json
- Schema
- Example (from schema)
- example-0
- example-1
Schema
- object
{}
Order Not Found
{
"is_success": false,
"status_code": 500,
"error": {
"message": "Order not found",
"errors": [
{
"message": "Order not found"
}
]
}
}
Order Cancelled Before Confirmation
{
"is_success": false,
"status_code": 500,
"error": {
"message": "Map payment to order operation failed",
"errors": [
{
"message": "Map payment to order operation failed"
}
]
}
}
PUT /api/v4/merchants/:merchant_id/orders/:merchant_confirm_1mg_id/confirm
Authorization
name: bearerAuthtype: httpscheme: bearer
Request
Request
curl -L -X PUT 'https://jupiterapi.1mg.com/api/v4/merchants/:merchant_id/orders/:merchant_confirm_1mg_id/confirm' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"merchant_order_id": "2333asa3s25224",
"order_id": "PO29523371880004"
}'
curl -L -X PUT 'https://jupiterapi.1mg.com/api/v4/merchants/:merchant_id/orders/:merchant_confirm_1mg_id/confirm' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"merchant_order_id": "2333asa3s25224",
"order_id": "PO29523371880004"
}'
curl -L -X PUT 'https://jupiterapi.1mg.com/api/v4/merchants/:merchant_id/orders/:merchant_confirm_1mg_id/confirm' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"merchant_order_id": "2333asa3s25224",
"order_id": "PO29523371880004"
}'
curl -L -X PUT 'https://jupiterapi.1mg.com/api/v4/merchants/:merchant_id/orders/:merchant_confirm_1mg_id/confirm' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"merchant_order_id": "2333asa3s25224",
"order_id": "PO29523371880004"
}'
curl -L -X PUT 'https://jupiterapi.1mg.com/api/v4/merchants/:merchant_id/orders/:merchant_confirm_1mg_id/confirm' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"merchant_order_id": "2333asa3s25224",
"order_id": "PO29523371880004"
}'
curl -L -X PUT 'https://jupiterapi.1mg.com/api/v4/merchants/:merchant_id/orders/:merchant_confirm_1mg_id/confirm' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"merchant_order_id": "2333asa3s25224",
"order_id": "PO29523371880004"
}'
curl -L -X PUT 'https://jupiterapi.1mg.com/api/v4/merchants/:merchant_id/orders/:merchant_confirm_1mg_id/confirm' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"merchant_order_id": "2333asa3s25224",
"order_id": "PO29523371880004"
}'
curl -L -X PUT 'https://jupiterapi.1mg.com/api/v4/merchants/:merchant_id/orders/:merchant_confirm_1mg_id/confirm' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"merchant_order_id": "2333asa3s25224",
"order_id": "PO29523371880004"
}'
curl -L -X PUT 'https://jupiterapi.1mg.com/api/v4/merchants/:merchant_id/orders/:merchant_confirm_1mg_id/confirm' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"merchant_order_id": "2333asa3s25224",
"order_id": "PO29523371880004"
}'