Create Checkout
https://api.nomod.com/v1/checkoutCreate checkout.
curl -X POST 'https://api.nomod.com/v1/checkout' \
-H 'X-API-KEY: $NOMOD_HOSTED_CHECKOUT_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"reference_id": "string",
"amount": "0.00",
"currency": "string",
"items": [
{
"item_id": "string",
"name": "string",
"quantity": 1,
"unit_amount": "0.00",
"discount_type": "flat",
"discount_amount": "0.00",
"total_amount": "0.00",
"net_amount": "0.00"
}
],
"discount": "0.00",
"customer": {
"first_name": "string",
"last_name": "string",
"email": "string",
"phone_number": "string",
"business_name": ""
},
"success_url": "https://example.com",
"failure_url": "https://example.com",
"cancelled_url": "https://example.com",
"metadata": {}
}'Request body
reference_idstringrequiredA unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar. Merchants can use it to reconcile the session with their internal systems
Max length: 100
amountstring <decimal>requiredThe total payable amount (after applying discounts) in the main currency unit (e.g., USD, AED)
currencystringrequiredCurrency code (ISO 4217 format, e.g., USD, INR, AED)
Max length: 3
itemsarrayrequiredA list of items the customer is buying, including item-level details
discountstring <decimal>The total discount amount applied to the order. Provide the value in the main currency unit (e.g., USD, AED)
customerobjectCustomer object with customer-related details
success_urlstring <uri>requiredURL where the customer should be redirected after payment success
failure_urlstring <uri>requiredURL where the customer should be redirected if the payment fails
cancelled_urlstring <uri>requiredURL where the customer should be redirected if they cancel payment
metadataobjectA set of key-value pairs that merchants can attach to an object. This can be useful for storing additional information about the object in a structured format.Maximum of 40 pairs allowed. Keys must be alphanumeric and cannot contain square brackets ([ and ]). Keys must not exceed 24 characters, and values must not exceed 512 characters.
Responses
idstring <uuid>requiredread-onlyurlstring <uri>requiredThe URL to the Checkout Session. Redirect customers to this URL to take them to the Hosted Checkout page
statusobjectrequiredread-onlyStatus of the session: created, cancelled, expired, paid
amountnumber <double>requiredread-onlyThe total payable amount (after applying discounts) in the main currency unit (e.g., USD, AED)
discountnumber <double>requiredread-onlyThe total discount amount applied to the order. Provide the value in the main currency unit (e.g., USD, AED)
currencystringrequiredCurrency code (ISO 4217 format, e.g., USD, INR, AED)
Max length: 3
reference_idstringrequiredread-onlyA unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and merchants can use it to reconcile the session with their internal systems
created_atstring <date-time>requiredISO 8601 timestamp when the checkout session was created
itemsarrayrequiredA list of items the customer is buying, including item-level details
customerobjectrequiredCustomer object with customer-related details
metadataobjectrequiredread-onlyA set of key-value pairs that merchants can attach to an object. This can be useful for storing additional information about the object in a structured format.Maximum of 40 pairs allowed. Keys must be alphanumeric and cannot contain square brackets ([ and ]). Keys must not exceed 24 characters, and values must not exceed 512 characters.
chargesarrayrequiredread-onlyList of charges associated with the checkout
Example response
{
"id": "00000000-0000-0000-0000-000000000000",
"url": "https://example.com",
"status": "paid",
"amount": 0,
"discount": 0,
"currency": "string",
"reference_id": "string",
"created_at": "2026-01-01T00:00:00Z",
"items": [
{
"item_id": "string",
"name": "string",
"quantity": 1,
"unit_amount": "0.00",
"discount_type": "flat",
"discount_amount": "0.00",
"total_amount": "0.00",
"net_amount": "0.00"
}
],
"customer": {
"first_name": "",
"last_name": "",
"business_name": "",
"email": "",
"phone_number": ""
},
"metadata": {},
"charges": [
{
"id": "00000000-0000-0000-0000-000000000000",
"amount": 0,
"payment_time": "00000000-0000-0000-0000-000000000000",
"payment_method": "cash",
"status": "authorised"
}
]
}