---
agentTools:
  projectIndex: https://docs.bictorys.com/llms.txt
---

# Returns list of subscription plans

This API returns all subscription plans for a merchant.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Billing Management",
    "description": "This API helps manage recurring billing and flexible payment plans. Merchants can create\nSubscriptions (e.g. rent, monthly services, tontines)\nBNPL options (e.g. deposits, installment payments, invoice advances)\nUse Cases Rent and monthly subscription payments\nPayment splitting with or without deposit",
    "contact": {
      "email": "support@bictorys.com"
    },
    "version": "1.0.0",
    "x-bictory-api-billing": "billing",
    "x-bictorys-api-type": "public"
  },
  "servers": [
    {
      "url": "https://api.test.bictorys.com/billing/v1",
      "description": "Test Environment"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Subscription Plan",
      "description": "API endpoints to manage subscription plans"
    }
  ],
  "paths": {
    "/subscription-plans": {
      "get": {
        "tags": [
          "Subscription Plan"
        ],
        "summary": "Returns list of subscription plans",
        "description": "This API returns all subscription plans for a merchant.\n",
        "operationId": "getSubscriptionPlans",
        "parameters": [
          {
            "name": "X-Amzn-Trace-Id",
            "in": "header",
            "description": "HTTP request identifier allow to trace individual request sent from client to service.\n",
            "schema": {
              "type": "string"
            },
            "required": false,
            "example": "33e1c83b-7cb0-437b-bc50-a7a58e5660ad"
          }
        ],
        "responses": {
          "200": {
            "description": "returns list of subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionResponseObject"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated"
          },
          "403": {
            "description": "Access rights not sufficient"
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SubscriptionRequestObject": {
        "type": "object",
        "properties": {
          "reference": {
            "description": "Optional. subscription reference.",
            "type": "string",
            "example": "yourplan_CF34509"
          },
          "subscriptionPlanId": {
            "description": "The identifier of  the subscription plan chosen by the customer",
            "type": "string",
            "format": "uuid",
            "example": "fbd2053b-638d-4133-957e-3caf63e6b79c"
          },
          "startDate": {
            "description": "start date of the first installement. Next installement is due one month after, and so one. the startDate must be today date or in the futur.",
            "type": "string",
            "format": "date",
            "example": "2023-05-22"
          },
          "customerId": {
            "description": "Required. Unique Id of the customer.",
            "type": "string",
            "format": "uuid",
            "example": "fbd2053b-638d-4133-957e-3caf63e6b79c"
          },
          "notificationChannel": {
            "$ref": "#/components/schemas/NotificationChannel",
            "default": "email"
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus",
            "readOnly": true
          }
        },
        "required": [
          "subscriptionPlanId",
          "startDate",
          "customerId"
        ]
      },
      "SubscriptionResponseObject": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "description": "Unique Identifier of the Subscription Response object",
                "type": "string",
                "format": "uuid",
                "example": "fbd2053b-638d-4133-957e-3caf63e6b79c"
              }
            }
          },
          {
            "$ref": "#/components/schemas/SubscriptionRequestObject"
          },
          {
            "type": "object",
            "properties": {
              "nextInstallmentDueDate": {
                "description": "date of next installment due date. At 7h00 UTC at the date the request to pay link will be send to the customer",
                "type": "string",
                "format": "date",
                "example": "2023-05-22"
              },
              "nbrPaidInstallments": {
                "description": "number of already paid installments.",
                "type": "integer",
                "example": 2
              },
              "nbrUnpaidInstallments": {
                "description": "number of unpaid installments since the beginning.",
                "type": "integer",
                "example": 1
              },
              "customerName": {
                "description": "Customer Name",
                "type": "string",
                "example": "John Dao"
              },
              "currentInstallmentStatus": {
                "$ref": "#/components/schemas/PaymentStatus"
              },
              "createdAt": {
                "description": "The merchant entity registration timestamp in our platform in ISO 8601 (YYYY-mm-dd HH:mm:ss,SSSS)",
                "type": "string",
                "readOnly": true,
                "example": "2022-03-29 10:00:00,000"
              },
              "updatedAt": {
                "description": "updated timestamp in our platform in ISO 8601 (YYYY-mm-dd HH:mm:ss,SSSS)",
                "type": "string",
                "readOnly": true
              }
            }
          }
        ]
      },
      "SubscriptionStatus": {
        "type": "string",
        "enum": [
          "opened",
          "started",
          "cancelled",
          "completed"
        ],
        "example": "completed"
      },
      "PaymentStatus": {
        "description": "status of the transaction",
        "type": "string",
        "enum": [
          "succeeded",
          "failed",
          "cancelled",
          "pending",
          "processing",
          "reversed",
          "authorized"
        ]
      },
      "NotificationChannel": {
        "description": "By which means the payment link will be send to the customer",
        "type": "string",
        "enum": [
          "email",
          "sms",
          "whatsApp",
          "none"
        ]
      },
      "BadRequestError": {
        "type": "object",
        "properties": {
          "status": {
            "description": "http status code",
            "type": "string",
            "example": "400"
          },
          "title": {
            "type": "string",
            "example": "Bad request.",
            "default": "Bad request."
          },
          "details": {
            "description": "error details",
            "type": "string",
            "example": "E400-0 card info is missing",
            "enum": [
              "E400-0: Bad id is passed",
              "E400-0: Bad transaction type is passed",
              "E400-0: Bad transactionId is passed",
              "E400-0: Group name is missing",
              "E400-0: Header Content-Type is missing",
              "E400-0: Header media-type is missing",
              "E400-0: Missing or Bad search key",
              "E400-0: Notification value is missing",
              "E400-0: NotificationDict is missing",
              "E400-0: Order id must be in UUID format",
              "E400-0: Payment failed",
              "E400-0: Request timeout",
              "E400-0: Same Idempotency is passed",
              "E400-0: Setting value is missing or not allowed",
              "E400-0: SettingDict is missing",
              "E400-0: Unexpected Error",
              "E400-0: account status is missing",
              "E400-0: apikey is missing",
              "E400-0: bad cardId is passed",
              "E400-0: bad merchant id is passed",
              "E400-0: bad or missing scope in request body",
              "E400-0: bad type is passed",
              "E400-0: callbackUrl is missing",
              "E400-0: card info is missing",
              "E400-0: merchant public key is missing",
              "E400-0: merchantId is missing",
              "E400-0: offline checkout write is missing",
              "E400-0: password is missing",
              "E400-0: redirectUrl must start with https://",
              "E400-0: representative address is missing",
              "E400-0: type is missing in request body",
              "E400-0: unknown apikeyId",
              "E400-0: unknown or unauthorized permission is passed",
              "E400-00: country is missing",
              "E400-01: Order name is missing",
              "E400-1: Name is missing",
              "E400-1: merchant name is missing",
              "E400-1: representative name is missing",
              "E400-2: representative email is missing",
              "E400-3: phone number is required",
              "E400-4: merchant country is missing",
              "E400-6: Amount is missing",
              "E400-7: Invalid Name Format",
              "E400-8: Invalid Email Format",
              "E400-9: Invalid phone number Format",
              "E400-10: Invalid Country format",
              "E400-12: Currency is missing",
              "E400-13: PaymentType is missing",
              "E400-16: File size must not exceed 4ko",
              "E400-17: File size must not exceed 1Mo",
              "E400-18: IBAN is missing",
              "E400-19: beneficiaryName is missing",
              "E400-20: Expired Or Bad OTP",
              "E400-20: Expired Or Bad OTP or Bad MerchantId",
              "E400-20: Expired Or Bad OTP or Bad PhoneNumberId",
              "E400-20: Resource is no longer available",
              "E400-21: representative object is missing",
              "E400-22: Unsupported media type. Supported type are pdf, jpeg and png",
              "E400-23: Unsupported media type. use png",
              "E400-24: Selected Currency is not yet supported for this country",
              "E400-25: Payment type is disabled by merchant",
              "E400-26: Invoice or Order is paid or expired",
              "E400-27: payment link is paid or expired",
              "E400-28: Money transfer is not authorized for this merchant",
              "E400-29: product price is missing in a Item line Object",
              "E400-30: product quantity is missing in a Item line Object",
              "E400-31: Due date is required",
              "E400-32: Already expired",
              "E400-33: Wrong payment type or disabled",
              "E400-34: User does not have a secret Code",
              "E400-35: SecretCode is locked, you must reset it",
              "E400-36: Wrong secret code is passed",
              "E400-37: Secret code is missing",
              "E400-38: Insufficient balance",
              "E400-39: Wrong country is passed",
              "E400-40: Invoice is expired",
              "E400-41: Wrong date format is used",
              "E400-42: Invalid Category format",
              "E400-43: Invalid City format",
              "E400-44: Merchant does not exist",
              "E400-45: Invalid Reference format",
              "E400-46: Invalid paymentReference format",
              "E400-47: Invoice is already paid",
              "E400-48: Payment link already paid",
              "E400-49: Error from PSP, Check your account",
              "E400-50: Amount exceed available capture",
              "E400-51: Wrong secret code is passed",
              "E400-52: You must register you phone number first",
              "E400-53: You don't have a secret code",
              "E400-54: You secret code is locked, do reset",
              "E400-55: Phone number must be in international format",
              "E400-55: Employee email is required",
              "E400-60: orderDetails is missing. Add at least one order item",
              "E400-71: Invalid Merchant Name Format. Remove special Characters",
              "E400-72: Invalid City Name Format. Remove special Characters",
              "E400-73: Invalid Country Name Format. Remove special Characters",
              "E400-74: Customer Id is missing",
              "E400-75: Subscription Plan Id is missing",
              "E400-75: Start Date is missing",
              "E401-1: Invalid Token",
              "E401-1: bearer token or apikey is missing",
              "E401-2: bearer token is missing",
              "E401-3: Invalid apikey",
              "E401-4: Cannot delete public key",
              "E401-5: Your Account is restricted",
              "E401-6: Your Account is not activated",
              "E403-1: Access right not sufficient",
              "E403-2: 2FA authentication is required",
              "E404-1: Cannot find resource",
              "E409-1 Merchant Representation has already an account"
            ]
          }
        }
      },
      "InternalServerError": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "An error has occurred.",
            "default": "An error has occurred."
          },
          "details": {
            "type": "string",
            "example": "An error has occurred.",
            "default": "An error has occurred."
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 104,
      "1": 45,
      "2": 219,
      "3": 74,
      "4": 39,
      "5": 173,
      "6": 138,
      "7": 0,
      "8": 50,
      "9": 121,
      "10": 15,
      "11": 45
    }
  }
}
```