---
updatedAt: 2026-04-10T20:14:37.000Z
agentTools:
  projectIndex: https://docs.pelcro.com/v2.4/llms.txt
---

# Redeem subscription

Redeem a gift subscription.

## Overview

Redeem a gift subscription for a customer. This activates a gifted subscription that was purchased by another user. Two modes: create a new subscription for the recipient, or add the gift as a renewal phase to an existing subscription.

**Example:** A customer receives a gift code from a friend. Use this endpoint to activate the gift and start their subscription.

***

## Conditional Requirements

| Condition                       | Required Fields                                  |
| ------------------------------- | ------------------------------------------------ |
| Always                          | `gift_code`, `user_id`                           |
| Adding to existing subscription | `subscription_id`                                |
| Plan requires shipping address  | `address_id`                                     |
| Gift must be paid               | `is_paid` must be true on the donor subscription |
| Gift must not be redeemed       | `is_redeemed` must not be true                   |

***

## Behavior

* **New subscription (no subscription\_id)**: Creates a new subscription with a system gift coupon (100% discount), set to cancel at period end
* **Add to existing (subscription\_id provided)**: Adds a renewal phase to the existing subscription using the gift plan and coupon
* Gift donor subscription is marked as `is_redeemed: true` after successful redemption
* A gift code can only be redeemed once

***

## Webhook

New subscriptions trigger `subscription.created`. Adding to an existing subscription triggers `subscription.renewed`.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "core-api",
    "version": "1.88"
  },
  "servers": [
    {
      "url": "https://www.pelcro.com/api/v1/core"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      },
      "sec1": {
        "type": "apiKey",
        "in": "query",
        "name": "site_id"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/subscriptions/redeem": {
      "post": {
        "summary": "Redeem subscription",
        "description": "Redeem a gift subscription.",
        "operationId": "api-core-redeem-subscription",
        "parameters": [
          {
            "name": "site_id",
            "in": "query",
            "description": "The unique identifier of the site associated with your account.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "Bearer eyJ***"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "gift_code",
                  "user_id"
                ],
                "properties": {
                  "gift_code": {
                    "type": "string",
                    "description": "The gift code used to redeem the subscription. The gift code must be existing and valid (not redeemed) -."
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "The unique identifier of the gift recipient. The gift recipient must be an existing customer on the associated site -.",
                    "format": "int32"
                  },
                  "subscription_id": {
                    "type": "integer",
                    "description": "The unique identifier of an existing subscription on which you would like to redeem this gift as a future phase on. If not provided, the gift will be created as a new subscription - Optional.",
                    "format": "int32"
                  },
                  "address_id": {
                    "type": "integer",
                    "description": "The unique identifier of user's shipping address - Optional, unless taxes are enabled on the account, the gift product requires an address or validated against specific countries.",
                    "format": "int32"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"data\": {\n\t\t\"id\": 1944,\n\t\t\"address\": 249,\n\t\t\"plan\": 1,\n\t\t\"coupon\": 47,\n\t\t\"default_source\": null,\n\t\t\"latest_invoice\": null,\n\t\t\"user_id\": 3306,\n\t\t\"customer_id\": 3306,\n\t\t\"address_required\": true,\n\t\t\"billing\": \"charge_automatically\",\n\t\t\"cancel_at\": null,\n\t\t\"cancel_at_period_end\": 1,\n\t\t\"auto_renew\": 0,\n\t\t\"canceled_at\": null,\n\t\t\"created\": 1720569746,\n\t\t\"current_period_end\": 1720742546,\n\t\t\"current_period_start\": 1720656146,\n\t\t\"days_until_due\": null,\n\t\t\"start_date\": 1720569746,\n\t\t\"domains\": null,\n\t\t\"ended_at\": null,\n\t\t\"source\": null,\n\t\t\"quantity\": 1,\n\t\t\"status\": \"active\",\n\t\t\"trial_end\": null,\n\t\t\"trial_start\": null,\n\t\t\"is_gift_donor\": null,\n\t\t\"is_gift_recipient\": 1,\n\t\t\"is_imported\": false,\n\t\t\"ip_addresses\": null,\n\t\t\"gift_donor_subscription_id\": 1935,\n\t\t\"gift_code\": null,\n\t\t\"is_redeemed\": 0,\n\t\t\"cancel_reason\": null,\n\t\t\"shipments_remaining\": null,\n\t\t\"shipments_undeliverable\": false,\n\t\t\"shipments_suspended_until\": null,\n\t\t\"old_provider_id\": null,\n\t\t\"schedule\": {\n\t\t\t\"billing\": \"charge_automatically\",\n\t\t\t\"created\": 1720569746,\n\t\t\t\"current_phase\": {\n\t\t\t\t\"end_date\": 1720742546,\n\t\t\t\t\"start_date\": 1720656146\n\t\t\t},\n\t\t\t\"end_behavior\": \"cancel\",\n\t\t\t\"renewal_behavior\": \"cancel\",\n\t\t\t\"status\": \"active\",\n\t\t\t\"phases\": [\n\t\t\t\t{\n\t\t\t\t\t\"coupon\": {\n\t\t\t\t\t\t\"id\": 47,\n\t\t\t\t\t\t\"account_id\": 1,\n\t\t\t\t\t\t\"object_id\": \"WCls4cg6\",\n\t\t\t\t\t\t\"site_id\": 1,\n\t\t\t\t\t\t\"type\": \"subscription\",\n\t\t\t\t\t\t\"amount_off\": null,\n\t\t\t\t\t\t\"currency\": null,\n\t\t\t\t\t\t\"code\": \"SYSTEM_GIFT\",\n\t\t\t\t\t\t\"created\": \"2023-11-25T02:09:07.000000Z\",\n\t\t\t\t\t\t\"duration\": \"forever\",\n\t\t\t\t\t\t\"duration_in_months\": null,\n\t\t\t\t\t\t\"is_system\": true,\n\t\t\t\t\t\t\"is_for_gifted_subscription\": true,\n\t\t\t\t\t\t\"is_hidden\": false,\n\t\t\t\t\t\t\"livemode\": false,\n\t\t\t\t\t\t\"name\": \"GIFT_SUBSCRIPTION\",\n\t\t\t\t\t\t\"max_redemptions\": null,\n\t\t\t\t\t\t\"metadata\": null,\n\t\t\t\t\t\t\"percent_off\": 100,\n\t\t\t\t\t\t\"redeem_by\": null,\n\t\t\t\t\t\t\"times_redeemed\": 0,\n\t\t\t\t\t\t\"valid\": true,\n\t\t\t\t\t\t\"idempotency_key\": \"00000000-007b-6316-a3c7-00000007b316\",\n\t\t\t\t\t\t\"created_at\": \"2023-11-25T02:09:06.000000Z\",\n\t\t\t\t\t\t\"updated_at\": \"2023-11-25T02:09:07.000000Z\",\n\t\t\t\t\t\t\"deleted_at\": null,\n\t\t\t\t\t\t\"discount_type\": \"percentage\"\n\t\t\t\t\t},\n\t\t\t\t\t\"end_date\": 1720742546,\n\t\t\t\t\t\"plans\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"id\": 9134,\n\t\t\t\t\t\t\t\"index\": 0,\n\t\t\t\t\t\t\t\"subscription_schedule_phase_id\": 9142,\n\t\t\t\t\t\t\t\"plan_id\": 1,\n\t\t\t\t\t\t\t\"plan_object_id\": \"plan_OX4wn5NT455iZj\",\n\t\t\t\t\t\t\t\"price_object_id\": \"plan_OX4wn5NT455iZj\",\n\t\t\t\t\t\t\t\"billing_thresholds\": null,\n\t\t\t\t\t\t\t\"quantity\": 1,\n\t\t\t\t\t\t\t\"created_at\": \"2024-07-10T00:02:27.000000Z\",\n\t\t\t\t\t\t\t\"updated_at\": \"2024-07-10T00:02:27.000000Z\",\n\t\t\t\t\t\t\t\"deleted_at\": null,\n\t\t\t\t\t\t\t\"tax_rates\": [],\n\t\t\t\t\t\t\t\"plan\": {\n\t\t\t\t\t\t\t\t\"id\": 1,\n\t\t\t\t\t\t\t\t\"pelcro_owned\": false,\n\t\t\t\t\t\t\t\t\"product_id\": 1,\n\t\t\t\t\t\t\t\t\"parent_plan_id\": null,\n\t\t\t\t\t\t\t\t\"account_id\": 1,\n\t\t\t\t\t\t\t\t\"object_id\": \"plan_OX4wn5NT455iZj\",\n\t\t\t\t\t\t\t\t\"active\": \"active\",\n\t\t\t\t\t\t\t\t\"type\": \"regular\",\n\t\t\t\t\t\t\t\t\"aggregate_usage\": null,\n\t\t\t\t\t\t\t\t\"amount\": 12300,\n\t\t\t\t\t\t\t\t\"recognized_revenue_type\": \"time\",\n\t\t\t\t\t\t\t\t\"renewal_strategy\": null,\n\t\t\t\t\t\t\t\t\"auto_renew\": true,\n\t\t\t\t\t\t\t\t\"available_online\": true,\n\t\t\t\t\t\t\t\t\"billing_scheme\": \"per_unit\",\n\t\t\t\t\t\t\t\t\"allow_send_invoice\": false,\n\t\t\t\t\t\t\t\t\"auto_uncollectible_days\": null,\n\t\t\t\t\t\t\t\t\"invoice_upcoming_notification\": null,\n\t\t\t\t\t\t\t\t\"created\": \"2023-08-28T08:26:54.000000Z\",\n\t\t\t\t\t\t\t\t\"currency\": \"usd\",\n\t\t\t\t\t\t\t\t\"countries\": null,\n\t\t\t\t\t\t\t\t\"entitlements\": [\n\t\t\t\t\t\t\t\t\t\"ddffda\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"preset_donation_values\": null,\n\t\t\t\t\t\t\t\t\"interval\": \"day\",\n\t\t\t\t\t\t\t\t\"interval_count\": 1,\n\t\t\t\t\t\t\t\t\"is_imported\": false,\n\t\t\t\t\t\t\t\t\"import_unique_id\": null,\n\t\t\t\t\t\t\t\t\"is_hidden\": false,\n\t\t\t\t\t\t\t\t\"is_donation\": false,\n\t\t\t\t\t\t\t\t\"image\": null,\n\t\t\t\t\t\t\t\t\"livemode\": false,\n\t\t\t\t\t\t\t\t\"metadata\": null,\n\t\t\t\t\t\t\t\t\"member_seat_capacity\": null,\n\t\t\t\t\t\t\t\t\"nickname\": \"Plan 1 edit\",\n\t\t\t\t\t\t\t\t\"name_internal\": null,\n\t\t\t\t\t\t\t\t\"refundable\": true,\n\t\t\t\t\t\t\t\t\"shipments_per_interval\": null,\n\t\t\t\t\t\t\t\t\"description\": null,\n\t\t\t\t\t\t\t\t\"gift_description\": null,\n\t\t\t\t\t\t\t\t\"tiers\": null,\n\t\t\t\t\t\t\t\t\"tiers_mode\": null,\n\t\t\t\t\t\t\t\t\"transform_usage\": null,\n\t\t\t\t\t\t\t\t\"trial_period_days\": 0,\n\t\t\t\t\t\t\t\t\"usage_type\": \"licensed\",\n\t\t\t\t\t\t\t\t\"agency_id\": null,\n\t\t\t\t\t\t\t\t\"agency_remit_rate\": null,\n\t\t\t\t\t\t\t\t\"ip_addresses\": null,\n\t\t\t\t\t\t\t\t\"domains\": null,\n\t\t\t\t\t\t\t\t\"idempotency_key\": \"00000000-007b-6316-beb0-00000007b316\",\n\t\t\t\t\t\t\t\t\"expires_at\": null,\n\t\t\t\t\t\t\t\t\"created_at\": \"2023-08-28T08:26:54.000000Z\",\n\t\t\t\t\t\t\t\t\"updated_at\": \"2024-03-21T18:59:07.000000Z\",\n\t\t\t\t\t\t\t\t\"deleted_at\": null,\n\t\t\t\t\t\t\t\t\"apple_product_id\": null,\n\t\t\t\t\t\t\t\t\"old_provider_id\": null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"start_date\": 1720656146,\n\t\t\t\t\t\"tax_percent\": null,\n\t\t\t\t\t\"trial_end\": null\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"coupon\": {\n\t\t\t\t\t\t\"id\": 47,\n\t\t\t\t\t\t\"account_id\": 1,\n\t\t\t\t\t\t\"object_id\": \"WCls4cg6\",\n\t\t\t\t\t\t\"site_id\": 1,\n\t\t\t\t\t\t\"type\": \"subscription\",\n\t\t\t\t\t\t\"amount_off\": null,\n\t\t\t\t\t\t\"currency\": null,\n\t\t\t\t\t\t\"code\": \"SYSTEM_GIFT\",\n\t\t\t\t\t\t\"created\": \"2023-11-25T02:09:07.000000Z\",\n\t\t\t\t\t\t\"duration\": \"forever\",\n\t\t\t\t\t\t\"duration_in_months\": null,\n\t\t\t\t\t\t\"is_system\": true,\n\t\t\t\t\t\t\"is_for_gifted_subscription\": true,\n\t\t\t\t\t\t\"is_hidden\": false,\n\t\t\t\t\t\t\"livemode\": false,\n\t\t\t\t\t\t\"name\": \"GIFT_SUBSCRIPTION\",\n\t\t\t\t\t\t\"max_redemptions\": null,\n\t\t\t\t\t\t\"metadata\": null,\n\t\t\t\t\t\t\"percent_off\": 100,\n\t\t\t\t\t\t\"redeem_by\": null,\n\t\t\t\t\t\t\"times_redeemed\": 0,\n\t\t\t\t\t\t\"valid\": true,\n\t\t\t\t\t\t\"idempotency_key\": \"00000000-007b-6316-a3c7-00000007b316\",\n\t\t\t\t\t\t\"created_at\": \"2023-11-25T02:09:06.000000Z\",\n\t\t\t\t\t\t\"updated_at\": \"2023-11-25T02:09:07.000000Z\",\n\t\t\t\t\t\t\"deleted_at\": null,\n\t\t\t\t\t\t\"discount_type\": \"percentage\"\n\t\t\t\t\t},\n\t\t\t\t\t\"end_date\": 1720828946,\n\t\t\t\t\t\"plans\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"id\": 9135,\n\t\t\t\t\t\t\t\"index\": 0,\n\t\t\t\t\t\t\t\"subscription_schedule_phase_id\": 9143,\n\t\t\t\t\t\t\t\"plan_id\": 1,\n\t\t\t\t\t\t\t\"plan_object_id\": \"plan_OX4wn5NT455iZj\",\n\t\t\t\t\t\t\t\"price_object_id\": \"plan_OX4wn5NT455iZj\",\n\t\t\t\t\t\t\t\"billing_thresholds\": null,\n\t\t\t\t\t\t\t\"quantity\": 1,\n\t\t\t\t\t\t\t\"created_at\": \"2024-07-10T00:04:04.000000Z\",\n\t\t\t\t\t\t\t\"updated_at\": \"2024-07-10T00:04:04.000000Z\",\n\t\t\t\t\t\t\t\"deleted_at\": null,\n\t\t\t\t\t\t\t\"tax_rates\": [],\n\t\t\t\t\t\t\t\"plan\": {\n\t\t\t\t\t\t\t\t\"id\": 1,\n\t\t\t\t\t\t\t\t\"pelcro_owned\": false,\n\t\t\t\t\t\t\t\t\"product_id\": 1,\n\t\t\t\t\t\t\t\t\"parent_plan_id\": null,\n\t\t\t\t\t\t\t\t\"account_id\": 1,\n\t\t\t\t\t\t\t\t\"object_id\": \"plan_OX4wn5NT455iZj\",\n\t\t\t\t\t\t\t\t\"active\": \"active\",\n\t\t\t\t\t\t\t\t\"type\": \"regular\",\n\t\t\t\t\t\t\t\t\"aggregate_usage\": null,\n\t\t\t\t\t\t\t\t\"amount\": 12300,\n\t\t\t\t\t\t\t\t\"recognized_revenue_type\": \"time\",\n\t\t\t\t\t\t\t\t\"renewal_strategy\": null,\n\t\t\t\t\t\t\t\t\"auto_renew\": true,\n\t\t\t\t\t\t\t\t\"available_online\": true,\n\t\t\t\t\t\t\t\t\"billing_scheme\": \"per_unit\",\n\t\t\t\t\t\t\t\t\"allow_send_invoice\": false,\n\t\t\t\t\t\t\t\t\"auto_uncollectible_days\": null,\n\t\t\t\t\t\t\t\t\"invoice_upcoming_notification\": null,\n\t\t\t\t\t\t\t\t\"created\": \"2023-08-28T08:26:54.000000Z\",\n\t\t\t\t\t\t\t\t\"currency\": \"usd\",\n\t\t\t\t\t\t\t\t\"countries\": null,\n\t\t\t\t\t\t\t\t\"entitlements\": [\n\t\t\t\t\t\t\t\t\t\"ddffda\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"preset_donation_values\": null,\n\t\t\t\t\t\t\t\t\"interval\": \"day\",\n\t\t\t\t\t\t\t\t\"interval_count\": 1,\n\t\t\t\t\t\t\t\t\"is_imported\": false,\n\t\t\t\t\t\t\t\t\"import_unique_id\": null,\n\t\t\t\t\t\t\t\t\"is_hidden\": false,\n\t\t\t\t\t\t\t\t\"is_donation\": false,\n\t\t\t\t\t\t\t\t\"image\": null,\n\t\t\t\t\t\t\t\t\"livemode\": false,\n\t\t\t\t\t\t\t\t\"metadata\": null,\n\t\t\t\t\t\t\t\t\"member_seat_capacity\": null,\n\t\t\t\t\t\t\t\t\"nickname\": \"Plan 1 edit\",\n\t\t\t\t\t\t\t\t\"name_internal\": null,\n\t\t\t\t\t\t\t\t\"refundable\": true,\n\t\t\t\t\t\t\t\t\"shipments_per_interval\": null,\n\t\t\t\t\t\t\t\t\"description\": null,\n\t\t\t\t\t\t\t\t\"gift_description\": null,\n\t\t\t\t\t\t\t\t\"tiers\": null,\n\t\t\t\t\t\t\t\t\"tiers_mode\": null,\n\t\t\t\t\t\t\t\t\"transform_usage\": null,\n\t\t\t\t\t\t\t\t\"trial_period_days\": 0,\n\t\t\t\t\t\t\t\t\"usage_type\": \"licensed\",\n\t\t\t\t\t\t\t\t\"agency_id\": null,\n\t\t\t\t\t\t\t\t\"agency_remit_rate\": null,\n\t\t\t\t\t\t\t\t\"ip_addresses\": null,\n\t\t\t\t\t\t\t\t\"domains\": null,\n\t\t\t\t\t\t\t\t\"idempotency_key\": \"00000000-007b-6316-beb0-00000007b316\",\n\t\t\t\t\t\t\t\t\"expires_at\": null,\n\t\t\t\t\t\t\t\t\"created_at\": \"2023-08-28T08:26:54.000000Z\",\n\t\t\t\t\t\t\t\t\"updated_at\": \"2024-03-21T18:59:07.000000Z\",\n\t\t\t\t\t\t\t\t\"deleted_at\": null,\n\t\t\t\t\t\t\t\t\"apple_product_id\": null,\n\t\t\t\t\t\t\t\t\"old_provider_id\": null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"start_date\": 1720742546,\n\t\t\t\t\t\"tax_percent\": null,\n\t\t\t\t\t\"trial_end\": null\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"coupon\": {\n\t\t\t\t\t\t\"id\": 47,\n\t\t\t\t\t\t\"account_id\": 1,\n\t\t\t\t\t\t\"object_id\": \"WCls4cg6\",\n\t\t\t\t\t\t\"site_id\": 1,\n\t\t\t\t\t\t\"type\": \"subscription\",\n\t\t\t\t\t\t\"amount_off\": null,\n\t\t\t\t\t\t\"currency\": null,\n\t\t\t\t\t\t\"code\": \"SYSTEM_GIFT\",\n\t\t\t\t\t\t\"created\": \"2023-11-25T02:09:07.000000Z\",\n\t\t\t\t\t\t\"duration\": \"forever\",\n\t\t\t\t\t\t\"duration_in_months\": null,\n\t\t\t\t\t\t\"is_system\": true,\n\t\t\t\t\t\t\"is_for_gifted_subscription\": true,\n\t\t\t\t\t\t\"is_hidden\": false,\n\t\t\t\t\t\t\"livemode\": false,\n\t\t\t\t\t\t\"name\": \"GIFT_SUBSCRIPTION\",\n\t\t\t\t\t\t\"max_redemptions\": null,\n\t\t\t\t\t\t\"metadata\": null,\n\t\t\t\t\t\t\"percent_off\": 100,\n\t\t\t\t\t\t\"redeem_by\": null,\n\t\t\t\t\t\t\"times_redeemed\": 0,\n\t\t\t\t\t\t\"valid\": true,\n\t\t\t\t\t\t\"idempotency_key\": \"00000000-007b-6316-a3c7-00000007b316\",\n\t\t\t\t\t\t\"created_at\": \"2023-11-25T02:09:06.000000Z\",\n\t\t\t\t\t\t\"updated_at\": \"2023-11-25T02:09:07.000000Z\",\n\t\t\t\t\t\t\"deleted_at\": null,\n\t\t\t\t\t\t\"discount_type\": \"percentage\"\n\t\t\t\t\t},\n\t\t\t\t\t\"end_date\": 1720915346,\n\t\t\t\t\t\"plans\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"id\": 9136,\n\t\t\t\t\t\t\t\"index\": 0,\n\t\t\t\t\t\t\t\"subscription_schedule_phase_id\": 9144,\n\t\t\t\t\t\t\t\"plan_id\": 1,\n\t\t\t\t\t\t\t\"plan_object_id\": \"plan_OX4wn5NT455iZj\",\n\t\t\t\t\t\t\t\"price_object_id\": \"plan_OX4wn5NT455iZj\",\n\t\t\t\t\t\t\t\"billing_thresholds\": null,\n\t\t\t\t\t\t\t\"quantity\": 1,\n\t\t\t\t\t\t\t\"created_at\": \"2024-07-10T12:45:43.000000Z\",\n\t\t\t\t\t\t\t\"updated_at\": \"2024-07-10T12:45:43.000000Z\",\n\t\t\t\t\t\t\t\"deleted_at\": null,\n\t\t\t\t\t\t\t\"tax_rates\": [],\n\t\t\t\t\t\t\t\"plan\": {\n\t\t\t\t\t\t\t\t\"id\": 1,\n\t\t\t\t\t\t\t\t\"pelcro_owned\": false,\n\t\t\t\t\t\t\t\t\"product_id\": 1,\n\t\t\t\t\t\t\t\t\"parent_plan_id\": null,\n\t\t\t\t\t\t\t\t\"account_id\": 1,\n\t\t\t\t\t\t\t\t\"object_id\": \"plan_OX4wn5NT455iZj\",\n\t\t\t\t\t\t\t\t\"active\": \"active\",\n\t\t\t\t\t\t\t\t\"type\": \"regular\",\n\t\t\t\t\t\t\t\t\"aggregate_usage\": null,\n\t\t\t\t\t\t\t\t\"amount\": 12300,\n\t\t\t\t\t\t\t\t\"recognized_revenue_type\": \"time\",\n\t\t\t\t\t\t\t\t\"renewal_strategy\": null,\n\t\t\t\t\t\t\t\t\"auto_renew\": true,\n\t\t\t\t\t\t\t\t\"available_online\": true,\n\t\t\t\t\t\t\t\t\"billing_scheme\": \"per_unit\",\n\t\t\t\t\t\t\t\t\"allow_send_invoice\": false,\n\t\t\t\t\t\t\t\t\"auto_uncollectible_days\": null,\n\t\t\t\t\t\t\t\t\"invoice_upcoming_notification\": null,\n\t\t\t\t\t\t\t\t\"created\": \"2023-08-28T08:26:54.000000Z\",\n\t\t\t\t\t\t\t\t\"currency\": \"usd\",\n\t\t\t\t\t\t\t\t\"countries\": null,\n\t\t\t\t\t\t\t\t\"entitlements\": [\n\t\t\t\t\t\t\t\t\t\"ddffda\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"preset_donation_values\": null,\n\t\t\t\t\t\t\t\t\"interval\": \"day\",\n\t\t\t\t\t\t\t\t\"interval_count\": 1,\n\t\t\t\t\t\t\t\t\"is_imported\": false,\n\t\t\t\t\t\t\t\t\"import_unique_id\": null,\n\t\t\t\t\t\t\t\t\"is_hidden\": false,\n\t\t\t\t\t\t\t\t\"is_donation\": false,\n\t\t\t\t\t\t\t\t\"image\": null,\n\t\t\t\t\t\t\t\t\"livemode\": false,\n\t\t\t\t\t\t\t\t\"metadata\": null,\n\t\t\t\t\t\t\t\t\"member_seat_capacity\": null,\n\t\t\t\t\t\t\t\t\"nickname\": \"Plan 1 edit\",\n\t\t\t\t\t\t\t\t\"name_internal\": null,\n\t\t\t\t\t\t\t\t\"refundable\": true,\n\t\t\t\t\t\t\t\t\"shipments_per_interval\": null,\n\t\t\t\t\t\t\t\t\"description\": null,\n\t\t\t\t\t\t\t\t\"gift_description\": null,\n\t\t\t\t\t\t\t\t\"tiers\": null,\n\t\t\t\t\t\t\t\t\"tiers_mode\": null,\n\t\t\t\t\t\t\t\t\"transform_usage\": null,\n\t\t\t\t\t\t\t\t\"trial_period_days\": 0,\n\t\t\t\t\t\t\t\t\"usage_type\": \"licensed\",\n\t\t\t\t\t\t\t\t\"agency_id\": null,\n\t\t\t\t\t\t\t\t\"agency_remit_rate\": null,\n\t\t\t\t\t\t\t\t\"ip_addresses\": null,\n\t\t\t\t\t\t\t\t\"domains\": null,\n\t\t\t\t\t\t\t\t\"idempotency_key\": \"00000000-007b-6316-beb0-00000007b316\",\n\t\t\t\t\t\t\t\t\"expires_at\": null,\n\t\t\t\t\t\t\t\t\"created_at\": \"2023-08-28T08:26:54.000000Z\",\n\t\t\t\t\t\t\t\t\"updated_at\": \"2024-03-21T18:59:07.000000Z\",\n\t\t\t\t\t\t\t\t\"deleted_at\": null,\n\t\t\t\t\t\t\t\t\"apple_product_id\": null,\n\t\t\t\t\t\t\t\t\"old_provider_id\": null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"start_date\": 1720828946,\n\t\t\t\t\t\"tax_percent\": null,\n\t\t\t\t\t\"trial_end\": null\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"metadata\": {\n\t\t\t\"gift_donor_subscription_id\": \"1935\",\n\t\t\t\"is_gift_recipient\": \"1\"\n\t\t},\n\t\t\"expires_at\": 1720915346,\n\t\t\"renews_at\": 1720742546,\n\t\t\"end_date\": null,\n\t\t\"recommended_plan_id\": null\n\t},\n\t\"status\": \"success\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1944,
                          "default": 0
                        },
                        "address": {
                          "type": "integer",
                          "example": 249,
                          "default": 0
                        },
                        "plan": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "coupon": {
                          "type": "integer",
                          "example": 47,
                          "default": 0
                        },
                        "default_source": {},
                        "latest_invoice": {},
                        "user_id": {
                          "type": "integer",
                          "example": 3306,
                          "default": 0
                        },
                        "customer_id": {
                          "type": "integer",
                          "example": 3306,
                          "default": 0
                        },
                        "address_required": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "billing": {
                          "type": "string",
                          "example": "charge_automatically"
                        },
                        "cancel_at": {},
                        "cancel_at_period_end": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "auto_renew": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "canceled_at": {},
                        "created": {
                          "type": "integer",
                          "example": 1720569746,
                          "default": 0
                        },
                        "current_period_end": {
                          "type": "integer",
                          "example": 1720742546,
                          "default": 0
                        },
                        "current_period_start": {
                          "type": "integer",
                          "example": 1720656146,
                          "default": 0
                        },
                        "days_until_due": {},
                        "start_date": {
                          "type": "integer",
                          "example": 1720569746,
                          "default": 0
                        },
                        "domains": {},
                        "ended_at": {},
                        "source": {},
                        "quantity": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "status": {
                          "type": "string",
                          "example": "active"
                        },
                        "trial_end": {},
                        "trial_start": {},
                        "is_gift_donor": {},
                        "is_gift_recipient": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "is_imported": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "ip_addresses": {},
                        "gift_donor_subscription_id": {
                          "type": "integer",
                          "example": 1935,
                          "default": 0
                        },
                        "gift_code": {},
                        "is_redeemed": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "cancel_reason": {},
                        "shipments_remaining": {},
                        "shipments_undeliverable": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "shipments_suspended_until": {},
                        "old_provider_id": {},
                        "schedule": {
                          "type": "object",
                          "properties": {
                            "billing": {
                              "type": "string",
                              "example": "charge_automatically"
                            },
                            "created": {
                              "type": "integer",
                              "example": 1720569746,
                              "default": 0
                            },
                            "current_phase": {
                              "type": "object",
                              "properties": {
                                "end_date": {
                                  "type": "integer",
                                  "example": 1720742546,
                                  "default": 0
                                },
                                "start_date": {
                                  "type": "integer",
                                  "example": 1720656146,
                                  "default": 0
                                }
                              }
                            },
                            "end_behavior": {
                              "type": "string",
                              "example": "cancel"
                            },
                            "renewal_behavior": {
                              "type": "string",
                              "example": "cancel"
                            },
                            "status": {
                              "type": "string",
                              "example": "active"
                            },
                            "phases": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "coupon": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "integer",
                                        "example": 47,
                                        "default": 0
                                      },
                                      "account_id": {
                                        "type": "integer",
                                        "example": 1,
                                        "default": 0
                                      },
                                      "object_id": {
                                        "type": "string",
                                        "example": "WCls4cg6"
                                      },
                                      "site_id": {
                                        "type": "integer",
                                        "example": 1,
                                        "default": 0
                                      },
                                      "type": {
                                        "type": "string",
                                        "example": "subscription"
                                      },
                                      "amount_off": {},
                                      "currency": {},
                                      "code": {
                                        "type": "string",
                                        "example": "SYSTEM_GIFT"
                                      },
                                      "created": {
                                        "type": "string",
                                        "example": "2023-11-25T02:09:07.000000Z"
                                      },
                                      "duration": {
                                        "type": "string",
                                        "example": "forever"
                                      },
                                      "duration_in_months": {},
                                      "is_system": {
                                        "type": "boolean",
                                        "example": true,
                                        "default": true
                                      },
                                      "is_for_gifted_subscription": {
                                        "type": "boolean",
                                        "example": true,
                                        "default": true
                                      },
                                      "is_hidden": {
                                        "type": "boolean",
                                        "example": false,
                                        "default": true
                                      },
                                      "livemode": {
                                        "type": "boolean",
                                        "example": false,
                                        "default": true
                                      },
                                      "name": {
                                        "type": "string",
                                        "example": "GIFT_SUBSCRIPTION"
                                      },
                                      "max_redemptions": {},
                                      "metadata": {},
                                      "percent_off": {
                                        "type": "integer",
                                        "example": 100,
                                        "default": 0
                                      },
                                      "redeem_by": {},
                                      "times_redeemed": {
                                        "type": "integer",
                                        "example": 0,
                                        "default": 0
                                      },
                                      "valid": {
                                        "type": "boolean",
                                        "example": true,
                                        "default": true
                                      },
                                      "idempotency_key": {
                                        "type": "string",
                                        "example": "00000000-007b-6316-a3c7-00000007b316"
                                      },
                                      "created_at": {
                                        "type": "string",
                                        "example": "2023-11-25T02:09:06.000000Z"
                                      },
                                      "updated_at": {
                                        "type": "string",
                                        "example": "2023-11-25T02:09:07.000000Z"
                                      },
                                      "deleted_at": {},
                                      "discount_type": {
                                        "type": "string",
                                        "example": "percentage"
                                      }
                                    }
                                  },
                                  "end_date": {
                                    "type": "integer",
                                    "example": 1720742546,
                                    "default": 0
                                  },
                                  "plans": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "integer",
                                          "example": 9134,
                                          "default": 0
                                        },
                                        "index": {
                                          "type": "integer",
                                          "example": 0,
                                          "default": 0
                                        },
                                        "subscription_schedule_phase_id": {
                                          "type": "integer",
                                          "example": 9142,
                                          "default": 0
                                        },
                                        "plan_id": {
                                          "type": "integer",
                                          "example": 1,
                                          "default": 0
                                        },
                                        "plan_object_id": {
                                          "type": "string",
                                          "example": "plan_OX4wn5NT455iZj"
                                        },
                                        "price_object_id": {
                                          "type": "string",
                                          "example": "plan_OX4wn5NT455iZj"
                                        },
                                        "billing_thresholds": {},
                                        "quantity": {
                                          "type": "integer",
                                          "example": 1,
                                          "default": 0
                                        },
                                        "created_at": {
                                          "type": "string",
                                          "example": "2024-07-10T00:02:27.000000Z"
                                        },
                                        "updated_at": {
                                          "type": "string",
                                          "example": "2024-07-10T00:02:27.000000Z"
                                        },
                                        "deleted_at": {},
                                        "tax_rates": {
                                          "type": "array"
                                        },
                                        "plan": {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "integer",
                                              "example": 1,
                                              "default": 0
                                            },
                                            "pelcro_owned": {
                                              "type": "boolean",
                                              "example": false,
                                              "default": true
                                            },
                                            "product_id": {
                                              "type": "integer",
                                              "example": 1,
                                              "default": 0
                                            },
                                            "parent_plan_id": {},
                                            "account_id": {
                                              "type": "integer",
                                              "example": 1,
                                              "default": 0
                                            },
                                            "object_id": {
                                              "type": "string",
                                              "example": "plan_OX4wn5NT455iZj"
                                            },
                                            "active": {
                                              "type": "string",
                                              "example": "active"
                                            },
                                            "type": {
                                              "type": "string",
                                              "example": "regular"
                                            },
                                            "aggregate_usage": {},
                                            "amount": {
                                              "type": "integer",
                                              "example": 12300,
                                              "default": 0
                                            },
                                            "recognized_revenue_type": {
                                              "type": "string",
                                              "example": "time"
                                            },
                                            "renewal_strategy": {},
                                            "auto_renew": {
                                              "type": "boolean",
                                              "example": true,
                                              "default": true
                                            },
                                            "available_online": {
                                              "type": "boolean",
                                              "example": true,
                                              "default": true
                                            },
                                            "billing_scheme": {
                                              "type": "string",
                                              "example": "per_unit"
                                            },
                                            "allow_send_invoice": {
                                              "type": "boolean",
                                              "example": false,
                                              "default": true
                                            },
                                            "auto_uncollectible_days": {},
                                            "invoice_upcoming_notification": {},
                                            "created": {
                                              "type": "string",
                                              "example": "2023-08-28T08:26:54.000000Z"
                                            },
                                            "currency": {
                                              "type": "string",
                                              "example": "usd"
                                            },
                                            "countries": {},
                                            "entitlements": {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "example": "ddffda"
                                              }
                                            },
                                            "preset_donation_values": {},
                                            "interval": {
                                              "type": "string",
                                              "example": "day"
                                            },
                                            "interval_count": {
                                              "type": "integer",
                                              "example": 1,
                                              "default": 0
                                            },
                                            "is_imported": {
                                              "type": "boolean",
                                              "example": false,
                                              "default": true
                                            },
                                            "import_unique_id": {},
                                            "is_hidden": {
                                              "type": "boolean",
                                              "example": false,
                                              "default": true
                                            },
                                            "is_donation": {
                                              "type": "boolean",
                                              "example": false,
                                              "default": true
                                            },
                                            "image": {},
                                            "livemode": {
                                              "type": "boolean",
                                              "example": false,
                                              "default": true
                                            },
                                            "metadata": {},
                                            "member_seat_capacity": {},
                                            "nickname": {
                                              "type": "string",
                                              "example": "Plan 1 edit"
                                            },
                                            "name_internal": {},
                                            "refundable": {
                                              "type": "boolean",
                                              "example": true,
                                              "default": true
                                            },
                                            "shipments_per_interval": {},
                                            "description": {},
                                            "gift_description": {},
                                            "tiers": {},
                                            "tiers_mode": {},
                                            "transform_usage": {},
                                            "trial_period_days": {
                                              "type": "integer",
                                              "example": 0,
                                              "default": 0
                                            },
                                            "usage_type": {
                                              "type": "string",
                                              "example": "licensed"
                                            },
                                            "agency_id": {},
                                            "agency_remit_rate": {},
                                            "ip_addresses": {},
                                            "domains": {},
                                            "idempotency_key": {
                                              "type": "string",
                                              "example": "00000000-007b-6316-beb0-00000007b316"
                                            },
                                            "expires_at": {},
                                            "created_at": {
                                              "type": "string",
                                              "example": "2023-08-28T08:26:54.000000Z"
                                            },
                                            "updated_at": {
                                              "type": "string",
                                              "example": "2024-03-21T18:59:07.000000Z"
                                            },
                                            "deleted_at": {},
                                            "apple_product_id": {},
                                            "old_provider_id": {}
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "start_date": {
                                    "type": "integer",
                                    "example": 1720656146,
                                    "default": 0
                                  },
                                  "tax_percent": {},
                                  "trial_end": {}
                                }
                              }
                            }
                          }
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "gift_donor_subscription_id": {
                              "type": "string",
                              "example": "1935"
                            },
                            "is_gift_recipient": {
                              "type": "string",
                              "example": "1"
                            }
                          }
                        },
                        "expires_at": {
                          "type": "integer",
                          "example": 1720915346,
                          "default": 0
                        },
                        "renews_at": {
                          "type": "integer",
                          "example": 1720742546,
                          "default": 0
                        },
                        "end_date": {},
                        "recommended_plan_id": {}
                      }
                    },
                    "status": {
                      "type": "string",
                      "example": "success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"errors\": {\n\t\t\"gift_code\": [\n\t\t\t\"The gift code has been already redeemed. Please try a valid gift code!.\"\n\t\t]\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "object",
                      "properties": {
                        "gift_code": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "The gift code has been already redeemed. Please try a valid gift code!."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"errors\": \"This action is unauthorized.\",\n  \"error_message\": \"API Authorization Error\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "string",
                      "example": "This action is unauthorized."
                    },
                    "error_message": {
                      "type": "string",
                      "example": "API Authorization Error"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```