# Online stores

Shopify and Mercado Libre connected: each paid order becomes a self-invoicing receipt.

## Endpoints

- [Connect a store](https://fiscalisto.com/en/docs/api/referencia/tiendas-en-linea/create-store-connection.md): `POST /v1/store_connections`
- [List stores](https://fiscalisto.com/en/docs/api/referencia/tiendas-en-linea/list-store-connections.md): `GET /v1/store_connections`
- [Get a store](https://fiscalisto.com/en/docs/api/referencia/tiendas-en-linea/get-store-connection.md): `GET /v1/store_connections/{id}`
- [Change how its orders become receipts](https://fiscalisto.com/en/docs/api/referencia/tiendas-en-linea/update-store-connection.md): `POST /v1/store_connections/{id}`
- [Disconnect a store](https://fiscalisto.com/en/docs/api/referencia/tiendas-en-linea/delete-store-connection.md): `DELETE /v1/store_connections/{id}`
- [Fetch paid orders](https://fiscalisto.com/en/docs/api/referencia/tiendas-en-linea/import-store-orders.md): `POST /v1/store_connections/{id}/import_orders`

## The StoreConnection object

A Shopify, WooCommerce, Tiendanube, Mercado Libre or Amazon store whose paid orders become the issuer's self-invoicing tickets.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"store_connection"` | yes | What kind of object it is («invoice», «customer»…). |
| `issuer` | string | yes | The issuer that owns the store. |
| `platform` | `shopify`, `mercadolibre`, `amazon`, `tiendanube`, `woocommerce`, `mercadopago`, `conekta`, `openpay` | yes | shopify, woocommerce, tiendanube, mercadolibre, amazon, mercadopago, conekta or openpay. |
| `shop` | string or null | yes | The store's domain (Shopify, WooCommerce), the store id in Tiendanube or the seller id in Mercado Libre and Amazon (on authorization), the Mercado Pago account id, the Openpay merchant ID, or a reference to the Conekta account. |
| `name` | string or null | yes | The store's name according to its platform, or null. |
| `status` | `pending`, `active`, `disconnected` | yes | pending (Mercado Libre, Tiendanube or Amazon wait for authorization at authorize_url), active or disconnected. |
| `authorize_url` | string or null | yes | If pending: the platform page where the seller authorizes (valid for one day; each request gives a new one). Otherwise, null. |
| `settings` | object | yes | How each order becomes a receipt. |
| `settings.product_key` | string or null | yes | c_ClaveProdServ of what it sells, or null. |
| `settings.unit_key` | string or null | yes | c_ClaveUnidad, or null (the product code's). |
| `settings.iva` | `0`, `0.16`, `0.08`, `exento` | yes | IVA rate included in the prices. |
| `settings.description` | string or null | yes | Each ticket's fixed line item, or null (the order and its items). |
| `settings.folio_prefix` | string | yes | What goes before the order number in the folio. |
| `settings.payment_form` | string or null | yes | c_FormaPago when the order's isn't in payment_forms, or null. |
| `settings.payment_forms` | object | yes | c_FormaPago per gateway or payment type. |
| `settings.auto_invoice` | boolean or null | yes | Mercado Libre: whether it stamps right away with the buyer's tax details; null on other platforms. |
| `settings.notify_buyer` | boolean or null | yes | WooCommerce and Tiendanube: whether the buyer receives their invoicing link (order note or email); null on other platforms. |
| `orders_count` | integer | yes | How many orders have become tickets. (from -9007199254740991 to 9007199254740991) |
| `last_order_at` | string (date-time) or null | yes | When the last one arrived, or null. |
| `last_error` | object or null | yes | The last problem (an order in dollars, a ticket already invoiced when the order was canceled…), or null. |
| `last_error.message` | string | yes | What happened. |
| `last_error.at` | string (date-time) or null | yes | When. |
| `created_at` | string (date-time) or null | yes | When it was connected. |

Example:

```json
{
  "id": "stc_OufpKqnrvx9p3Kd8sLm2XyT5uBcW8sKdLx",
  "object": "store_connection",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "platform": "shopify",
  "shop": "mi-tienda.myshopify.com",
  "name": "Mi Tienda",
  "status": "active",
  "authorize_url": null,
  "settings": {
    "product_key": "53101600",
    "unit_key": null,
    "iva": "0.16",
    "description": null,
    "folio_prefix": "SHOP-",
    "payment_form": null,
    "payment_forms": {
      "paypal": "31"
    },
    "auto_invoice": null,
    "notify_buyer": null
  },
  "orders_count": 128,
  "last_order_at": "2026-10-25T10:12:44-06:00",
  "last_error": null,
  "created_at": "2026-10-01T09:00:00-06:00"
}
```

## The StoreImport object

The paid orders that were brought in.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"store_import"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `store_connection` | string | yes | The connection (stc_…). |
| `since` | string | yes | From what day orders were searched. |
| `tickets` | integer | yes | Orders that are tickets (the ones that already were count again). (from -9007199254740991 to 9007199254740991) |
| `invoiced` | integer | yes | Of them, the ones invoiced right away with the buyer's details. (from -9007199254740991 to 9007199254740991) |
| `skipped` | array of object | yes | The ones that didn't become a ticket, with the reason. |
| `skipped[].order` | string | yes | The order. |
| `skipped[].reason` | string | yes | Why it didn't become a ticket. |

Example:

```json
{
  "object": "store_import",
  "livemode": false,
  "store_connection": "stc_OufpKqnrvx9p3Kd8sLm2XyT5uBcW8sKdLx",
  "since": "2026-10-18",
  "tickets": 14,
  "invoiced": 0,
  "skipped": [
    {
      "order": "1042",
      "reason": "está en USD; solo se registran pedidos en pesos."
    }
  ]
}
```
