---
title: "Create an Invoice"
method: POST
path: "/"
---

# Create an Invoice

`POST /`

## Request

- Base URL: `https://api.tap.company/v2/invoices`
- URL: `https://api.tap.company/v2/invoices/`
- Auth: API key in header `Authorization`

## Headers

- `lang_code` string

## Request body

- object
  - `draft` boolean: Merchant can save the invoice without creating the actual invoice. The default value will be false.
  - `due` number, double, required: Invoice Due Date; measured in seconds since the Unix epoch.
  - `expiry` number, double, required: Invoice Expiry Date; measured in seconds since the Unix epoch.
  - `description` string: Invoice description.
  - `mode` string: Invoice mode- how the invoice page is showed to customers (INVOICE - Open invoice page, PAY - Open payment page, INVOICEPAY - Open invoice page and payment page.
  - `note` string: It will be added to the invoice footer.
  - `notifications` object: Notification object. By default, the invoice will be dispatched automatically.
    - `channels` string[]: Notifications channels (SMS , EMAIL)
    - `dispatch` boolean: Merchant can specify the field, dispatch the invoice or not.
  - `currencies` string[]: Currencies object. If you pass a null or empty value for the charge currency object, all available currencies will be displayed.
  - `metadata` object: Set of key/value pairs that you can attach to an object. It can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
    - `udf1` string
    - `udf2` string
    - `udf3` string
  - `charge` object: Charge Object.
    - `receipt` object: Payment Receipt object.
      - `email` boolean: Receipt email to customer.
      - `sms` boolean: Receipt SMS to customer.
    - `statement_descriptor` string: Payer Statement Descriptor.
  - `customer` object, required: Customer object; either customer ID or customer information is required.
    - `id` string: Customer Unique Identifier, Provided by Tap.
    - `first_name` string: Customer first name.
    - `last_name` string: Customer last name.
    - `email` string: Customer email.
    - `phone` object: Customer phone object.
      - `country_code` string: Phone country code, (sample - 965)
      - `number` string: Phone number
  - `statement_descriptor` string
  - `order` object, required: Order object; either order ID or order information is required
    - `amount` number, float, required: Order amount.
    - `currency` string, required: Order currency, it will be the invoice currency.
    - `items` object[], required: Item Object.
      - `product_id` string: Product id
      - `amount` number, float, required: Item amount
      - `currency` string, required: Item currency
      - `name` string
      - `description` string: Item description
      - `discount` object
      - `quantity` integer, required: item quantity
    - `shipping` object
    - `tax` unknown[]: List of taxes.
      - unknown
  - `payment_methods` string[]: Charge payment method object. If you pass a null or empty value, then all available payment methods will be displayed and If you want to send link with specific payment method you can add "BENEFIT","VISA", "MASTERCARD", "APPLE_PAY"
  - `post` object: Post url object.
    - `url` string: Once invoice paid, invoice response will be posted to this url.
  - `redirect` object: Redirect url object.
    - `url` string: Once invoice paid, Payer will be redirected to this url.
  - `reference` object: Merchant reference object.
    - `invoice` string
    - `order` string
  - `retry_for_captured` boolean: When set to false, the default behavior shifts, redirecting customers to the merchant's designated "redirect.url" instead of the invoice page upon an unsuccessful transaction.
  - `payment_provider` object: Information about the payment provider associated with this invoice
    - `technology` object: Information about the payment provider technology associated with this invoice
      - `id` string: The technology ID provided by Tap

## Response `200`

200

- object
  - `object` string
  - `live_mode` boolean
  - `api_version` string
  - `id` string
  - `method` string
  - `status` string
  - `amount` integer
  - `currency` string
  - `created` integer
  - `updated` integer
  - `url` string
  - `draft` boolean
  - `due` integer
  - `expiry` integer
  - `mode` string
  - `description` string
  - `description_id` string
  - `invoice_number` string
  - `frequency` string
  - `lang_code` string
  - `metadata` object
    - `udf1` string
    - `udf2` string
    - `udf3` string
  - `notifications` object
    - `dispatch` boolean
    - `channels` string[]
  - `order` object
    - `object` string
    - `id` string
    - `live_mode` boolean
    - `api_version` string
    - `currency` string
    - `amount` integer
    - `status` string
    - `items` object[]
      - `id` string
      - `product_id` string
      - `name` string
      - `description` string
      - `image` string
      - `currency` string
      - `amount` integer
      - `quantity` integer
      - `discount` object
        - `type` string
        - `value` integer
      - `merchant_id` string
    - `tax` object[]
      - `id` string
      - `name` string
      - `description` string
      - `rate` object
        - `type` string
        - `value` integer
    - `shipping` object
      - `id` string
      - `currency` string
      - `amount` integer
      - `provider` string
      - `service` string
      - `description` string
    - `itemAmount` integer
    - `created` integer
    - `merchant_id` string
  - `reference` object
    - `invoice` string
    - `order` string
  - `customer` object
    - `id` string
    - `first_name` string
    - `middle_name` string
    - `last_name` string
    - `email` string
    - `phone` object
      - `number` string
      - `country_code` string
  - `post` object
    - `url` string
  - `redirect` object
    - `url` string
  - `charge` object
    - `receipt` object
      - `email` boolean
      - `sms` boolean
    - `statement_descriptor` string
  - `track` object
    - `id` string
    - `object` string
    - `status` string
    - `updated` integer
    - `activity` object[]
      - `id` string
      - `object` string
      - `type` string
      - `created` integer
  - `payment_methods` string[]
  - `currencies` string[]
  - `savecard` boolean
  - `note` string
  - `merchant_id` string

## Other responses

- `400`: 400

---

[API](https://skmtc.dev/tap/apis/invoices.md) - [All operations](https://skmtc.dev/tap/apis/invoices/llms.txt) - [OpenAPI document](https://skmtc.dev/tap/apis/invoices/revisions/cbf5bdc1152b?raw)
