---
agentTools:
  projectIndex: https://copperx.readme.io/llms.txt
---

# Get a subscription

Returns a subscription

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/api/v1/subscriptions/{id}": {
      "get": {
        "operationId": "SubscriptionController_get",
        "summary": "Get a subscription",
        "description": "Returns a subscription",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDto"
                }
              }
            }
          }
        },
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    }
  },
  "info": {
    "title": "Copperx API",
    "description": "Copperx APIs allows you to access to manage payments, transactions and more in a simple way. Our APIs are easy to use and provide an intuitive APIs for developers to create powerful applications.",
    "version": "v0.0.0",
    "contact": {
      "name": "Copperx",
      "url": "https://t.me/+bVxXaalfhF8wMDFl",
      "email": "support@copperx.io"
    }
  },
  "servers": [
    {
      "url": "https://api.copperx.dev",
      "description": "Test"
    },
    {
      "url": "https://api.copperx.io",
      "description": "Production"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "ErrorDto": {
        "type": "object",
        "properties": {
          "message": {
            "type": "object"
          },
          "statusCode": {
            "type": "number"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "message",
          "statusCode",
          "error"
        ]
      },
      "PaymentMethodType": {
        "type": "string",
        "enum": [
          "superfluid",
          "wallet",
          "allowance_based_recurring",
          "stripe",
          "binance_pay"
        ]
      },
      "CryptoCurrency": {
        "type": "string",
        "enum": [
          "usdc",
          "usdt",
          "pyusd",
          "eurc",
          "brett",
          "dai",
          "btc",
          "eth",
          "matic",
          "bnb",
          "sol",
          "busd",
          "trx",
          "food",
          "bonk",
          "wif",
          "goat",
          "spx",
          "truf",
          "pengu"
        ]
      },
      "AddressDetailDto": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          }
        }
      },
      "Interval": {
        "type": "string",
        "enum": [
          "day",
          "week",
          "month",
          "year"
        ]
      },
      "EntityVisibility": {
        "type": "string",
        "enum": [
          10,
          20
        ]
      },
      "PriceType": {
        "type": "string",
        "enum": [
          "one_time",
          "recurring",
          "streaming"
        ]
      },
      "Currency": {
        "type": "string",
        "enum": [
          "usdc",
          "usdt",
          "pyusd",
          "eurc",
          "brett",
          "dai",
          "btc",
          "eth",
          "matic",
          "bnb",
          "sol",
          "busd",
          "trx",
          "food",
          "bonk",
          "wif",
          "goat",
          "spx",
          "truf",
          "pengu",
          "usd",
          "inr"
        ]
      },
      "FullAddressDetailDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name"
          },
          "email": {
            "type": "string",
            "description": "The email"
          },
          "phone": {
            "type": "string",
            "description": "The phone"
          },
          "organizationName": {
            "type": "string",
            "description": "The organization name"
          },
          "address": {
            "description": "The address",
            "allOf": [
              {
                "$ref": "#/components/schemas/AddressDetailDto"
              }
            ]
          }
        }
      },
      "TaxIdDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "customerId": {
            "type": "string",
            "format": "uuid",
            "example": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
          }
        },
        "required": [
          "id",
          "customerId"
        ]
      },
      "TaxIdsDto": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxIdDto"
            }
          }
        }
      },
      "CustomerDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name"
          },
          "email": {
            "type": "string",
            "description": "The email"
          },
          "phone": {
            "type": "string",
            "description": "The phone"
          },
          "organizationName": {
            "type": "string",
            "description": "The organization name"
          },
          "address": {
            "description": "The address",
            "allOf": [
              {
                "$ref": "#/components/schemas/AddressDetailDto"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "example": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
            "description": "Customer's id"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Customer's created at"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Customer's updated at"
          },
          "customerReferenceId": {
            "type": "string",
            "description": "Customer's reference id"
          },
          "shipping": {
            "description": "Customer's shipping address",
            "allOf": [
              {
                "$ref": "#/components/schemas/FullAddressDetailDto"
              }
            ]
          },
          "taxIds": {
            "$ref": "#/components/schemas/TaxIdsDto"
          },
          "visibility": {
            "description": "Customer's visibility. If Dashboard then displayed on dashboard UI. If API then only returned in API response only.",
            "$ref": "#/components/schemas/EntityVisibility"
          },
          "metadata": {
            "type": "object",
            "description": "Customer's metadata"
          },
          "customerNumber": {
            "type": "string",
            "description": "Customer number assigned by the system"
          }
        },
        "required": [
          "id",
          "customerNumber"
        ]
      },
      "BillingScheme": {
        "type": "string",
        "enum": [
          "per_unit"
        ]
      },
      "RecurringUsageType": {
        "type": "string",
        "enum": [
          "licensed"
        ]
      },
      "PublicProductDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The name of the product. Displayed on the checkout page"
          },
          "description": {
            "type": "string",
            "description": "The description of the product. Displayed on the checkout page"
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the product is currently active"
          },
          "images": {
            "maxItems": 8,
            "description": "The url of product images. Displayed on the checkout page",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "publicImages": {
            "description": "Product images with absolute public url",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "unitLabel": {
            "type": "string",
            "description": "The label of the unit of the product. Displayed on the checkout page"
          },
          "url": {
            "type": "string",
            "description": "The url of the product"
          },
          "defaultPriceId": {
            "type": "string",
            "format": "uuid",
            "example": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
            "description": "Product's default price id"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata of the product"
          },
          "visibility": {
            "description": "The visibility of the product",
            "$ref": "#/components/schemas/EntityVisibility"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "PublicPriceDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "billingScheme": {
            "description": "The billing scheme to use for this price",
            "$ref": "#/components/schemas/BillingScheme"
          },
          "currency": {
            "description": "The currency symbol",
            "$ref": "#/components/schemas/CryptoCurrency"
          },
          "productId": {
            "type": "string",
            "format": "uuid",
            "example": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
            "description": "Product's id"
          },
          "interval": {
            "description": "The interval at which to bill for this price. Only required for subscriptions",
            "$ref": "#/components/schemas/Interval"
          },
          "intervalCount": {
            "type": "number",
            "example": 1,
            "description": "It is used to determine the frequency at which the subscription is billed. Only required for subscriptions"
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the price is currently active"
          },
          "usageType": {
            "description": "The usage type of the price.",
            "$ref": "#/components/schemas/RecurringUsageType"
          },
          "type": {
            "description": "The type of the price",
            "$ref": "#/components/schemas/PriceType"
          },
          "unitAmount": {
            "format": "int64",
            "type": "integer",
            "example": "9223372036854775807",
            "description": "The unit amount in 8 decimals, represented as a whole integer. If not provided, the unit amount will be calculated from unit_amount_decimal."
          },
          "unitAmountDecimal": {
            "type": "string"
          },
          "customUnitMax": {
            "format": "int64",
            "type": "integer",
            "example": "9223372036854775807",
            "description": "The maximum amount that can be billed per unit for this price. Only if unit amount is not provided"
          },
          "customUnitMin": {
            "format": "int64",
            "type": "integer",
            "example": "9223372036854775807",
            "description": "The minimum amount that can be billed per unit for this price. Only if unit amount is not provided"
          },
          "customPreset": {
            "format": "int64",
            "type": "integer",
            "example": "9223372036854775807",
            "description": "The default amount to fill in the amount field for this price on checkout. Only if unit amount is not provided"
          },
          "customUnitAmountSuggestions": {
            "description": "Amount suggestions for this price. Only if unit amount is not provided",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "product": {
            "description": "The product this price belongs to",
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicProductDto"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "description": "A set of key-value pairs that you can attach to an object. It can be useful for storing additional information about the object in a structured format."
          },
          "visibility": {
            "description": "The visibility of the price. If dashboard, the price is visible in the dashboard",
            "$ref": "#/components/schemas/EntityVisibility"
          }
        },
        "required": [
          "id",
          "currency",
          "productId",
          "type",
          "product"
        ]
      },
      "TaxRateType": {
        "type": "string",
        "enum": [
          "exclusive",
          "inclusive"
        ]
      },
      "LineTaxRateDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The name of the tax rate."
          },
          "description": {
            "type": "string",
            "description": "The description of the tax rate."
          },
          "country": {
            "type": "string",
            "description": "The country of the tax rate."
          },
          "percentage": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "example": 1,
            "description": "Percent that will be added to subtotal as a tax."
          },
          "type": {
            "description": "The type of the tax rate.",
            "$ref": "#/components/schemas/TaxRateType"
          },
          "isDefault": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "percentage",
          "type",
          "isDefault"
        ]
      },
      "SuperTokenDto": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "description": "SuperToken's address"
          },
          "decimals": {
            "type": "number",
            "example": 1
          },
          "symbol": {
            "type": "string",
            "description": "SuperToken's symbol"
          }
        },
        "required": [
          "address",
          "decimals",
          "symbol"
        ]
      },
      "AssetDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Asset id"
          },
          "name": {
            "type": "string",
            "description": "Asset name"
          },
          "chainId": {
            "type": "number",
            "example": 1,
            "description": "Asset chain id"
          },
          "address": {
            "type": "string",
            "description": "Asset address on chain"
          },
          "currency": {
            "description": "Asset currency symbol",
            "$ref": "#/components/schemas/Currency"
          },
          "symbol": {
            "type": "string",
            "description": "Asset symbol"
          },
          "decimals": {
            "type": "number",
            "example": 1,
            "description": "Asset decimals in which it is represented on chain"
          },
          "coingeckoId": {
            "type": "string",
            "description": "Asset coingecko id"
          },
          "superToken": {
            "description": "SuperToken data",
            "allOf": [
              {
                "$ref": "#/components/schemas/SuperTokenDto"
              }
            ]
          },
          "isEIP5827Supported": {
            "type": "boolean",
            "description": "Is EIP5827 supported"
          }
        },
        "required": [
          "id",
          "name",
          "chainId",
          "address",
          "currency",
          "symbol",
          "decimals",
          "isEIP5827Supported"
        ]
      },
      "PaymentMethodDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "assetId": {
            "type": "string",
            "format": "uuid",
            "example": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
          },
          "asset": {
            "$ref": "#/components/schemas/AssetDto"
          },
          "type": {
            "$ref": "#/components/schemas/PaymentMethodType"
          },
          "accountAddress": {
            "type": "string"
          },
          "billingDetails": {
            "$ref": "#/components/schemas/FullAddressDetailDto"
          },
          "customerId": {
            "type": "string",
            "format": "uuid",
            "example": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
          },
          "options": {
            "type": "object"
          }
        },
        "required": [
          "id",
          "assetId",
          "asset",
          "type"
        ]
      },
      "CollectionMethod": {
        "type": "string",
        "enum": [
          "superfluid",
          "charge_automatically",
          "send_invoice"
        ]
      },
      "SubscriptionStatus": {
        "type": "string",
        "enum": [
          "incomplete",
          "incomplete_expired",
          "trialing",
          "active",
          "past_due",
          "canceled",
          "unpaid",
          "paused"
        ]
      },
      "SubscriptionPriceItemDto": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number",
            "example": 1
          },
          "price": {
            "$ref": "#/components/schemas/PublicPriceDto"
          },
          "taxRates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineTaxRateDto"
            }
          },
          "amountTotal": {
            "format": "int64",
            "type": "integer",
            "example": "9223372036854775807"
          },
          "amountSubtotal": {
            "format": "int64",
            "type": "integer",
            "example": "9223372036854775807"
          },
          "amountTax": {
            "format": "int64",
            "type": "integer",
            "example": "9223372036854775807"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          }
        },
        "required": [
          "price"
        ]
      },
      "SubscriptionPriceItemsDto": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionPriceItemDto"
            }
          }
        }
      },
      "SubscriptionDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid",
            "example": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "clientReferenceId": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/CryptoCurrency"
          },
          "collectionMethod": {
            "$ref": "#/components/schemas/CollectionMethod"
          },
          "interval": {
            "$ref": "#/components/schemas/Interval"
          },
          "intervalCount": {
            "type": "number",
            "example": 1
          },
          "paymentMethodTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentMethodType"
            }
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus"
          },
          "description": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "defaultPaymentMethodId": {
            "type": "string",
            "format": "uuid",
            "example": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
          },
          "defaultPaymentMethod": {
            "$ref": "#/components/schemas/PaymentMethodDto"
          },
          "customerId": {
            "type": "string",
            "format": "uuid",
            "example": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerDto"
          },
          "startDate": {
            "format": "date-time",
            "type": "string"
          },
          "endedAt": {
            "format": "date-time",
            "type": "string"
          },
          "cancelAt": {
            "format": "date-time",
            "type": "string"
          },
          "canceledAt": {
            "format": "date-time",
            "type": "string"
          },
          "lineItems": {
            "$ref": "#/components/schemas/SubscriptionPriceItemsDto"
          },
          "cancellationReason": {
            "type": "string"
          },
          "currentPeriodEnd": {
            "format": "date-time",
            "type": "string"
          },
          "currentPeriodStart": {
            "format": "date-time",
            "type": "string"
          },
          "cancelAtPeriodEnd": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "currency",
          "interval",
          "status",
          "lineItems"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 181,
      "2": 177,
      "3": 27,
      "4": 23,
      "5": 171,
      "6": 139,
      "7": 0,
      "8": 127,
      "9": 93,
      "10": 212,
      "11": 76
    }
  }
}
```