# Collecting e-invoice information

By pairing one of Digital River's [low-code checkout solutions](https://docs.digitalriver.com/digital-river-api/integration-options/low-code-checkouts) with our [e-invoicing service](https://docs.digitalriver.com/digital-river-api/using-our-services/e-invoicing), you can make domestic sales in Taiwan that comply with that country's data collection requirements.

On this page, you'll find information on:

* [Defining ship from](#defining-ship-from)
* [Determining customer type](#determining-customer-type)
* [How the invoice collection process works in Prebuilt Checkout](#invoice-collection-in-prebuilt-checkout)
* [How to collect e-invoicing information in Components](#how-to-collect-e-invoicing-information-in-components)

## Defining ship from

If [items\[\]](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics) in your [create checkout-session](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions#drop-in-checkout-sessions) request contain physical products, there are various [ways to define `shipFrom`](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics). However, to collect carrier information from customers purchasing as an individual, the value of `shipFrom` must be `TW`.

## Determining customer type

To collect the appropriate information from customers, Digital River needs to know whether they're purchasing as an individual or on behalf of an organization. If you know this information before initiating checkout, you can define the [`customerType` ](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics#customer-type)in the [create checkout-session](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions#drop-in-checkout-sessions) request. Alternatively, you can [configure the checkout-session so that Digital River collects this information](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics).

## Invoice collection in Prebuilt Checkout

Prebuilt Checkout determines whether it's a [business-to-customer](#b2c) or [business-to-business](#b2b) transaction and collects the appropriate information.

### B2C

If `customerType` is `individual` and customers use Prebuilt Checkout's drop-down menu to select Taiwan as their shipping or billing country (or you pass a [`shoppingCountry`](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics#shopping-country) of `TW` in the [create checkout-session request](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions#drop-in-checkout-sessions)), Digital River collects and validates the customer's carrier information.

<figure><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2F0tW6FYqgXYoXzsfh8MdR%2FB2C%20Taiwan.png?alt=media&#x26;token=2d35a9f0-680b-4aca-8fba-5803adee9c53" alt=""><figcaption></figcaption></figure>

### B2B

If `customerType` is `business` and customers use the Prebuilt Checkout's drop-down menu to select Taiwan as their shipping or billing country (or you pass  [`shoppingCountry`](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics#shopping-country) of `TW` in the create[ checkout-session request](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions#drop-in-checkout-sessions)), Digital River collects and validates the customer's tax identification number.

<figure><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FnPgGDZ6Gsws7MBT2kW6J%2FB2B%20Taiwan.png?alt=media&#x26;token=7459e98c-b4c4-4070-b12b-b066b65ea044" alt=""><figcaption></figcaption></figure>

## How to collect e-invoicing information in Components

In [Component checkouts](https://docs.digitalriver.com/digital-river-api/integration-options/low-code-checkouts/implementing-a-components-checkout), you'll need to use the data sent by callback functions to determine what information to collect from customers.

If [`showTaxIdentifiers`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/components/configuring-components#showtaxidentifiers) is `true` in [`onReady`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/components/configuring-components#ready-event) or `requiredTaxIdentifiers[]` exists in [`onChange`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/components/configuring-components#change-event), then the customer is making the purchase on behalf of a business entity. As a result, you'll need to display the [tax identifier component](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/components/tax-identifier-component).

If [`showInvoiceAttribute`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/components/configuring-components#showinvoiceattribute) exists in `onChange` and its value is `true`, then the customer is making the purchase an individual. As a result, you'll need to display the [invoice component](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/components/invoice-component).

In both cases, when customers attempt to advance to the checkout's next stage by clicking your forward navigation control, call the applicable component's `done()` function , and then check the value it returns to determine whether the input is valid and the process can advance.

For details, refer to:

* [Submitting the tax identifier component](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/components/tax-identifier-component#submitting-the-tax-identifier-component)
* [Submitting the invoice attribute component](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/components/invoice-component#submitting-the-invoice-component)
