# Create a new order

Creates an order for checkout. To check complete list of API validations, click here.

Endpoint: POST /orders
Version: 1.0.0
Security: JWT

## Request fields (application/json):

  - `customer_id` (string, required)
    The unique identifier of customer linked to order.
    Example: "cust_E602dMzgjpDC"

  - `document_id` (string)
    The unique identifier of document linked to order. This document entity should contain the required documents to process incoming payments. Refer this [Document](#tag/Document) entity for more details.
    Example: "doc_nYUqLpuYQ0M8"

  - `currency` (string, required)
    The currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. Supported currencies: USD,EUR and GBP.
    Example: "USD"

  - `amount` (number, required)
    The amount you want to receive, a positive integer representing the smallest currency unit. For example, if the amount is $299.00, then pass 29900 in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to represent an amount of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, for amount ￥295, pass the value as 295.
    Example: 1000

  - `purpose_code` (string)
    Purpose code for why you want to receive this payment
    Example: "P1401"

  - `invoice_number` (string)
    Number/Id of the invoice submitted with order.
    Example: "RG12FF590"

  - `invoice_description` (string)
    Description about the invoice submitted with order
    Example: "Payment requested for services provided"

  - `invoice_amount` (number)
    The amount in cents for which invoice was generated. It can be more  than the amount requested in this order
    Example: 1000

  - `reference_number` (string)
    optional identifier to be sent for reconciliations
    Example: "R0001"

  - `price_id` (string)
    The unique identifier of 'Price' entity linked to the order. This is the referral fee for this order.  Note: price_id is only applicable for platform businesses.
    Example: "price_E602dMzgjpDC"

  - `product` (object)
    Details of the product that the payment is related to.

  - `product.name` (string, required)
    Name of the product

  - `product.description` (string)
    Description of the product

  - `notes` (object,null)
    Optional key-value pairs for attaching custom metadata (e.g. invoice references, project codes). Keys must be strings and cannot collide with reserved field names. If your business has custom field rules configured (e.g. enum constraints), values are validated against those rules. Each key appears as a separate column in CSV report exports, with corresponding values populating the rows.

  - `bank_account_details` (object)
    Optional bank account details to associate with the customer for this order. When provided, the bank account will be linked to the customer and associated with this order. Either bic_primary or bic_secondary must be provided when including this field.
    Example: {"account_number":"1234567890","bic_primary":"HDFCINBBDEL","bank_customer_id":"7189204715"}

  - `bank_account_details.account_number` (string, required)
    The bank account number
    Example: "1234567890"

  - `bank_account_details.bic_primary` (string)
    SWIFT code for the bank account. Will be null if not provided in the request.
    Example: "HDFCINBBDEL"

  - `bank_account_details.bic_secondary` (string)
    Local routing code for the bank account like IFSC. Will be null if not provided in the request.
    Example: "HDFC0001097"

  - `bank_account_details.bank_customer_id` (string)
    Optional bank customer identifier provided by the bank
    Example: "7189204715"

  - `payment_methods` (array)
    Array of payment methods that should be available for the customer on the checkout page. This field allows you to control which payment options your customers can use to complete the payment. You can specify one or multiple payment methods in the array.
    Enum: "bank_transfer", "pay_via_bank", "card"

## Response 201 fields (application/json):

  - `id` (string)
    The unique identifier for the order.
    Example: "order_678a4c88hpAjf"

  - `customer_id` (string)
    The unique identifier of customer linked to order.
    Example: "cust_E602dMzgjpDC"

  - `document_id` (string)
    The unique identifier of document linked to order. This document entity should contain the required documents to process incoming payments. Refer this [Document](#tag/Document) entity for more details.
    Example: "doc_nYUqLpuYQ0M8"

  - `status` (string)
    The status of the Order.
    Enum: "active", "paid", "failed", "action_required", "under_review", "expired"

  - `currency` (string)
    The currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. Supported currencies: USD,EUR and GBP.
    Example: "USD"

  - `amount` (number)
    The amount you want to receive, a positive integer representing the smallest currency unit. For example, if the amount is $299.00, then pass 29900 in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to represent an amount of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, for amount ￥295, pass the value as 295.
    Example: 1000

  - `purpose_code` (string)
    Purpose code for why you want to receive this payment
    Example: "P1401"

  - `invoice_number` (string)
    Number/Id of the invoice submitted with order.
    Example: "RG12FF590"

  - `invoice_description` (string)
    Description about the invoice submitted with order
    Example: "Payment requested for services provided"

  - `invoice_amount` (number)
    The amount in cents for which invoice was generated. It can be more  than the amount requested in this order
    Example: 1000

  - `reference_number` (string)
    optional identifier to be sent for reconciliations
    Example: "R0001"

  - `price_id` (string)
    The unique identifier of 'Price' entity linked to the order. This is the referral fee for this order.  Note: price_id is only applicable for platform businesses.
    Example: "price_E602dMzgjpDC"

  - `product` (object)
    Details of the product that the payment is related to.

  - `notes` (object,null)
    Optional key-value pairs for attaching custom metadata (e.g. invoice references, project codes). Keys must be strings and cannot collide with reserved field names. If your business has custom field rules configured (e.g. enum constraints), values are validated against those rules. Each key appears as a separate column in CSV report exports, with corresponding values populating the rows.

  - `bank_account_details` (object)
    Optional bank account details to associate with the customer for this order. When provided, the bank account will be linked to the customer and associated with this order. Either bic_primary or bic_secondary must be provided when including this field.
    Example: {"account_number":"1234567890","bic_primary":"HDFCINBBDEL","bic_secondary":null,"bank_customer_id":"7189204715"}

  - `bank_account_details.account_number` (string, required)
    The bank account number
    Example: "1234567890"

  - `bank_account_details.bic_primary` (string,null)
    SWIFT code for the bank account. Will be null if not provided in the request.
    Example: "HDFCINBBDEL"

  - `bank_account_details.bic_secondary` (string,null)
    Local routing code for the bank account like IFSC. Will be null if not provided in the request.
    Example: "HDFC0001097"

  - `bank_account_details.bank_customer_id` (string,null)
    Optional bank customer identifier provided by the bank
    Example: "7189204715"

  - `payment_methods` (array)
    Array of payment methods that should be available for the customer on the checkout page. This field allows you to control which payment options your customers can use to complete the payment. You can specify one or multiple payment methods in the array.
    Enum: "bank_transfer", "pay_via_bank", "card"

  - `created_at` (string)
    Timestamp representing when the order was created
    Example: "2021-06-01T12:00:00Z"

  - `updated_at` (string)
    Timestamp representing when the order was last updated
    Example: "2021-06-01T12:00:00Z"

  - `rfi_documents` (array)
    List of required documents for RFI (Request for Information). This field is only present when the order status is 'action_required', indicating that sanction screening has been triggered and additional documents are required to proceed with the payment.
    Example: [{"rfi_doc_id":"rfidoc_123","name":"Passport"},{"rfi_doc_id":"rfidoc_456","name":"Proof of Address"}]

  - `rfi_documents.rfi_doc_id` (string, required)
    Unique identifier for the required RFI document
    Example: "rfidoc_123"

  - `rfi_documents.name` (string, required)
    Name/type of the required document
    Example: "Passport"

## Response 400 fields (application/json):

  - `error` (string)
    Enum: "Bad Request"

  - `message` (string)
    Error message.
    Example: "Currency not supported"


