On This Page

{#jumplink-list}  
[Markdown](/docs/cybs/en-us/invoicing/developer/all/rest/invoicing/invoicing-services-intro/invoicing-services-create-intro.md)  
Filter  
FILTER BY TAG

Create an Invoice without Sending it {#invoicing-services-create-intro}
=======================================================================

Creating a new invoice publishes a payable invoice. To share the created invoice with a customer, send the customer the redirect URL generated in the invoiceInformation.paymentLink response field.

**Itemized Invoices**
:
An invoice can display a single billed amount or list up to 30 billed items. To list the billed items in the invoice, include the items in the request using the line item array fields. An invoice with line items is known as an *itemized* invoice. For more information about how to include line items in your request, see [Including Line Items in an Invoice](/docs/cybs/en-us/invoicing/developer/all/rest/invoicing/invoicing-services-intro/invoicing-services-line-items.md "").

**Invoice Numbers**
:
You can assign a unique invoice number in the invoiceInformation.invoiceNumber request field. The invoice number is required for follow-on API requests and tracking. You should store the invoice number in your system so that you can optimally perform the follow-on requests. If you do not include a unique invoice number when creating an invoice, `Cybersource` generates a unique invoice number for you in the invoiceInformation.invoiceNumber response field. IMPORTANT You cannot update the invoice number after it is generated.

**Installment Payments**
:
Invoices can be paid in installment payments when these fields and values are included in the request. If an invoice is payable in installments, multiple customers can make payments towards the same invoice.

    invoiceInformation.allowPartialPayments
    :
        Set to `true`.


    orderInformation.amountDetails.minimumPartialAmount
    :
        Set to the minimum amount allowed for a partial payment.

**Partner Information**
:
If your merchant account is associated with a `Cybersource` partner, you can include your partner solution ID (PSID) in the request message for tracking and reporting purposes. To include your PSID, use the clientReferenceInformation.partner.solutionId request field and set its field value to your PSID.

**Alternative Methods to Create an Invoice**
:
To create **and send** a new invoice at the same time, see [Create and Send an Invoice Immediately](/docs/cybs/en-us/invoicing/developer/all/rest/invoicing/invoicing-services-intro/invoicing-services-create-send-intro.md "").

    To create an invoice **draft** that is not payable or viewable to the customer, see [Create a Draft Invoice](/docs/cybs/en-us/invoicing/developer/all/rest/invoicing/invoicing-services-intro/invoicing-services-create-draft-intro.md "").

Endpoint {#invoicing-services-create-intro_endpoint-create-invoice}
-------------------------------------------------------------------

Send an API POST request message to one of these endpoints:  
**Test:** `POST ``https://apitest.cybersource.com``/invoicing/v2/invoices`  
**Production:** `POST ``https://api.cybersource.com``/invoicing/v2/invoices`  
**India Production:** `POST https://api.in.cybersource.com/invoicing/v2/invoices`

Successful Response
-------------------

A successfully created invoice is indicated by the `CREATED` status in the status response field. The response message also includes the newly created invoice's details for the new invoice.

Follow-On API Requests
----------------------

After creating an invoice, you can send these follow-on API requests.

**Send or Resend an Invoice**
:
After creating an invoice, you can send the invoice using the send invoice request. For more information, see [Send an Invoice](/docs/cybs/en-us/invoicing/developer/all/rest/invoicing/invoicing-services-intro/invoicing-services-send-intro.md "").

**Update an Invoice**
:
To update customer information or item details in an invoice, send an update invoice request. For more information, see [Update an Invoice](/docs/cybs/en-us/invoicing/developer/all/rest/invoicing/invoicing-services-intro/invoicing-services-update-intro.md "").

**Cancel an Invoice**
:
To cancel an invoice, send a cancel invoice request. For more information, see [Cancel an Invoice](/docs/cybs/en-us/invoicing/developer/all/rest/invoicing/invoicing-services-intro/invoicing-services-cancel-intro.md "").

**Get Invoice Details**
:
You can retrieve an invoice's details by sending a get invoice details request. For more information, see [Get Invoice Details](/docs/cybs/en-us/invoicing/developer/all/rest/invoicing/invoicing-services-intro/invoicing-services-get-details-intro.md "").

**Get List of Invoices**
:
After creating multiple invoices, you might want to search for certain invoices. To retrieve a filtered list of invoices, send a get list of invoices request. For more information, see [Get a List of Invoices](/docs/cybs/en-us/invoicing/developer/all/rest/invoicing/invoicing-services-intro/invoicing-services-get-list-intro.md "").

Required Fields for Creating an Invoice {#invoicing-services-create-req-fields}
===============================================================================

This section lists the required fields necessary to create these types of invoices:
* In-person invoice
* Email invoice
* Itemized email invoice

The invoice created using these fields and specified values is not immediately sent to the customer.

Required Fields for Creating an In-Person Invoice
-------------------------------------------------

invoiceInformation.deliveryMode
:
Set to `none`.

invoiceInformation.description
:

invoiceInformation.dueDate
:

invoiceInformation.sendImmediately
:
Set to `true`.

[orderInformation.amountDetails.currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-currency.md "")
:

[orderInformation.amountDetails.totalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-total-amount.md "")
:

Required Fields for Creating an Email Invoice {#invoicing-services-create-req-fields_customer-fields}
-----------------------------------------------------------------------------------------------------

customerInformation.email
:

customerInformation.name
:

invoiceInformation.deliveryMode
:
Set to `none`.

invoiceInformation.dueDate
:

invoiceInformation.sendImmediately
:
Set to `true`.

[orderInformation.amountDetails.currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-currency.md "")
:

[orderInformation.amountDetails.totalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-total-amount.md "")
:

Required Fields for Creating an Itemized Email Invoice {#invoicing-services-create-req-fields_line-item-fields}
---------------------------------------------------------------------------------------------------------------

customerInformation.email
:

customerInformation.name
:

invoiceInformation.deliveryMode
:
Set to `none`.

invoiceInformation.dueDate
:

invoiceInformation.sendImmediately
:
Set to `true`.

[orderInformation.amountDetails.currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-currency.md "")
:

[orderInformation.amountDetails.totalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-total-amount.md "")
:

[orderInformation.lineItems\[\].productName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-line-items-product-name.md "")
:
Include for each item listed in the invoice.

orderInformation.lineItems\[\].productSku
:
Include for each item listed in the invoice.

[orderInformation.lineItems\[\].quantity](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-line-items-quantity.md "")
:
Include for each item listed in the invoice.

[orderInformation.lineItems\[\].totalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-line-items-total-amount.md "")
:
Include for each item listed in the invoice.

[orderInformation.lineItems\[\].unitPrice](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-line-items-unit-price.md "")
:
Include for each item listed in the invoice.

Example: Creating an Invoice {#invoicing-services-create-ex-rest}
=================================================================

Request

```
{
  "invoiceInformation": {
    "description": "Food",
    "dueDate": "2019-07-11",
    "sendImmediately": true,
    "deliveryMode": "none"
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": "2623.64",
      "currency": "USD"
    }
  }
}
```

Response to a Successful Request

```keyword
{
  "_links": {
    "self": {
      "href": "/v2/invoices/98761",
      "method": "GET"
    },
    "update": {
      "href": "/v2/invoices/98761",
      "method": "PUT"
    },
    "deliver": {
      "href": "/v2/invoices/98761/delivery",
      "method": "POST"
    },
    "cancel": {
      "href": "/v2/invoices/98761/cancelation",
      "method": "POST"
    }
  },
  "id": "98761",
  "submitTimeUtc": "2024-08-02T18:39:57.548314337Z",
  "status": "CREATED",
  "processingInformation": {
    "requestPhone": false,
    "requestShipping": false
  },
  "invoiceInformation": {
    "invoiceNumber": "98761",
    "description": "Food",
    "dueDate": "2019-07-11",
    "allowPartialPayments": false,
    "paymentLink": "https://businesscenter.cybersource.com/ebc2/invoicing/payInvoice/wzvrzUssiXFLJ2RcJcmbuQEoHSrlcQudy9dL91Jxo8n4VcoRhNWRp8wvVDz8xtlD?version=v2.1",
    "deliveryMode": "None"
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": 2623.64,
      "currency": "USD",
      "balanceAmount": 2623.64
    }
  }
}
```

Request

```
{
  "customerInformation": {
    "name": "Tanya Lee",
    "email": "tanya.lee@my-email.world"
  },
  "invoiceInformation": {
    "dueDate": "2019-07-11",
    "sendImmediately": true,
    "deliveryMode": "none"
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": 293.5,
      "currency": "USD"
    },
    "lineItems": [
      {
        "productSku": "P653727383",
        "productName": "First line item's name",
        "unitPrice": 12.05,
        "quantity": 20,
        "totalAmount": 241
      },
      {
        "productSku": "P653727383",
        "productName": "First line item's name",
        "unitPrice": 5.25,
        "quantity": 10,
        "totalAmount": 52.5
      }
    ]
  }
}
```

Response to a Successful Request

```
{
  "_links": {
    "self": {
      "href": "/v2/invoices/98766",
      "method": "GET"
    },
    "update": {
      "href": "/v2/invoices/98766",
      "method": "PUT"
    },
    "deliver": {
      "href": "/v2/invoices/98766/delivery",
      "method": "POST"
    },
    "cancel": {
      "href": "/v2/invoices/98766/cancelation",
      "method": "POST"
    }
  },
  "id": "98766",
  "submitTimeUtc": "2024-08-03T00:02:49.453695409Z",
  "status": "CREATED",
  "customerInformation": {
    "name": "Tanya Lee",
    "email": "tanya.lee@my-email.world"
  },
  "processingInformation": {
    "requestPhone": false,
    "requestShipping": false
  },
  "invoiceInformation": {
    "invoiceNumber": "98766",
    "dueDate": "2019-07-11",
    "allowPartialPayments": false,
    "paymentLink": "/ebc2/invoicing/payInvoice/JBOA7CQeoSFuUluwLqw2c6n8rf0KCO0cgJz19uQmxO9rF5tT8FdNGRTL9OHapjlr?version=v2.1",
    "deliveryMode": "None"
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": 293.5,
      "currency": "USD",
      "balanceAmount": 293.5
    },
    "lineItems": [
      {
        "productSku": "P653727383",
        "productName": "First line item's name",
        "unitPrice": 12.05,
        "quantity": 20,
        "totalAmount": 241
      },
      {
        "productSku": "P653727383",
        "productName": "First line item's name",
        "unitPrice": 5.25,
        "quantity": 10,
        "totalAmount": 52.5
      }
    ]
  }
}
```

REST Interactive Example: Create a New Invoice {#invoicing-services-create-ex-live}
===================================================================================

Click this image to access the interactive code example for creating a new invoice.

#### Figure:

Interactive Code [![Image and link to the interactive code example for creating a new
invoice.](/content/dam/documentation/cybs/en-us/topics/payments-processing/payment-services/invoicing/images/invoicing-services-create.png/jcr:content/renditions/original)](https://developer.cybersource.com/api-reference-assets/index.md#invoicing_invoices_create-a-new-invoice "")  
RELATED TO THIS PAGE

* [Getting Started with REST](https://developer.cybersource.com/docs/cybs/en-us/platform/developer/all/rest/rest-getting-started/restgs-intro.md)
* [Response Codes](https://developer.cybersource.com/api/reference/response-codes.md)
* [API Field Reference Guide](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/rest-api-fields-intro.md)
* [API Reference Sandbox](https://developer.cybersource.com/api-reference-assets/index.md#static-home-section)
* [Business Center Test](https://businesscentertest.cybersource.com/ebc2/)
* [Business Center Production](https://businesscenter.cybersource.com/ebc2/)
* [Customer Support](https://support.visaacceptance.com/)

