---
title: "Create Transaction"
method: POST
path: "/2026-04/bundle/{id}/transaction"
---

# Create Transaction

`POST /2026-04/bundle/{id}/transaction`

## Request

- Base URL: `https://api.loopsubscriptions.com/storefront`
- URL: `https://api.loopsubscriptions.com/storefront/2026-04/bundle/{id}/transaction`
- Auth: none required

Creates a transaction for a bundle. This is a **critical, required** step in the purchase flow - it tells Loop which products, box size, selling plan, and discount make up the bundle, and returns a `txnId` you attach to the cart.

## Path parameters

- `id` integer, required

## Request body

- object
  - `boxSizeId` integer
  - `discountId` integer
  - `sellingPlanShopifyId` integer: Pass null to add bundle as a one-time purchase
  - `productVariants` object[]
    - `shopifyId` integer: shopifyId
    - `quantity` string: total quantity of the variant
  - `quantity` integer

## Response `200`

Bundles transaction created successfully

- object
  - `success` boolean
  - `message` string
  - `data` object
    - `txnId` string
  - `code` string
  - `pageInfo` unknown

## Changes

- **2026-11-03** `1ff6a5700816`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/loopwork/apis/storefront-api/changes/2026-04/bundle/:id/transaction/post.md)

---

[API](https://skmtc.dev/loopwork/apis/storefront-api.md) - [All operations](https://skmtc.dev/loopwork/apis/storefront-api/llms.txt) - [OpenAPI document](https://skmtc.dev/loopwork/apis/storefront-api/revisions/1ff6a5700816?raw)
