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

## Authentication

### Original TangoCard

* Uses Basic Authentication with username and password.

```text theme={null}
Username: QAPlatform2
Password: apYPfT6HNONpDRUj3CLGWYt7gvIHONpDRUYPfT6Hj
```

### 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 all orders                                                |
| Create Order               | `GET /v2/orders/`                  | `POST /v2/orders/`                 | Create a new gift card order (processed as a background operation) |
| 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"
}
```

## Background Processing for TangoCard Orders

All purchase operations through the TangoCard integration are processed as background operations. However, for compatibility with TangoCard's API behavior, the Fluz API Adapter may return full results synchronously by default.

<Callout icon="📘">
  **Note:** Even when results appear synchronous, all purchases are still scheduled and tracked as background operations internally for improved reliability and better handling of retries.
</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 operation runs as a background process but may return complete results
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"
  }'
```
