Commerce Engine is now in beta. We're working hard to make it better for you.
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/payments/juspay/create-order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"order_number": "<string>",
"return_url": "<string>"
}'
{
"message": "<string>",
"success": true,
"content": {
"data": {
"id": "<string>",
"udf10": "<string>",
"udf9": "<string>",
"udf8": "<string>",
"udf7": "<string>",
"udf6": "<string>",
"udf5": "<string>",
"udf4": "<string>",
"udf3": "<string>",
"udf2": "<string>",
"udf1": "<string>",
"status_id": "<string>",
"status": "<string>",
"return_url": "<string>",
"refunded": false,
"product_id": "<string>",
"payment_links": {
"web": "<string>",
"mobile": "<string>",
"iframe": "<string>"
},
"order_id": "<string>",
"merchant_id": "<string>",
"juspay": {
"client_auth_token": "<string>",
"client_auth_token_expiry": "<string>"
},
"date_created": "<string>",
"customer_phone": "<string>",
"customer_id": "<string>",
"customer_email": "<string>",
"currency": "<string>",
"amount_refunded": 123,
"amount": 123
}
}
}
Creates an order in the Juspay system and fetches the corresponding client_auth_token. To be used for Express Checkout integration.
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/payments/juspay/create-order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"order_number": "<string>",
"return_url": "<string>"
}'
{
"message": "<string>",
"success": true,
"content": {
"data": {
"id": "<string>",
"udf10": "<string>",
"udf9": "<string>",
"udf8": "<string>",
"udf7": "<string>",
"udf6": "<string>",
"udf5": "<string>",
"udf4": "<string>",
"udf3": "<string>",
"udf2": "<string>",
"udf1": "<string>",
"status_id": "<string>",
"status": "<string>",
"return_url": "<string>",
"refunded": false,
"product_id": "<string>",
"payment_links": {
"web": "<string>",
"mobile": "<string>",
"iframe": "<string>"
},
"order_id": "<string>",
"merchant_id": "<string>",
"juspay": {
"client_auth_token": "<string>",
"client_auth_token_expiry": "<string>"
},
"date_created": "<string>",
"customer_phone": "<string>",
"customer_id": "<string>",
"customer_email": "<string>",
"currency": "<string>",
"amount_refunded": 123,
"amount": 123
}
}
}
Access token
OK
The response is of type object
.