---
title: "Create Payment Invoice"
method: POST
path: "/payment-intent/api/v1/direct/eInvoice"
---

# Create Payment Invoice

`POST /payment-intent/api/v1/direct/eInvoice`

API to create a Payment Invoice

## Request body

- object
  - `amount` number, double, required — Amount for which payment invoice is created. Amount must be greater than 0.01. Must be equal to [eInvoiceItems.price * eInvoiceItems.quantity]
  - `currency` 'SAR' | 'EGP' | 'AED' | 'QAR' | 'OMR' | 'BHD' | 'KWD' | 'USD' | 'GBP' | 'EUR', required — Currency for which payment invoice is created. Currency must be 3 characters in length. Acceptable currencies are: SAR, AED
  - `customer` object, required — Customer Object
    - `name` string, required — Customer Name
    - `email` string, required — Email of customer. One of email or phoneNumber must be present.
    - `phoneCountryCode` string, required — Country code of customer's phone number eg: "+966". If phoneNumber is passed, phoneCountryCode must be passed.
    - `phoneNumber` string, required — Customer's phone number eg: "511111111". If phoneCountryCode is passed, phoneNumber must be passed. One of email or phoneNumber must be present.
  - `eInvoiceDetails` object, required — e-Invoice details object
    - `eInvoiceItems` object[], required — List of e-Invoice items
      - `eInvoiceItemId` string — e-Invoice item ID
      - `description` string — Item description. If not set in request, it is set to null automatically and the value is returned in response.
      - `price` number, double, required — Item Price
      - `quantity` integer, required — Quantity of item
      - `itemDiscountType` 'Amount' | 'Percentage' — Type of discount applied on item
      - `taxType` 'Amount' | 'Percentage' — Type of tax levied on item
      - `total` number, double, required — Total price including tax levied. Must be equal to [eInvoiceItems.price * eInvoiceItems.quantity]
      - `priceWithDiscount` number, double — Item price after discount is applied. If not set in request, it is set to value of eInvoiceItems.price automatically and the value is returned in response
      - `priceTax` number, double — Tax on Item Price. If not set in request, it is set to zero automatically and the value is returned in response.
      - `priceTotal` number, double — Total Price inclusive of Tax. If not set in request, it is set to value of eInvoiceItems.price automatically and the value is returned in response.
      - `sku` string — Item SKU. If not set in request, it is set to null automatically and the value is returned in response.
      - `itemDiscount` number, double — Discount applied on item. If not set in request, it is set to null automatically and the value is returned in response.
      - `tax` number, double — Tax on item. If not set in request, it is set to null automatically and the value is returned in response.
      - `totalWithoutTax` number, double — Total price of item without tax. If not set in request, it is set to value of amount automatically and the value is returned in response.
      - `totalTax` number, double — Tax for the item. If not set in request, it is set to zero automatically and the value is returned in response.
    - `subtotal` number, double, required — Subtotal inclusive of tax. Must be equal to [eInvoiceItems.price * eInvoiceItems.quantity]
    - `grandTotal` number, double, required — Grand Total. Must be equal to [eInvoiceItems.price * eInvoiceItems.quantity]. Must be same as amount.
    - `extraChargesType` 'Amount' | 'Percentage' — Type of extra charges levied
    - `invoiceDiscountType` 'Amount' | 'Percentage' — Type of discount applied on invoice
    - `type` 'Detailed' | 'Quick' — Type of eInvoice. If not set in request, it is set to "Detailed" automatically and the value is returned in response.
    - `collectCustomersBillingShippingAddress` boolean — Flag indicating to capture Customer's billing and shipping addresses. If not set in request, it is set to false automatically and the value is returned in response
    - `preAuthorizeAmount` boolean — Flag indicating whether to preauthorize the amount. If not set in request, it is set to false automatically and the value is returned in response.
    - `subtotalWithoutTax` number, double — Subtotal exclusive of tax. Must be equal to [eInvoiceItems.price * eInvoiceItems.quantity] if passed. If not set in request, it is set to [eInvoiceItems.price * eInvoiceItems.quantity] value automatically and the value is returned in response.
    - `subtotalTax` number, double — Subtotal tax. If not set in request, it is set to zero automatically and the value is returned in response
    - `extraCharges` number, double — Extra charges levied. If not set in request, it is set to null automatically and the value is returned in response.
    - `chargeDescription` string — Description of charge levied. If not set in request, it is set to null automatically and the value is returned in response.
    - `merchantReferenceId` string — The merchant account identifier for which the payment invoice is created.
    - `callbackUrl` string
    - `invoiceDiscount` number, double — Discount applied on invoice. If not set in request, it is set to null automatically and the value is returned in response.
    - `language` 'EN' | 'AR' — Language to be displayed in Payment Page. If not set in request, it is set to "EN" automatically and the value is returned in response.
  - `expiryDate` string, date — Expiry date of payment invoice. If not set in request, it is set to a date of 30 days after activation date automatically and the value is returned in response. If activationDate is not set, the date of 30 days after payment invoice creation date is set as expiry date and it is returned in response.
  - `activationDate` string, date — Activation date of payment invoice. If not set in request, it is set to null the value is returned in response.

## Response `201`

201

- object
  - `paymentIntent` object
    - `invoiceId` string
    - `customer` object
      - `customerId` string
      - `email` string
      - `phoneNumber` string
      - `phoneCountryCode` string
      - `name` string
      - `updatedBy` unknown
      - `updatedDate` string
      - `addresses` unknown[]
        - unknown
    - `eInvoiceDetails` object
      - `type` string
      - `collectCustomersBillingShippingAddress` boolean
      - `preAuthorizeAmount` boolean
      - `subtotalWithoutTax` integer
      - `subtotalTax` integer
      - `subtotal` integer
      - `grandTotal` integer
      - `extraCharges` integer
      - `extraChargesType` string
      - `chargeDescription` string
      - `merchantReferenceId` string
      - `invoiceDiscount` integer
      - `invoiceDiscountType` string
      - `language` string
      - `eInvoiceItems` object[]
        - `eInvoiceItemId` string
        - `description` string
        - `price` integer
        - `priceWithDiscount` integer
        - `priceTax` integer
        - `priceTotal` integer
        - `quantity` integer
        - `sku` string
        - `itemDiscount` integer
        - `itemDiscountType` string
        - `tax` integer
        - `taxType` string
        - `totalWithoutTax` integer
        - `totalTax` integer
        - `total` integer
    - `eInvoiceSentinvoices` unknown[]
      - unknown
    - `paymentIntentId` string
    - `number` string
    - `urlSlug` string
    - `type` string
    - `amount` integer
    - `currency` string
    - `merchantId` string
    - `merchantPublicKey` string
    - `expiryDate` string
    - `activationDate` string
    - `status` string
    - `customerId` string
    - `eInvoiceUploadId` unknown
    - `staticPayinvoiceId` unknown
    - `subscriptionId` unknown
    - `subscriptionOccurrenceId` unknown
    - `orders` unknown[]
      - unknown
    - `isPending` boolean
    - `createdDate` string
    - `createdBy` string
    - `updatedDate` unknown
    - `updatedBy` unknown
  - `termsAndConditions` unknown
  - `responseMessage` string
  - `detailedResponseMessage` string
  - `language` string
  - `responseCode` string
  - `detailedResponseCode` string

## Other responses

- `400` — 400

---

[API](https://skmtc.dev/geidea/apis/checkout-v2.md) · [All operations](https://skmtc.dev/geidea/apis/checkout-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/geidea/checkout-v2/revisions/873e534eeb01/schema)
