> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fluz.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Incomm

This document provides specific details for using the Fluz Gift Card Vendor API Connector with Incomm as the vendor.

# Original Incomm API vs Fluz API Adapter

### Base URL

* Original Incomm API: [https://app.giftango.com](https://app.giftango.com)
* Fluz API Adapter:
  * Staging: [https://api-adapter.staging.fluzapp.com/incomm](https://api-adapter.staging.fluzapp.com/incomm)
  * Production: [https://api-adapter.fluzapp.com/incomm](https://api-adapter.fluzapp.com/incomm)

### Original Incomm

* Uses Bearer Authentication with the Authorization header - need to generate authorization token first.

```text theme={null}
Authorization: Bearer <INCOMM-AUTH-TOKEN>
```

To generate AuthToken send request to `/auth/token` endpoint with body:

```text theme={null}
{
  grant_type: 'client_credentials',
  client_id: INCOMM_CLIENT_ID,
  client_secret: INCOMM_SECRET_KEY,
}
```

### Fluz API Adapter

* Uses Basic Authentication with the `Authorization` header (same as all vendor integrations).

```text theme={null}
Authorization: Basic <FLUZ-API-Key>
```

## API Endpoint Comparison

| Operation         | Incomm Endpoint                                    | Fluz Endpoint                                         | Notes                                                                  |
| :---------------- | :------------------------------------------------- | :---------------------------------------------------- | :--------------------------------------------------------------------- |
| Get Order Details | `GET /orders/:orderId/cards`                       | `GET /v1/orders/:orderId/cards`                       | Retrieve card details for a specific order                             |
| Get Order         | `GET /orders/:orderId`                             | `GET /v1/orders/:orderId`                             | Retrieve details for a specific order                                  |
| Create Order      | `POST /orders/immediate`                           | `POST /v1/orders/immediate`                           | Create a new gift card order                                           |
| Get Balance       | `GET /programs/programs/:programId/programbalance` | `GET /v1/programs/programs/:programId/programbalance` | Get your account balance. Scoped to the account your key is issued for |

# Request Examples

## Create Order

### Original Incomm Request:

```text theme={null}
{
  "PurchaseOrderNumber": "cddabd6d-1f7a-483d-8126-8bc676f7bd63",
  "CustomerOrderId": "cddabd6d-1f7a-483d-8126-8bc676f7bd63",
  "Recipients": [
    {
      "FirstName": "testFirstName",
      "LastName": "testLastName",
      "EmailAddress": "testEmail@test.com",
      "DeliverEmail": false,
      "Products": [
        {
          "Sku": "VUSA-D-2500-00",
          "Quantity": 1,
          "Value": 25
        }
      ]
    }
  ]
}
```

### Fluz API Adapter Request:

```text theme={null}
{
  "PurchaseOrderNumber": "cddabd6d-1f7a-483d-8126-8bc676f7bd63",
  "CustomerOrderId": "cddabd6d-1f7a-483d-8126-8bc676f7bd63",
  "Recipients": [
    {
      "FirstName": "testFirstName",
      "LastName": "testLastName",
      "EmailAddress": "testEmail@test.com",
      "DeliverEmail": false,
      "Products": [
        {
          "Sku": "VUSA-D-2500-00",
          "Quantity": 1,
          "Value": 25
        }
      ]
    }
  ]
}
```

An order covers one recipient and one product. `DeliverEmail` must not be `true`, because Fluz returns the gift card credentials in the order response rather than emailing the recipient, which keeps delivery under your control. `PurchaseOrderNumber` and `CustomerOrderId` are kept for compatibility with your existing request shape; correlate an order using the identifiers Fluz returns.

## Response timing

Create order is synchronous, always running to completion. The call does not return until the purchase has finished, which can take up to 150 seconds, so set your client's read timeout above that.

<Callout icon="📘">
  **Order status values are Fluz's, not Incomm's.** `OrderStatus` returns `PENDING`, `IN_PROGRESS`, `COMPLETED`, `FAILED`, or `CANCELED`. See [Connector behaviour](/connector-behaviour) for status values, error responses, limits, and request constraints.
</Callout>

# Example Usage with cURL

## Example 1: Get a Specific Order with Gift Cards

```text theme={null}
# Get gift cards from order with Incomm via Fluz API Adapter
curl -X GET "https://api-adapter.staging.fluzapp.com/incomm/v1/orders/353a4151-2d51-48b6-81c9-90fd6815f12b/cards" \
  -H "Authorization: Basic <FLUZ-API-Key>"
```

## Example 2: Get Order Details

```text theme={null}
# Get order details with Incomm via Fluz API Adapter
curl -X GET "https://api-adapter.staging.fluzapp.com/incomm/v1/orders/353a4151-2d51-48b6-81c9-90fd6815f12b" \
  -H "Authorization: Basic <FLUZ-API-Key>"
```

## Example 3: Get Balance

```text theme={null}
# Get Balance with Incomm via Fluz API Adapter
# The balance is scoped to your key's account, so any :programId value works
curl -X GET "https://api-adapter.staging.fluzapp.com/incomm/v1/programs/programs/0/programbalance" \
  -H "Authorization: Basic <FLUZ-API-Key>"
```

## Example 4: Create a New Order

```text theme={null}
# Create Order with Incomm via Fluz API Adapter
# Note: this call blocks until the purchase completes. Allow up to 150 seconds.
curl -X POST "https://api-adapter.staging.fluzapp.com/incomm/v1/orders/immediate" \
  -H "Authorization: Basic <FLUZ-API-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "PurchaseOrderNumber": "cddabd6d-1f7a-483d-8126-8bc676f7bd63",
  "CustomerOrderId": "cddabd6d-1f7a-483d-8126-8bc676f7bd63",
  "Recipients": [
    {
      "FirstName": "testFirstName",
      "LastName": "testLastName",
      "EmailAddress": "testEmail@test.com",
      "DeliverEmail": false,
      "Products": [
        {
          "Sku": "VUSA-D-2500-00",
          "Quantity": 1,
          "Value": 25
        }
      ]
    }
  ]
}'
```
