> ## 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.

# Tango Card

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

## Original TangoCard API vs Fluz API Adapter

### Base URL

* Original TangoCard API: [https://integration-api.tangocard.com/rass](https://integration-api.tangocard.com/rass)
* Fluz API Adapter:
  * Staging: [https://api-adapter.staging.fluzapp.com/tangocard](https://api-adapter.staging.fluzapp.com/tangocard)
  * Production: [https://api-adapter.fluzapp.com/tangocard](https://api-adapter.fluzapp.com/tangocard)

## Authentication

### Original TangoCard

* Uses Basic Authentication with username and password.

```text theme={null}
Username: <TANGOCARD-USERNAME>
Password: <TANGOCARD-PASSWORD>
```

### 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                  | TangoCard Endpoint                 | Fluz Endpoint                      | Notes                                    |
| :------------------------- | :--------------------------------- | :--------------------------------- | :--------------------------------------- |
| Get Order                  | `GET /v2/orders/:referenceOrderID` | `GET /v2/orders/:referenceOrderID` | Retrieve details for a specific order    |
| Get All Orders             | `GET /v2/orders/`                  | `GET /v2/orders`                   | Retrieve the 100 most recent orders      |
| Create Order               | `POST /v2/orders/`                 | `POST /v2/orders/`                 | Create a new gift card order             |
| Get Balance (All Accounts) | `GET /v2/accounts`                 | `GET /v2/accounts`                 | Get balance information for all accounts |
| Get Balance (By Account)   | `GET /v2/accounts/:accountId`      | `GET /v2/accounts/:id`             | Get balance for a specific account       |

# Request Examples

## Create Order

### Original TangoCard Request:

```text theme={null}
{
  "sendEmail": false,
  "accountIdentifier": "testing1234account",
  "customerIdentifier": "johnr002",
  "utid": "U561593",
  "amount": 50
}
```

### Fluz API Adapter Request:

```text theme={null}
{
  "sendEmail": false,
  "accountIdentifier": "testing1234account",
  "customerIdentifier": "johnr002",
  "utid": "1800FL-US",
  "amount": 40,
  "externalRefID": "d8e118ab-732b-4884-8e8a-70746b5f359e"
}
```

Orders are funded from the account your Fluz API key is issued for, so `accountIdentifier` and `customerIdentifier` are kept for compatibility with your existing request shape. Correlate an order using `referenceOrderID` from the response.

## 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 TangoCard's.** The `status` field returns `PENDING`, `IN_PROGRESS`, `COMPLETED`, `FAILED`, or `CANCELED`. A check against a TangoCard value such as `COMPLETE` will not match. 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

```text theme={null}
# Get a specific order with TangoCard via Fluz API Adapter
curl -X GET "https://api-adapter.staging.fluzapp.com/tangocard/v2/orders/72991f5a-b389-404e-98b0-ac5444839ca9" \
  -H "Authorization: Basic <FLUZ-API-Key>"
```

### Example 2: Get All Orders

```text theme={null}
# Get all orders with TangoCard via Fluz API Adapter
curl -X GET "https://api-adapter.staging.fluzapp.com/tangocard/v2/orders" \
  -H "Authorization: Basic <FLUZ-API-Key>"
```

### Example 3: Get Balance for All Accounts

```text theme={null}
# Get Balance for all accounts with TangoCard via Fluz API Adapter
curl -X GET "https://api-adapter.staging.fluzapp.com/tangocard/v2/accounts" \
  -H "Authorization: Basic <FLUZ-API-Key>"
```

### Example 4: Get Balance for a Specific Account

```text theme={null}
# Get Balance for a specific account with TangoCard via Fluz API Adapter
curl -X GET "https://api-adapter.staging.fluzapp.com/tangocard/v2/accounts/testing1234account" \
  -H "Authorization: Basic <FLUZ-API-Key>"
```

### Example 5: Create a New Order

```text theme={null}
# Create Order with TangoCard 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/tangocard/v2/orders" \
  -H "Authorization: Basic <FLUZ-API-Key>" \
  -H "Content-Type: application/json" \
  -d '{
    "sendEmail": false,
    "accountIdentifier": "testing1234account",
    "customerIdentifier": "johnr002",
    "utid": "1800FL-US",
    "amount": 40,
    "externalRefID": "d8e118ab-732b-4884-8e8a-70746b5f359e"
  }'
```
