POST /cart/checkout/invoice

Generate invoice from cart items

Parameters

NameTypeInDescription
token*
stringheaderAuthentication token for the user session

Request Body

productsarrayRequired
couponcodestring

Optional coupon code to apply to the order

Response

200
400
401
404
successboolean
dataobject
invoice_idinteger

The ID of the generated invoice

Request

curl -X POST "https://api.royalehosting.net/cart/checkout/invoice" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-organization-id: YOUR_ORG_ID" \
  -H "Content-Type: application/json" \
  -d '{}'

Response

{
  "success": true,
  "data": {
    "invoice_id": 12345
  }
}