# Creem

> Manage customers and checkouts, retrieve transactions, and track subscriptions.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/creem

## Actions

### Cancel subscription

Cancel subscription in Creem.

**Inputs**

- Subscription (`subscription_id`, text, required): The unique identifier of the subscription.
- Mode (`mode`, text): The mode of cancellation (immediate or scheduled), default can be configured in the store billing settings. One of: `immediate`, `scheduled`.
- On execute (`on_execute`, text): The action to execute when canceling (cancel or pause) when mode is scheduled, ignored when mode is immediate or not provided. One of: `cancel`, `pause`.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "canceled_at": "example",
    "collection_method": "charge_automatically",
    "created_at": "example",
    "current_period_end_date": "example",
    "current_period_start_date": "example",
    "customer": {},
    "discount": {
      "amount": 1.0,
      "discountCode": "example",
      "duration": "forever",
      "durationInMonths": 1.0,
      "id": "example",
      "name": "example",
      "type": "percentage"
    },
    "id": "example",
    "items": [],
    "last_transaction": {
      "amount": 1.0,
      "amount_paid": 1.0,
      "created_at": 1.0,
      "currency": "example",
      "customer": "example",
      "description": "example",
      "discount_amount": 1.0,
      "id": "example",
      "mode": "test",
      "object": "example",
      "order": "example",
      "period_end": 1.0,
      "period_start": 1.0,
      "refunded_amount": 1.0,
      "status": "pending",
      "subscription": "example",
      "tax_amount": 1.0,
      "tax_country": "example",
      "type": "payment"
    },
    "last_transaction_date": "example",
    "last_transaction_id": "example",
    "metadata": {},
    "mode": "test",
    "next_transaction_date": "example",
    "object": "example",
    "product": {},
    "recovered": false,
    "status": "active",
    "updated_at": "example"
  }
}
```

### Create checkout

Create checkout in Creem.

**Inputs**

- Request ID (`request_id`, text): Identify and track each checkout request.
- Product (`product_id`, text, required): The ID of the product associated with the checkout session.
- Units (`units`, number): The number of units for the order.
- Custom price (`custom_price`, number): Custom price.
- Discount code (`discount_code`, text): Prefill the checkout session with a discount code.
- Affiliate code (`affiliate_code`, text): Affiliate code.
- Customer (`customer`, object): Customer data for checkout session. This will prefill the customer info on the checkout page.
- Custom fields (`custom_fields`, list): Collect additional information from your customer using custom fields. Up to 3 fields are supported.
- Custom field (`custom_field`, list): DEPRECATED: Use `custom_fields` instead. Collect additional information from your customer using custom fields. Up to 3 fields are supported.
- Success URL (`success_url`, text): The URL to which the user will be redirected after the checkout process is completed.
- Metadata (`metadata`, object): Metadata for the checkout in the form of key-value pairs.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "checkout_url": "example",
    "custom_fields": [],
    "custom_price": 1,
    "customer": "example",
    "discount": {
      "amount": 1.0,
      "discountCode": "example",
      "duration": "forever",
      "durationInMonths": 1.0,
      "id": "example",
      "name": "example",
      "type": "percentage"
    },
    "feature": {
      "customer_credits": {
        "amount": "example",
        "bucket_name": "example",
        "requires_moderation": false,
        "resets_each_period": false,
        "unit_label": "example"
      },
      "description": "example",
      "file": {
        "files": []
      },
      "id": "example",
      "license": {
        "activation": 1.0,
        "activation_limit": 1.0,
        "created_at": "example",
        "expires_at": "example",
        "id": "example",
        "instance": {
          "created_at": "example",
          "id": "example",
          "mode": "test",
          "name": "example",
          "object": "example",
          "status": "active"
        },
        "key": "example",
        "mode": "test",
        "object": "example",
        "product_id": "example",
        "status": "inactive"
      },
      "license_key": {
        "activation": 1.0,
        "activation_limit": 1.0,
        "created_at": "example",
        "expires_at": "example",
        "id": "example",
        "instance": {
          "created_at": "example",
          "id": "example",
          "mode": "test",
          "name": "example",
          "object": "example",
          "status": "active"
        },
        "key": "example",
        "mode": "test",
        "object": "example",
        "product_id": "example",
        "status": "inactive"
      },
      "private_note": "example",
      "type": "custom"
    },
    "id": "example",
    "license_keys": [],
    "metadata": {},
    "mode": "test",
    "object": "example",
    "order": {
      "affiliate": "example",
      "amount": 1.0,
      "amount_due": 1.0,
      "amount_paid": 1.0,
      "created_at": "example",
      "currency": "example",
      "customer": "example",
      "discount": "example",
      "discount_amount": 1.0,
      "fx_amount": 1.0,
      "fx_currency": "example",
      "fx_rate": 1.0,
      "id": "example",
      "mode": "test",
      "object": "example",
      "product": "example",
      "recovered": false,
      "status": "pending",
      "sub_total": 1.0,
      "tax_amount": 1.0,
      "transaction": "example",
      "type": "recurring",
      "updated_at": "example"
    },
    "product": "example",
    "request_id": "example",
    "status": "pending",
    "subscription": "example",
    "success_url": "example",
    "units": 1.0
  }
}
```

### Create customer

Create customer in Creem.

**Inputs**

- Email (`email`, text, required): The email address of the customer.
- Name (`name`, text, required): The full name of the customer.
- Metadata (`metadata`, object): Additional metadata for the customer.
- External ID (`external_id`, text): Your own id for this customer. Unique per store; usage ingestion resolves `external_customer_id` against it. Trimmed; letters, digits, `_`, `-`, `.` and `:` only; at most 255 characters.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "country": "example",
    "created_at": "example",
    "email": "example",
    "external_id": "example",
    "id": "example",
    "metadata": {},
    "mode": "test",
    "name": "example",
    "object": "example",
    "updated_at": "example"
  }
}
```

### Create customer portal link

Create customer portal link in Creem.

**Inputs**

- Customer (`customer_id`, text, required): Unique identifier of the customer.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "customer_portal_link": "example"
  }
}
```

### Get checkout

Retrieve checkout from Creem.

**Inputs**

- Checkout ID (`checkout_id`, text, required): The ID of the checkout session to retrieve.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "checkout_url": "example",
    "custom_fields": [],
    "custom_price": 1,
    "customer": "example",
    "discount": {
      "amount": 1.0,
      "discountCode": "example",
      "duration": "forever",
      "durationInMonths": 1.0,
      "id": "example",
      "name": "example",
      "type": "percentage"
    },
    "feature": {
      "customer_credits": {
        "amount": "example",
        "bucket_name": "example",
        "requires_moderation": false,
        "resets_each_period": false,
        "unit_label": "example"
      },
      "description": "example",
      "file": {
        "files": []
      },
      "id": "example",
      "license": {
        "activation": 1.0,
        "activation_limit": 1.0,
        "created_at": "example",
        "expires_at": "example",
        "id": "example",
        "instance": {
          "created_at": "example",
          "id": "example",
          "mode": "test",
          "name": "example",
          "object": "example",
          "status": "active"
        },
        "key": "example",
        "mode": "test",
        "object": "example",
        "product_id": "example",
        "status": "inactive"
      },
      "license_key": {
        "activation": 1.0,
        "activation_limit": 1.0,
        "created_at": "example",
        "expires_at": "example",
        "id": "example",
        "instance": {
          "created_at": "example",
          "id": "example",
          "mode": "test",
          "name": "example",
          "object": "example",
          "status": "active"
        },
        "key": "example",
        "mode": "test",
        "object": "example",
        "product_id": "example",
        "status": "inactive"
      },
      "private_note": "example",
      "type": "custom"
    },
    "id": "example",
    "license_keys": [],
    "metadata": {},
    "mode": "test",
    "object": "example",
    "order": {
      "affiliate": "example",
      "amount": 1.0,
      "amount_due": 1.0,
      "amount_paid": 1.0,
      "created_at": "example",
      "currency": "example",
      "customer": "example",
      "discount": "example",
      "discount_amount": 1.0,
      "fx_amount": 1.0,
      "fx_currency": "example",
      "fx_rate": 1.0,
      "id": "example",
      "mode": "test",
      "object": "example",
      "product": "example",
      "recovered": false,
      "status": "pending",
      "sub_total": 1.0,
      "tax_amount": 1.0,
      "transaction": "example",
      "type": "recurring",
      "updated_at": "example"
    },
    "product": "example",
    "request_id": "example",
    "status": "pending",
    "subscription": "example",
    "success_url": "example",
    "units": 1.0
  }
}
```

### Get customer

Retrieve customer from Creem.

**Inputs**

- Customer (`customer_id`, text): The unique identifier of the customer.
- Email (`email`, text): The email address of the customer.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "country": "example",
    "created_at": "example",
    "email": "example",
    "external_id": "example",
    "id": "example",
    "metadata": {},
    "mode": "test",
    "name": "example",
    "object": "example",
    "updated_at": "example"
  }
}
```

### Get product

Retrieve product from Creem.

**Inputs**

- Product (`product_id`, text, required): The product ID.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "billing_period": "every-month",
    "billing_type": "recurring",
    "business_net_pricing": false,
    "created_at": "example",
    "currency": "example",
    "custom_fields": [],
    "default_success_url": "example",
    "description": "example",
    "external_id": "example",
    "features": [],
    "id": "example",
    "image_url": "example",
    "image_urls": [],
    "metadata": {},
    "mode": "test",
    "name": "example",
    "object": "example",
    "price": 1.0,
    "product_url": "example",
    "recurring_interval": "example",
    "recurring_interval_count": 1,
    "status": "active",
    "tax_category": "saas",
    "tax_mode": "inclusive",
    "trial_period_days": 1,
    "trial_price": 1,
    "updated_at": "example",
    "usage_prices": []
  }
}
```

### Get subscription

Retrieve subscription from Creem.

**Inputs**

- Subscription (`subscription_id`, text, required): The unique identifier of the subscription.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "canceled_at": "example",
    "collection_method": "charge_automatically",
    "created_at": "example",
    "current_period_end_date": "example",
    "current_period_start_date": "example",
    "customer": {},
    "discount": {
      "amount": 1.0,
      "discountCode": "example",
      "duration": "forever",
      "durationInMonths": 1.0,
      "id": "example",
      "name": "example",
      "type": "percentage"
    },
    "id": "example",
    "items": [],
    "last_transaction": {
      "amount": 1.0,
      "amount_paid": 1.0,
      "created_at": 1.0,
      "currency": "example",
      "customer": "example",
      "description": "example",
      "discount_amount": 1.0,
      "id": "example",
      "mode": "test",
      "object": "example",
      "order": "example",
      "period_end": 1.0,
      "period_start": 1.0,
      "refunded_amount": 1.0,
      "status": "pending",
      "subscription": "example",
      "tax_amount": 1.0,
      "tax_country": "example",
      "type": "payment"
    },
    "last_transaction_date": "example",
    "last_transaction_id": "example",
    "metadata": {},
    "mode": "test",
    "next_transaction_date": "example",
    "object": "example",
    "product": {},
    "recovered": false,
    "status": "active",
    "updated_at": "example"
  }
}
```

### Get transaction

Retrieve transaction from Creem.

**Inputs**

- Transaction (`transaction_id`, text, required): The unique identifier of the transaction.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "amount": 1.0,
    "amount_paid": 1.0,
    "created_at": 1.0,
    "currency": "example",
    "customer": "example",
    "description": "example",
    "discount_amount": 1.0,
    "id": "example",
    "mode": "test",
    "object": "example",
    "order": "example",
    "period_end": 1.0,
    "period_start": 1.0,
    "refunded_amount": 1.0,
    "status": "pending",
    "subscription": "example",
    "tax_amount": 1.0,
    "tax_country": "example",
    "type": "payment"
  }
}
```

### List customer licenses

Retrieve a page of customer licenses from Creem.

**Inputs**

- Customer (`customer_id`, text, required): The unique identifier of the customer.
- Page number (`page_number`, number): The page number for pagination.
- Page size (`page_size`, number): The number of items per page.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "items": [],
    "pagination": {
      "current_page": 1.0,
      "next_page": 1.0,
      "prev_page": 1.0,
      "total_pages": 1.0,
      "total_records": 1.0
    }
  }
}
```

### List customer orders

Retrieve a page of customer orders from Creem.

**Inputs**

- Customer (`customer_id`, text, required): The unique identifier of the customer.
- Page number (`page_number`, number): The page number for pagination.
- Page size (`page_size`, number): The number of items per page.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "items": [],
    "pagination": {
      "current_page": 1.0,
      "next_page": 1.0,
      "prev_page": 1.0,
      "total_pages": 1.0,
      "total_records": 1.0
    }
  }
}
```

### List customer subscriptions

Retrieve a page of customer subscriptions from Creem.

**Inputs**

- Customer (`customer_id`, text, required): The unique identifier of the customer.
- Page number (`page_number`, number): The page number for pagination.
- Page size (`page_size`, number): The number of items per page.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "items": [],
    "pagination": {
      "current_page": 1.0,
      "next_page": 1.0,
      "prev_page": 1.0,
      "total_pages": 1.0,
      "total_records": 1.0
    }
  }
}
```

### List customers

Retrieve a page of customers from Creem.

**Inputs**

- Page number (`page_number`, number): The page number for pagination.
- Page size (`page_size`, number): The number of items per page.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "items": [],
    "pagination": {
      "current_page": 1.0,
      "next_page": 1.0,
      "prev_page": 1.0,
      "total_pages": 1.0,
      "total_records": 1.0
    }
  }
}
```

### List discounts

Retrieve a page of discounts from Creem.

**Inputs**

- Page number (`page_number`, number): The page number for pagination.
- Page size (`page_size`, number): The number of items per page.
- Product (`product_id`, text): Filter discounts that apply to a specific product.
- Status (`status`, text): Filter by discount status. One of: `active`, `deleted`.
- Type (`type`, text): Filter by discount type. One of: `percentage`, `fixed`.
- Created after (`created_after`, text): Filter discounts created after this date.
- Created before (`created_before`, text): Filter discounts created before this date.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "items": [],
    "pagination": {
      "current_page": 1.0,
      "next_page": 1.0,
      "prev_page": 1.0,
      "total_pages": 1.0,
      "total_records": 1.0
    }
  }
}
```

### List products

Retrieve a page of products from Creem.

**Inputs**

- Page number (`page_number`, number): The page number for pagination.
- Page size (`page_size`, number): The number of items per page.
- Status (`status`, text): Lifecycle status of the product: `active` or `archived`. One of: `active`, `archived`.
- External ID (`external_id`, text): Only the product with this `external_id` (your own key). Case-sensitive, exact match.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "items": [],
    "pagination": {
      "current_page": 1.0,
      "next_page": 1.0,
      "prev_page": 1.0,
      "total_pages": 1.0,
      "total_records": 1.0
    }
  }
}
```

### List subscriptions

Retrieve a page of subscriptions from Creem.

**Inputs**

- Page number (`page_number`, number): The page number for pagination.
- Page size (`page_size`, number): The number of items per page.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "items": [],
    "pagination": {
      "current_page": 1.0,
      "next_page": 1.0,
      "prev_page": 1.0,
      "total_pages": 1.0,
      "total_records": 1.0
    }
  }
}
```

### List transactions

Retrieve a page of transactions from Creem.

**Inputs**

- Customer (`customer_id`, text): Filter transactions by customer ID.
- Order ID (`order_id`, text): Filter transactions by order ID.
- Product (`product_id`, text): Filter transactions by product ID.
- Page number (`page_number`, number): The page number for pagination.
- Page size (`page_size`, number): The number of items per page.
- Status (`status`, text): Filter transactions by status. `chargeback` (the value responses return for a chargeback) and `chargedBack` are equivalent. One of: `pending`, `paid`, `refunded`, `partialRefund`, `chargedBack`, `uncollectible`, `declined`, `canceled`, `void`, `chargeback`.
- Created after (`created_after`, text): Created after.
- Created before (`created_before`, text): Created before.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "items": [],
    "pagination": {
      "current_page": 1.0,
      "next_page": 1.0,
      "prev_page": 1.0,
      "total_pages": 1.0,
      "total_records": 1.0
    }
  }
}
```

### Pause subscription

Pause subscription in Creem.

**Inputs**

- Subscription (`subscription_id`, text, required): The unique identifier of the subscription.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "canceled_at": "example",
    "collection_method": "charge_automatically",
    "created_at": "example",
    "current_period_end_date": "example",
    "current_period_start_date": "example",
    "customer": {},
    "discount": {
      "amount": 1.0,
      "discountCode": "example",
      "duration": "forever",
      "durationInMonths": 1.0,
      "id": "example",
      "name": "example",
      "type": "percentage"
    },
    "id": "example",
    "items": [],
    "last_transaction": {
      "amount": 1.0,
      "amount_paid": 1.0,
      "created_at": 1.0,
      "currency": "example",
      "customer": "example",
      "description": "example",
      "discount_amount": 1.0,
      "id": "example",
      "mode": "test",
      "object": "example",
      "order": "example",
      "period_end": 1.0,
      "period_start": 1.0,
      "refunded_amount": 1.0,
      "status": "pending",
      "subscription": "example",
      "tax_amount": 1.0,
      "tax_country": "example",
      "type": "payment"
    },
    "last_transaction_date": "example",
    "last_transaction_id": "example",
    "metadata": {},
    "mode": "test",
    "next_transaction_date": "example",
    "object": "example",
    "product": {},
    "recovered": false,
    "status": "active",
    "updated_at": "example"
  }
}
```

### Resume subscription

Resume subscription in Creem.

**Inputs**

- Subscription (`subscription_id`, text, required): The unique identifier of the subscription.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "canceled_at": "example",
    "collection_method": "charge_automatically",
    "created_at": "example",
    "current_period_end_date": "example",
    "current_period_start_date": "example",
    "customer": {},
    "discount": {
      "amount": 1.0,
      "discountCode": "example",
      "duration": "forever",
      "durationInMonths": 1.0,
      "id": "example",
      "name": "example",
      "type": "percentage"
    },
    "id": "example",
    "items": [],
    "last_transaction": {
      "amount": 1.0,
      "amount_paid": 1.0,
      "created_at": 1.0,
      "currency": "example",
      "customer": "example",
      "description": "example",
      "discount_amount": 1.0,
      "id": "example",
      "mode": "test",
      "object": "example",
      "order": "example",
      "period_end": 1.0,
      "period_start": 1.0,
      "refunded_amount": 1.0,
      "status": "pending",
      "subscription": "example",
      "tax_amount": 1.0,
      "tax_country": "example",
      "type": "payment"
    },
    "last_transaction_date": "example",
    "last_transaction_id": "example",
    "metadata": {},
    "mode": "test",
    "next_transaction_date": "example",
    "object": "example",
    "product": {},
    "recovered": false,
    "status": "active",
    "updated_at": "example"
  }
}
```

### Update customer

Update customer in Creem.

**Inputs**

- Customer (`customer_id`, text, required): The ID of the customer to update.
- Name (`name`, text): The full name of the customer.
- Email (`email`, text): The email address of the customer. Must be unique within the store; changing it to an email already used by another customer returns 409. Stored lowercased. Omit to leave unchanged.
- Metadata (`metadata`, object): Additional metadata for the customer. Omit to leave unchanged; send `null` to clear it.
- External ID (`external_id`, text): External id.

**Outputs**

- `data` (object): The result returned by Creem.

**Example output**

```json
{
  "data": {
    "country": "example",
    "created_at": "example",
    "email": "example",
    "external_id": "example",
    "id": "example",
    "metadata": {},
    "mode": "test",
    "name": "example",
    "object": "example",
    "updated_at": "example"
  }
}
```
