Skip to main content
POST
/
merchant
/
subscription
/
create_submit
Create Subscription
curl --request POST \
  --url https://api.unibee.dev/merchant/subscription/create_submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "planId": 123,
  "addonParams": [
    {
      "addonPlanId": 123,
      "quantity": 123
    }
  ],
  "applyPromoCredit": true,
  "applyPromoCreditAmount": 123,
  "cancelUrl": "<string>",
  "confirmCurrency": "<string>",
  "confirmTotalAmount": 123,
  "currency": "<string>",
  "discount": {
    "cycleLimit": 123,
    "discountAmount": 123,
    "discountPercentage": 123,
    "endTime": 123,
    "metadata": {},
    "recurring": true
  },
  "discountCode": "<string>",
  "email": "<string>",
  "externalUserId": "<string>",
  "freeInInitialPeriod": true,
  "freeTimeEnd": 123,
  "gatewayId": 123,
  "gatewayPaymentType": "<string>",
  "metadata": {},
  "paymentMethodId": "<string>",
  "paymentUIMode": "<string>",
  "productData": {
    "description": "<string>",
    "name": "<string>"
  },
  "quantity": 123,
  "returnUrl": "<string>",
  "splitPayment": true,
  "startIncomplete": true,
  "taxPercentage": 123,
  "trialEnd": 123,
  "user": {
    "email": "<string>",
    "address": "<string>",
    "city": "<string>",
    "companyName": "<string>",
    "countryCode": "<string>",
    "externalUserId": "<string>",
    "firstName": "<string>",
    "language": "<string>",
    "lastName": "<string>",
    "phone": "<string>",
    "registrationNumber": "<string>",
    "state": "<string>",
    "type": 123,
    "userName": "<string>",
    "vatNumber": "<string>",
    "zipCode": "<string>"
  },
  "userId": 123,
  "vatCountryCode": "<string>",
  "vatNumber": "<string>"
}
'
{
  "code": 123,
  "data": {
    "action": {},
    "invoiceId": "<string>",
    "link": "<string>",
    "otherPendingCryptoSubscription": {
      "addonParams": [
        {
          "addonPlanId": 123,
          "quantity": 123
        }
      ],
      "addons": [
        {
          "addonPlan": {
            "amount": 123,
            "bindingAddonIds": "<string>",
            "bindingOnetimeAddonIds": "<string>",
            "cancelAtTrialEnd": 123,
            "checkoutUrl": "<string>",
            "createTime": 123,
            "currency": "<string>",
            "description": "<string>",
            "disableAutoCharge": 123,
            "externalPlanId": "<string>",
            "extraMetricData": "<string>",
            "gasPayer": "<string>",
            "homeUrl": "<string>",
            "id": 123,
            "imageUrl": "<string>",
            "internalName": "<string>",
            "intervalCount": 123,
            "intervalUnit": "<string>",
            "merchantId": 123,
            "metadata": {},
            "metricLimits": [
              {
                "metricId": 123,
                "metricLimit": 123
              }
            ],
            "metricMeteredCharge": [
              {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              }
            ],
            "metricRecurringCharge": [
              {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              }
            ],
            "multiCurrencies": [
              {
                "amount": 123,
                "autoExchange": true,
                "currency": "<string>",
                "disable": true,
                "exchangeRate": 123
              }
            ],
            "planName": "<string>",
            "productId": 123,
            "publishStatus": 123,
            "status": 123,
            "taxPercentage": 123,
            "trialAmount": 123,
            "trialDemand": "<string>",
            "trialDurationTime": 123,
            "type": 123,
            "usVATConfig": {
              "active": true,
              "fromAddress": {
                "address": "<string>",
                "city": "<string>",
                "countryCode": "<string>",
                "state": "<string>",
                "verified": true,
                "zipCode": "<string>"
              },
              "nexusAddresses": [
                {
                  "address": "<string>",
                  "city": "<string>",
                  "countryCode": "<string>",
                  "state": "<string>",
                  "verified": true,
                  "zipCode": "<string>"
                }
              ],
              "sellOnUSOnly": true,
              "taxCode": "<string>",
              "toAddress": {
                "address": "<string>",
                "city": "<string>",
                "countryCode": "<string>",
                "state": "<string>",
                "verified": true,
                "zipCode": "<string>"
              }
            }
          },
          "quantity": 123
        }
      ],
      "dayLeft": 123,
      "discount": {
        "advance": true,
        "billingType": 123,
        "code": "<string>",
        "createTime": 123,
        "currency": "<string>",
        "cycleLimit": 123,
        "discountAmount": 123,
        "discountPercentage": 123,
        "discountType": 123,
        "endTime": 123,
        "id": 123,
        "isDeleted": 123,
        "merchantId": 123,
        "metadata": {},
        "name": "<string>",
        "planApplyGroup": {
          "currency": [
            "<string>"
          ],
          "groupPlanIntervalSelector": [
            {
              "intervalCount": 123,
              "intervalUnit": "<string>"
            }
          ],
          "type": [
            123
          ]
        },
        "planApplyType": 123,
        "planIds": [
          123
        ],
        "quantity": 123,
        "startTime": 123,
        "status": 123,
        "upgradeLongerOnly": true,
        "upgradeOnly": true,
        "userLimit": 123,
        "userScope": 123
      },
      "gateway": {
        "IsSetupFinished": true,
        "archive": true,
        "autoChargeEnabled": true,
        "bank": {
          "accountHolder": "<string>",
          "address": "<string>",
          "ABARoutingNumber": "<string>",
          "CNAPS": "<string>",
          "Remarks": "<string>",
          "accountNumber": "<string>",
          "bankName": "<string>",
          "bic": "<string>",
          "bsbCode": "<string>",
          "iban": "<string>",
          "swiftCode": "<string>"
        },
        "companyIssuer": {
          "issueAddress": "<string>",
          "issueCompanyName": "<string>",
          "issueLogo": "<string>",
          "issueRegNumber": "<string>",
          "issueVatNumber": "<string>"
        },
        "countryConfig": {},
        "createTime": 123,
        "currency": "<string>",
        "currencyExchange": [
          {
            "exchange_rate": 123,
            "from_currency": "<string>",
            "to_currency": "<string>"
          }
        ],
        "currencyExchangeEnabled": true,
        "defaultGatewayPaymentType": {
          "autoCharge": true,
          "category": "<string>",
          "countryName": "<string>",
          "name": "<string>",
          "paymentType": "<string>",
          "supportCurrencies": [
            "<string>"
          ]
        },
        "description": "<string>",
        "displayName": "<string>",
        "gatewayIcons": [
          "<string>"
        ],
        "gatewayId": 123,
        "gatewayKey": "<string>",
        "gatewayLogo": "<string>",
        "gatewayName": "<string>",
        "gatewayPaymentTypes": [
          {
            "autoCharge": true,
            "category": "<string>",
            "countryName": "<string>",
            "name": "<string>",
            "paymentType": "<string>",
            "supportCurrencies": [
              "<string>"
            ]
          }
        ],
        "gatewaySecret": "<string>",
        "gatewayType": 123,
        "gatewayWebhookIntegrationLink": "<string>",
        "gatewayWebsiteLink": "<string>",
        "isDefault": true,
        "metadata": {},
        "minimumAmount": 123,
        "name": "<string>",
        "privateSecretName": "<string>",
        "publicKeyName": "<string>",
        "setupGatewayPaymentTypes": [
          {
            "autoCharge": true,
            "category": "<string>",
            "countryName": "<string>",
            "name": "<string>",
            "paymentType": "<string>",
            "supportCurrencies": [
              "<string>"
            ]
          }
        ],
        "sort": 123,
        "subGateway": "<string>",
        "subGatewayName": "<string>",
        "webhookEndpointUrl": "<string>",
        "webhookSecret": "<string>"
      },
      "latestInvoice": {
        "PaymentMethodId": "<string>",
        "autoCharge": true,
        "billingCycleAnchor": 123,
        "bizType": 123,
        "countryCode": "<string>",
        "createFrom": "<string>",
        "creditAccount": {
          "amount": 123,
          "createTime": 123,
          "currency": "<string>",
          "currencyAmount": 123,
          "exchangeRate": 123,
          "id": 123,
          "payoutEnable": 123,
          "rechargeEnable": 123,
          "totalDecrementAmount": 123,
          "totalIncrementAmount": 123,
          "type": 123,
          "userId": 123
        },
        "creditPayout": {
          "creditAmount": 123,
          "currencyAmount": 123,
          "exchangeRate": 123
        },
        "cryptoAmount": 123,
        "cryptoCurrency": "<string>",
        "currency": "<string>",
        "data": "<string>",
        "dayUtilDue": 123,
        "discount": {
          "advance": true,
          "billingType": 123,
          "code": "<string>",
          "createTime": 123,
          "currency": "<string>",
          "cycleLimit": 123,
          "discountAmount": 123,
          "discountPercentage": 123,
          "discountType": 123,
          "endTime": 123,
          "id": 123,
          "isDeleted": 123,
          "merchantId": 123,
          "metadata": {},
          "name": "<string>",
          "planApplyGroup": {
            "currency": [
              "<string>"
            ],
            "groupPlanIntervalSelector": [
              {
                "intervalCount": 123,
                "intervalUnit": "<string>"
              }
            ],
            "type": [
              123
            ]
          },
          "planApplyType": 123,
          "planIds": [
            123
          ],
          "quantity": 123,
          "startTime": 123,
          "status": 123,
          "upgradeLongerOnly": true,
          "upgradeOnly": true,
          "userLimit": 123,
          "userScope": 123
        },
        "discountAmount": 123,
        "discountCode": "<string>",
        "finishTime": 123,
        "gatewayId": 123,
        "id": 123,
        "invoiceId": "<string>",
        "invoiceName": "<string>",
        "lines": [
          {
            "amount": 123,
            "amountExcludingTax": 123,
            "currency": "<string>",
            "description": "<string>",
            "discountAmount": 123,
            "discountCode": "<string>",
            "fromAddress": {
              "address": "<string>",
              "city": "<string>",
              "countryCode": "<string>",
              "state": "<string>",
              "verified": true,
              "zipCode": "<string>"
            },
            "lineId": "<string>",
            "metricCharge": {
              "metricId": 123,
              "CurrentUsedValue": 123,
              "chargePricing": {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              },
              "description": "<string>",
              "lines": [
                {
                  "amount": 123,
                  "flatAmount": 123,
                  "quantity": 123,
                  "step": "<string>",
                  "unitAmount": 123
                }
              ],
              "maxEventId": 123,
              "minEventId": 123,
              "name": "<string>",
              "totalChargeAmount": 123
            },
            "name": "<string>",
            "nexusAddresses": [
              {
                "address": "<string>",
                "city": "<string>",
                "countryCode": "<string>",
                "state": "<string>",
                "verified": true,
                "zipCode": "<string>"
              }
            ],
            "originAmount": 123,
            "originUnitAmountExcludeTax": 123,
            "pdfDescription": "<string>",
            "periodEnd": 123,
            "periodStart": 123,
            "plan": {
              "amount": 123,
              "bindingAddonIds": "<string>",
              "bindingOnetimeAddonIds": "<string>",
              "cancelAtTrialEnd": 123,
              "checkoutUrl": "<string>",
              "createTime": 123,
              "currency": "<string>",
              "description": "<string>",
              "disableAutoCharge": 123,
              "externalPlanId": "<string>",
              "extraMetricData": "<string>",
              "gasPayer": "<string>",
              "homeUrl": "<string>",
              "id": 123,
              "imageUrl": "<string>",
              "internalName": "<string>",
              "intervalCount": 123,
              "intervalUnit": "<string>",
              "merchantId": 123,
              "metadata": {},
              "metricLimits": [
                {
                  "metricId": 123,
                  "metricLimit": 123
                }
              ],
              "metricMeteredCharge": [
                {
                  "chargeType": 123,
                  "graduatedAmounts": [
                    {
                      "endValue": 123,
                      "flatAmount": 123,
                      "perAmount": 123,
                      "startValue": 123
                    }
                  ],
                  "metricId": 123,
                  "standardAmount": 123,
                  "standardStartValue": 123
                }
              ],
              "metricRecurringCharge": [
                {
                  "chargeType": 123,
                  "graduatedAmounts": [
                    {
                      "endValue": 123,
                      "flatAmount": 123,
                      "perAmount": 123,
                      "startValue": 123
                    }
                  ],
                  "metricId": 123,
                  "standardAmount": 123,
                  "standardStartValue": 123
                }
              ],
              "multiCurrencies": [
                {
                  "amount": 123,
                  "autoExchange": true,
                  "currency": "<string>",
                  "disable": true,
                  "exchangeRate": 123
                }
              ],
              "planName": "<string>",
              "productId": 123,
              "publishStatus": 123,
              "status": 123,
              "taxPercentage": 123,
              "trialAmount": 123,
              "trialDemand": "<string>",
              "trialDurationTime": 123,
              "type": 123,
              "usVATConfig": {
                "active": true,
                "fromAddress": {
                  "address": "<string>",
                  "city": "<string>",
                  "countryCode": "<string>",
                  "state": "<string>",
                  "verified": true,
                  "zipCode": "<string>"
                },
                "nexusAddresses": [
                  {
                    "address": "<string>",
                    "city": "<string>",
                    "countryCode": "<string>",
                    "state": "<string>",
                    "verified": true,
                    "zipCode": "<string>"
                  }
                ],
                "sellOnUSOnly": true,
                "taxCode": "<string>",
                "toAddress": {
                  "address": "<string>",
                  "city": "<string>",
                  "countryCode": "<string>",
                  "state": "<string>",
                  "verified": true,
                  "zipCode": "<string>"
                }
              }
            },
            "planMetricChargeConfigs": [
              {
                "chargeType": 123,
                "metricCode": "<string>",
                "metricId": 123,
                "metricName": "<string>",
                "metricType": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              }
            ],
            "planMetricLimitConfigs": [
              {
                "metricCode": "<string>",
                "metricId": 123,
                "metricLimit": 123,
                "metricName": "<string>",
                "metricType": 123
              }
            ],
            "proration": true,
            "prorationDate": 123,
            "prorationScale": 123,
            "quantity": 123,
            "tax": 123,
            "taxCode": "<string>",
            "taxPercentage": 123,
            "toAddress": {
              "address": "<string>",
              "city": "<string>",
              "countryCode": "<string>",
              "state": "<string>",
              "verified": true,
              "zipCode": "<string>"
            },
            "unitAmountExcludingTax": 123,
            "ustaxAlert": "<string>"
          }
        ],
        "link": "<string>",
        "metadata": {},
        "originAmount": 123,
        "partialCreditPaidAmount": 123,
        "paymentId": "<string>",
        "paymentLink": "<string>",
        "paymentType": "<string>",
        "periodEnd": 123,
        "periodStart": 123,
        "planSnapshot": {
          "addons": [
            {
              "addonPlan": {
                "amount": 123,
                "bindingAddonIds": "<string>",
                "bindingOnetimeAddonIds": "<string>",
                "cancelAtTrialEnd": 123,
                "checkoutUrl": "<string>",
                "createTime": 123,
                "currency": "<string>",
                "description": "<string>",
                "disableAutoCharge": 123,
                "externalPlanId": "<string>",
                "extraMetricData": "<string>",
                "gasPayer": "<string>",
                "homeUrl": "<string>",
                "id": 123,
                "imageUrl": "<string>",
                "internalName": "<string>",
                "intervalCount": 123,
                "intervalUnit": "<string>",
                "merchantId": 123,
                "metadata": {},
                "metricLimits": [
                  {
                    "metricId": 123,
                    "metricLimit": 123
                  }
                ],
                "metricMeteredCharge": [
                  {
                    "chargeType": 123,
                    "graduatedAmounts": [
                      {
                        "endValue": 123,
                        "flatAmount": 123,
                        "perAmount": 123,
                        "startValue": 123
                      }
                    ],
                    "metricId": 123,
                    "standardAmount": 123,
                    "standardStartValue": 123
                  }
                ],
                "metricRecurringCharge": [
                  {
                    "chargeType": 123,
                    "graduatedAmounts": [
                      {
                        "endValue": 123,
                        "flatAmount": 123,
                        "perAmount": 123,
                        "startValue": 123
                      }
                    ],
                    "metricId": 123,
                    "standardAmount": 123,
                    "standardStartValue": 123
                  }
                ],
                "multiCurrencies": [
                  {
                    "amount": 123,
                    "autoExchange": true,
                    "currency": "<string>",
                    "disable": true,
                    "exchangeRate": 123
                  }
                ],
                "planName": "<string>",
                "productId": 123,
                "publishStatus": 123,
                "status": 123,
                "taxPercentage": 123,
                "trialAmount": 123,
                "trialDemand": "<string>",
                "trialDurationTime": 123,
                "type": 123,
                "usVATConfig": {
                  "active": true,
                  "fromAddress": {
                    "address": "<string>",
                    "city": "<string>",
                    "countryCode": "<string>",
                    "state": "<string>",
                    "verified": true,
                    "zipCode": "<string>"
                  },
                  "nexusAddresses": [
                    {
                      "address": "<string>",
                      "city": "<string>",
                      "countryCode": "<string>",
                      "state": "<string>",
                      "verified": true,
                      "zipCode": "<string>"
                    }
                  ],
                  "sellOnUSOnly": true,
                  "taxCode": "<string>",
                  "toAddress": {
                    "address": "<string>",
                    "city": "<string>",
                    "countryCode": "<string>",
                    "state": "<string>",
                    "verified": true,
                    "zipCode": "<string>"
                  }
                }
              },
              "quantity": 123
            }
          ],
          "autoCharge": true,
          "chargeType": 123,
          "plan": {
            "amount": 123,
            "bindingAddonIds": "<string>",
            "bindingOnetimeAddonIds": "<string>",
            "cancelAtTrialEnd": 123,
            "checkoutUrl": "<string>",
            "createTime": 123,
            "currency": "<string>",
            "description": "<string>",
            "disableAutoCharge": 123,
            "externalPlanId": "<string>",
            "extraMetricData": "<string>",
            "gasPayer": "<string>",
            "homeUrl": "<string>",
            "id": 123,
            "imageUrl": "<string>",
            "internalName": "<string>",
            "intervalCount": 123,
            "intervalUnit": "<string>",
            "merchantId": 123,
            "metadata": {},
            "metricLimits": [
              {
                "metricId": 123,
                "metricLimit": 123
              }
            ],
            "metricMeteredCharge": [
              {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              }
            ],
            "metricRecurringCharge": [
              {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              }
            ],
            "multiCurrencies": [
              {
                "amount": 123,
                "autoExchange": true,
                "currency": "<string>",
                "disable": true,
                "exchangeRate": 123
              }
            ],
            "planName": "<string>",
            "productId": 123,
            "publishStatus": 123,
            "status": 123,
            "taxPercentage": 123,
            "trialAmount": 123,
            "trialDemand": "<string>",
            "trialDurationTime": 123,
            "type": 123,
            "usVATConfig": {
              "active": true,
              "fromAddress": {
                "address": "<string>",
                "city": "<string>",
                "countryCode": "<string>",
                "state": "<string>",
                "verified": true,
                "zipCode": "<string>"
              },
              "nexusAddresses": [
                {
                  "address": "<string>",
                  "city": "<string>",
                  "countryCode": "<string>",
                  "state": "<string>",
                  "verified": true,
                  "zipCode": "<string>"
                }
              ],
              "sellOnUSOnly": true,
              "taxCode": "<string>",
              "toAddress": {
                "address": "<string>",
                "city": "<string>",
                "countryCode": "<string>",
                "state": "<string>",
                "verified": true,
                "zipCode": "<string>"
              }
            }
          },
          "previousAddons": [
            {
              "addonPlan": {
                "amount": 123,
                "bindingAddonIds": "<string>",
                "bindingOnetimeAddonIds": "<string>",
                "cancelAtTrialEnd": 123,
                "checkoutUrl": "<string>",
                "createTime": 123,
                "currency": "<string>",
                "description": "<string>",
                "disableAutoCharge": 123,
                "externalPlanId": "<string>",
                "extraMetricData": "<string>",
                "gasPayer": "<string>",
                "homeUrl": "<string>",
                "id": 123,
                "imageUrl": "<string>",
                "internalName": "<string>",
                "intervalCount": 123,
                "intervalUnit": "<string>",
                "merchantId": 123,
                "metadata": {},
                "metricLimits": [
                  {
                    "metricId": 123,
                    "metricLimit": 123
                  }
                ],
                "metricMeteredCharge": [
                  {
                    "chargeType": 123,
                    "graduatedAmounts": [
                      {
                        "endValue": 123,
                        "flatAmount": 123,
                        "perAmount": 123,
                        "startValue": 123
                      }
                    ],
                    "metricId": 123,
                    "standardAmount": 123,
                    "standardStartValue": 123
                  }
                ],
                "metricRecurringCharge": [
                  {
                    "chargeType": 123,
                    "graduatedAmounts": [
                      {
                        "endValue": 123,
                        "flatAmount": 123,
                        "perAmount": 123,
                        "startValue": 123
                      }
                    ],
                    "metricId": 123,
                    "standardAmount": 123,
                    "standardStartValue": 123
                  }
                ],
                "multiCurrencies": [
                  {
                    "amount": 123,
                    "autoExchange": true,
                    "currency": "<string>",
                    "disable": true,
                    "exchangeRate": 123
                  }
                ],
                "planName": "<string>",
                "productId": 123,
                "publishStatus": 123,
                "status": 123,
                "taxPercentage": 123,
                "trialAmount": 123,
                "trialDemand": "<string>",
                "trialDurationTime": 123,
                "type": 123,
                "usVATConfig": {
                  "active": true,
                  "fromAddress": {
                    "address": "<string>",
                    "city": "<string>",
                    "countryCode": "<string>",
                    "state": "<string>",
                    "verified": true,
                    "zipCode": "<string>"
                  },
                  "nexusAddresses": [
                    {
                      "address": "<string>",
                      "city": "<string>",
                      "countryCode": "<string>",
                      "state": "<string>",
                      "verified": true,
                      "zipCode": "<string>"
                    }
                  ],
                  "sellOnUSOnly": true,
                  "taxCode": "<string>",
                  "toAddress": {
                    "address": "<string>",
                    "city": "<string>",
                    "countryCode": "<string>",
                    "state": "<string>",
                    "verified": true,
                    "zipCode": "<string>"
                  }
                }
              },
              "quantity": 123
            }
          ],
          "previousPlan": {
            "amount": 123,
            "bindingAddonIds": "<string>",
            "bindingOnetimeAddonIds": "<string>",
            "cancelAtTrialEnd": 123,
            "checkoutUrl": "<string>",
            "createTime": 123,
            "currency": "<string>",
            "description": "<string>",
            "disableAutoCharge": 123,
            "externalPlanId": "<string>",
            "extraMetricData": "<string>",
            "gasPayer": "<string>",
            "homeUrl": "<string>",
            "id": 123,
            "imageUrl": "<string>",
            "internalName": "<string>",
            "intervalCount": 123,
            "intervalUnit": "<string>",
            "merchantId": 123,
            "metadata": {},
            "metricLimits": [
              {
                "metricId": 123,
                "metricLimit": 123
              }
            ],
            "metricMeteredCharge": [
              {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              }
            ],
            "metricRecurringCharge": [
              {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              }
            ],
            "multiCurrencies": [
              {
                "amount": 123,
                "autoExchange": true,
                "currency": "<string>",
                "disable": true,
                "exchangeRate": 123
              }
            ],
            "planName": "<string>",
            "productId": 123,
            "publishStatus": 123,
            "status": 123,
            "taxPercentage": 123,
            "trialAmount": 123,
            "trialDemand": "<string>",
            "trialDurationTime": 123,
            "type": 123,
            "usVATConfig": {
              "active": true,
              "fromAddress": {
                "address": "<string>",
                "city": "<string>",
                "countryCode": "<string>",
                "state": "<string>",
                "verified": true,
                "zipCode": "<string>"
              },
              "nexusAddresses": [
                {
                  "address": "<string>",
                  "city": "<string>",
                  "countryCode": "<string>",
                  "state": "<string>",
                  "verified": true,
                  "zipCode": "<string>"
                }
              ],
              "sellOnUSOnly": true,
              "taxCode": "<string>",
              "toAddress": {
                "address": "<string>",
                "city": "<string>",
                "countryCode": "<string>",
                "state": "<string>",
                "verified": true,
                "zipCode": "<string>"
              }
            }
          }
        },
        "productName": "<string>",
        "promoCreditAccount": {
          "amount": 123,
          "createTime": 123,
          "currency": "<string>",
          "currencyAmount": 123,
          "exchangeRate": 123,
          "id": 123,
          "payoutEnable": 123,
          "rechargeEnable": 123,
          "totalDecrementAmount": 123,
          "totalIncrementAmount": 123,
          "type": 123,
          "userId": 123
        },
        "promoCreditDiscountAmount": 123,
        "promoCreditPayout": {
          "creditAmount": 123,
          "currencyAmount": 123,
          "exchangeRate": 123
        },
        "promoCreditTransaction": {
          "accountType": 123,
          "bizId": "<string>",
          "by": "<string>",
          "createTime": 123,
          "creditAmountAfter": 123,
          "creditAmountBefore": 123,
          "creditId": 123,
          "currency": "<string>",
          "deltaAmount": 123,
          "deltaCurrencyAmount": 123,
          "description": "<string>",
          "exchangeRate": 123,
          "id": 123,
          "invoiceId": "<string>",
          "merchantId": 123,
          "name": "<string>",
          "transactionId": "<string>",
          "transactionType": 123,
          "userId": 123
        },
        "prorationDate": 123,
        "prorationScale": 123,
        "refundId": "<string>",
        "sendNote": "<string>",
        "sendStatus": 123,
        "status": 123,
        "subscriptionAmount": 123,
        "subscriptionAmountExcludingTax": 123,
        "subscriptionId": "<string>",
        "taxAmount": 123,
        "taxPercentage": 123,
        "totalAmount": 123,
        "totalAmountExcludingTax": 123,
        "trialEnd": 123,
        "userId": 123,
        "userMetricChargeForInvoice": {
          "meteredChargeStats": [
            {
              "metricId": 123,
              "CurrentUsedValue": 123,
              "chargePricing": {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              },
              "description": "<string>",
              "lines": [
                {
                  "amount": 123,
                  "flatAmount": 123,
                  "quantity": 123,
                  "step": "<string>",
                  "unitAmount": 123
                }
              ],
              "maxEventId": 123,
              "minEventId": 123,
              "name": "<string>",
              "totalChargeAmount": 123
            }
          ],
          "recurringChargeStats": [
            {
              "metricId": 123,
              "CurrentUsedValue": 123,
              "chargePricing": {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              },
              "description": "<string>",
              "lines": [
                {
                  "amount": 123,
                  "flatAmount": 123,
                  "quantity": 123,
                  "step": "<string>",
                  "unitAmount": 123
                }
              ],
              "maxEventId": 123,
              "minEventId": 123,
              "name": "<string>",
              "totalChargeAmount": 123
            }
          ]
        },
        "vatNumber": "<string>"
      },
      "note": "<string>",
      "plan": {
        "amount": 123,
        "bindingAddonIds": "<string>",
        "bindingOnetimeAddonIds": "<string>",
        "cancelAtTrialEnd": 123,
        "checkoutUrl": "<string>",
        "createTime": 123,
        "currency": "<string>",
        "description": "<string>",
        "disableAutoCharge": 123,
        "externalPlanId": "<string>",
        "extraMetricData": "<string>",
        "gasPayer": "<string>",
        "homeUrl": "<string>",
        "id": 123,
        "imageUrl": "<string>",
        "internalName": "<string>",
        "intervalCount": 123,
        "intervalUnit": "<string>",
        "merchantId": 123,
        "metadata": {},
        "metricLimits": [
          {
            "metricId": 123,
            "metricLimit": 123
          }
        ],
        "metricMeteredCharge": [
          {
            "chargeType": 123,
            "graduatedAmounts": [
              {
                "endValue": 123,
                "flatAmount": 123,
                "perAmount": 123,
                "startValue": 123
              }
            ],
            "metricId": 123,
            "standardAmount": 123,
            "standardStartValue": 123
          }
        ],
        "metricRecurringCharge": [
          {
            "chargeType": 123,
            "graduatedAmounts": [
              {
                "endValue": 123,
                "flatAmount": 123,
                "perAmount": 123,
                "startValue": 123
              }
            ],
            "metricId": 123,
            "standardAmount": 123,
            "standardStartValue": 123
          }
        ],
        "multiCurrencies": [
          {
            "amount": 123,
            "autoExchange": true,
            "currency": "<string>",
            "disable": true,
            "exchangeRate": 123
          }
        ],
        "planName": "<string>",
        "productId": 123,
        "publishStatus": 123,
        "status": 123,
        "taxPercentage": 123,
        "trialAmount": 123,
        "trialDemand": "<string>",
        "trialDurationTime": 123,
        "type": 123,
        "usVATConfig": {
          "active": true,
          "fromAddress": {
            "address": "<string>",
            "city": "<string>",
            "countryCode": "<string>",
            "state": "<string>",
            "verified": true,
            "zipCode": "<string>"
          },
          "nexusAddresses": [
            {
              "address": "<string>",
              "city": "<string>",
              "countryCode": "<string>",
              "state": "<string>",
              "verified": true,
              "zipCode": "<string>"
            }
          ],
          "sellOnUSOnly": true,
          "taxCode": "<string>",
          "toAddress": {
            "address": "<string>",
            "city": "<string>",
            "countryCode": "<string>",
            "state": "<string>",
            "verified": true,
            "zipCode": "<string>"
          }
        }
      },
      "source": "<string>",
      "subscription": {
        "addonData": "<string>",
        "amount": 123,
        "billingCycleAnchor": 123,
        "cancelAtPeriodEnd": 123,
        "cancelOrExpireTime": 123,
        "cancelReason": "<string>",
        "countryCode": "<string>",
        "createTime": 123,
        "currency": "<string>",
        "currentPeriodEnd": 123,
        "currentPeriodPaid": 123,
        "currentPeriodStart": 123,
        "defaultPaymentMethodId": "<string>",
        "dunningTime": 123,
        "externalSubscriptionId": "<string>",
        "features": "<string>",
        "firstPaidTime": 123,
        "gasPayer": "<string>",
        "gatewayId": 123,
        "gatewayStatus": "<string>",
        "id": 123,
        "lastUpdateTime": 123,
        "latestInvoiceId": "<string>",
        "link": "<string>",
        "merchantId": 123,
        "metadata": {},
        "originalPeriodEnd": 123,
        "pendingUpdateId": "<string>",
        "planId": 123,
        "productId": 123,
        "quantity": 123,
        "returnUrl": "<string>",
        "status": 123,
        "subscriptionId": "<string>",
        "taskTime": "<string>",
        "taxPercentage": 123,
        "testClock": 123,
        "trialEnd": 123,
        "type": 123,
        "userId": 123,
        "vatNumber": "<string>"
      },
      "unfinishedSubscriptionPendingUpdate": {
        "addonData": "<string>",
        "addons": [
          {
            "addonPlan": {
              "amount": 123,
              "bindingAddonIds": "<string>",
              "bindingOnetimeAddonIds": "<string>",
              "cancelAtTrialEnd": 123,
              "checkoutUrl": "<string>",
              "createTime": 123,
              "currency": "<string>",
              "description": "<string>",
              "disableAutoCharge": 123,
              "externalPlanId": "<string>",
              "extraMetricData": "<string>",
              "gasPayer": "<string>",
              "homeUrl": "<string>",
              "id": 123,
              "imageUrl": "<string>",
              "internalName": "<string>",
              "intervalCount": 123,
              "intervalUnit": "<string>",
              "merchantId": 123,
              "metadata": {},
              "metricLimits": [
                {
                  "metricId": 123,
                  "metricLimit": 123
                }
              ],
              "metricMeteredCharge": [
                {
                  "chargeType": 123,
                  "graduatedAmounts": [
                    {
                      "endValue": 123,
                      "flatAmount": 123,
                      "perAmount": 123,
                      "startValue": 123
                    }
                  ],
                  "metricId": 123,
                  "standardAmount": 123,
                  "standardStartValue": 123
                }
              ],
              "metricRecurringCharge": [
                {
                  "chargeType": 123,
                  "graduatedAmounts": [
                    {
                      "endValue": 123,
                      "flatAmount": 123,
                      "perAmount": 123,
                      "startValue": 123
                    }
                  ],
                  "metricId": 123,
                  "standardAmount": 123,
                  "standardStartValue": 123
                }
              ],
              "multiCurrencies": [
                {
                  "amount": 123,
                  "autoExchange": true,
                  "currency": "<string>",
                  "disable": true,
                  "exchangeRate": 123
                }
              ],
              "planName": "<string>",
              "productId": 123,
              "publishStatus": 123,
              "status": 123,
              "taxPercentage": 123,
              "trialAmount": 123,
              "trialDemand": "<string>",
              "trialDurationTime": 123,
              "type": 123,
              "usVATConfig": {
                "active": true,
                "fromAddress": {
                  "address": "<string>",
                  "city": "<string>",
                  "countryCode": "<string>",
                  "state": "<string>",
                  "verified": true,
                  "zipCode": "<string>"
                },
                "nexusAddresses": [
                  {
                    "address": "<string>",
                    "city": "<string>",
                    "countryCode": "<string>",
                    "state": "<string>",
                    "verified": true,
                    "zipCode": "<string>"
                  }
                ],
                "sellOnUSOnly": true,
                "taxCode": "<string>",
                "toAddress": {
                  "address": "<string>",
                  "city": "<string>",
                  "countryCode": "<string>",
                  "state": "<string>",
                  "verified": true,
                  "zipCode": "<string>"
                }
              }
            },
            "quantity": 123
          }
        ],
        "amount": 123,
        "currency": "<string>",
        "effectImmediate": 123,
        "effectTime": 123,
        "gatewayId": 123,
        "gmtCreate": "<string>",
        "gmtModify": "<string>",
        "invoiceId": "<string>",
        "link": "<string>",
        "merchantId": 123,
        "merchantMember": {
          "MemberGroupPermission": {},
          "MemberRoles": [
            {
              "createTime": 123,
              "id": 123,
              "merchantId": 123,
              "permissions": [
                {
                  "group": "<string>",
                  "permissions": [
                    "<string>"
                  ]
                }
              ],
              "role": "<string>"
            }
          ],
          "createTime": 123,
          "currentDeviceIdentity": "<string>",
          "deviceList": [
            {
              "currentDevice": true,
              "identity": "<string>",
              "ipAddress": "<string>",
              "lastActiveTime": 123,
              "lastLoginTime": 123,
              "lastTotpVerificationTime": 123,
              "name": "<string>",
              "status": true
            }
          ],
          "email": "<string>",
          "firstName": "<string>",
          "id": 123,
          "isBlankPasswd": true,
          "isOwner": true,
          "lastName": "<string>",
          "merchantId": 123,
          "mobile": "<string>",
          "oauthAccounts": [
            {
              "email": "<string>",
              "emailVerified": true,
              "image": "<string>",
              "name": "<string>",
              "provider": "<string>",
              "providerId": "<string>"
            }
          ],
          "status": 123,
          "totpType": 123
        },
        "metadata": {},
        "note": "<string>",
        "paid": 123,
        "pendingUpdateId": "<string>",
        "plan": {
          "amount": 123,
          "bindingAddonIds": "<string>",
          "bindingOnetimeAddonIds": "<string>",
          "cancelAtTrialEnd": 123,
          "checkoutUrl": "<string>",
          "createTime": 123,
          "currency": "<string>",
          "description": "<string>",
          "disableAutoCharge": 123,
          "externalPlanId": "<string>",
          "extraMetricData": "<string>",
          "gasPayer": "<string>",
          "homeUrl": "<string>",
          "id": 123,
          "imageUrl": "<string>",
          "internalName": "<string>",
          "intervalCount": 123,
          "intervalUnit": "<string>",
          "merchantId": 123,
          "metadata": {},
          "metricLimits": [
            {
              "metricId": 123,
              "metricLimit": 123
            }
          ],
          "metricMeteredCharge": [
            {
              "chargeType": 123,
              "graduatedAmounts": [
                {
                  "endValue": 123,
                  "flatAmount": 123,
                  "perAmount": 123,
                  "startValue": 123
                }
              ],
              "metricId": 123,
              "standardAmount": 123,
              "standardStartValue": 123
            }
          ],
          "metricRecurringCharge": [
            {
              "chargeType": 123,
              "graduatedAmounts": [
                {
                  "endValue": 123,
                  "flatAmount": 123,
                  "perAmount": 123,
                  "startValue": 123
                }
              ],
              "metricId": 123,
              "standardAmount": 123,
              "standardStartValue": 123
            }
          ],
          "multiCurrencies": [
            {
              "amount": 123,
              "autoExchange": true,
              "currency": "<string>",
              "disable": true,
              "exchangeRate": 123
            }
          ],
          "planName": "<string>",
          "productId": 123,
          "publishStatus": 123,
          "status": 123,
          "taxPercentage": 123,
          "trialAmount": 123,
          "trialDemand": "<string>",
          "trialDurationTime": 123,
          "type": 123,
          "usVATConfig": {
            "active": true,
            "fromAddress": {
              "address": "<string>",
              "city": "<string>",
              "countryCode": "<string>",
              "state": "<string>",
              "verified": true,
              "zipCode": "<string>"
            },
            "nexusAddresses": [
              {
                "address": "<string>",
                "city": "<string>",
                "countryCode": "<string>",
                "state": "<string>",
                "verified": true,
                "zipCode": "<string>"
              }
            ],
            "sellOnUSOnly": true,
            "taxCode": "<string>",
            "toAddress": {
              "address": "<string>",
              "city": "<string>",
              "countryCode": "<string>",
              "state": "<string>",
              "verified": true,
              "zipCode": "<string>"
            }
          }
        },
        "planId": 123,
        "prorationAmount": 123,
        "quantity": 123,
        "status": 123,
        "subscriptionId": "<string>",
        "updateAddonData": "<string>",
        "updateAddons": [
          {
            "addonPlan": {
              "amount": 123,
              "bindingAddonIds": "<string>",
              "bindingOnetimeAddonIds": "<string>",
              "cancelAtTrialEnd": 123,
              "checkoutUrl": "<string>",
              "createTime": 123,
              "currency": "<string>",
              "description": "<string>",
              "disableAutoCharge": 123,
              "externalPlanId": "<string>",
              "extraMetricData": "<string>",
              "gasPayer": "<string>",
              "homeUrl": "<string>",
              "id": 123,
              "imageUrl": "<string>",
              "internalName": "<string>",
              "intervalCount": 123,
              "intervalUnit": "<string>",
              "merchantId": 123,
              "metadata": {},
              "metricLimits": [
                {
                  "metricId": 123,
                  "metricLimit": 123
                }
              ],
              "metricMeteredCharge": [
                {
                  "chargeType": 123,
                  "graduatedAmounts": [
                    {
                      "endValue": 123,
                      "flatAmount": 123,
                      "perAmount": 123,
                      "startValue": 123
                    }
                  ],
                  "metricId": 123,
                  "standardAmount": 123,
                  "standardStartValue": 123
                }
              ],
              "metricRecurringCharge": [
                {
                  "chargeType": 123,
                  "graduatedAmounts": [
                    {
                      "endValue": 123,
                      "flatAmount": 123,
                      "perAmount": 123,
                      "startValue": 123
                    }
                  ],
                  "metricId": 123,
                  "standardAmount": 123,
                  "standardStartValue": 123
                }
              ],
              "multiCurrencies": [
                {
                  "amount": 123,
                  "autoExchange": true,
                  "currency": "<string>",
                  "disable": true,
                  "exchangeRate": 123
                }
              ],
              "planName": "<string>",
              "productId": 123,
              "publishStatus": 123,
              "status": 123,
              "taxPercentage": 123,
              "trialAmount": 123,
              "trialDemand": "<string>",
              "trialDurationTime": 123,
              "type": 123,
              "usVATConfig": {
                "active": true,
                "fromAddress": {
                  "address": "<string>",
                  "city": "<string>",
                  "countryCode": "<string>",
                  "state": "<string>",
                  "verified": true,
                  "zipCode": "<string>"
                },
                "nexusAddresses": [
                  {
                    "address": "<string>",
                    "city": "<string>",
                    "countryCode": "<string>",
                    "state": "<string>",
                    "verified": true,
                    "zipCode": "<string>"
                  }
                ],
                "sellOnUSOnly": true,
                "taxCode": "<string>",
                "toAddress": {
                  "address": "<string>",
                  "city": "<string>",
                  "countryCode": "<string>",
                  "state": "<string>",
                  "verified": true,
                  "zipCode": "<string>"
                }
              }
            },
            "quantity": 123
          }
        ],
        "updateAmount": 123,
        "updateCurrency": "<string>",
        "updatePlan": {
          "amount": 123,
          "bindingAddonIds": "<string>",
          "bindingOnetimeAddonIds": "<string>",
          "cancelAtTrialEnd": 123,
          "checkoutUrl": "<string>",
          "createTime": 123,
          "currency": "<string>",
          "description": "<string>",
          "disableAutoCharge": 123,
          "externalPlanId": "<string>",
          "extraMetricData": "<string>",
          "gasPayer": "<string>",
          "homeUrl": "<string>",
          "id": 123,
          "imageUrl": "<string>",
          "internalName": "<string>",
          "intervalCount": 123,
          "intervalUnit": "<string>",
          "merchantId": 123,
          "metadata": {},
          "metricLimits": [
            {
              "metricId": 123,
              "metricLimit": 123
            }
          ],
          "metricMeteredCharge": [
            {
              "chargeType": 123,
              "graduatedAmounts": [
                {
                  "endValue": 123,
                  "flatAmount": 123,
                  "perAmount": 123,
                  "startValue": 123
                }
              ],
              "metricId": 123,
              "standardAmount": 123,
              "standardStartValue": 123
            }
          ],
          "metricRecurringCharge": [
            {
              "chargeType": 123,
              "graduatedAmounts": [
                {
                  "endValue": 123,
                  "flatAmount": 123,
                  "perAmount": 123,
                  "startValue": 123
                }
              ],
              "metricId": 123,
              "standardAmount": 123,
              "standardStartValue": 123
            }
          ],
          "multiCurrencies": [
            {
              "amount": 123,
              "autoExchange": true,
              "currency": "<string>",
              "disable": true,
              "exchangeRate": 123
            }
          ],
          "planName": "<string>",
          "productId": 123,
          "publishStatus": 123,
          "status": 123,
          "taxPercentage": 123,
          "trialAmount": 123,
          "trialDemand": "<string>",
          "trialDurationTime": 123,
          "type": 123,
          "usVATConfig": {
            "active": true,
            "fromAddress": {
              "address": "<string>",
              "city": "<string>",
              "countryCode": "<string>",
              "state": "<string>",
              "verified": true,
              "zipCode": "<string>"
            },
            "nexusAddresses": [
              {
                "address": "<string>",
                "city": "<string>",
                "countryCode": "<string>",
                "state": "<string>",
                "verified": true,
                "zipCode": "<string>"
              }
            ],
            "sellOnUSOnly": true,
            "taxCode": "<string>",
            "toAddress": {
              "address": "<string>",
              "city": "<string>",
              "countryCode": "<string>",
              "state": "<string>",
              "verified": true,
              "zipCode": "<string>"
            }
          }
        },
        "updatePlanId": 123,
        "updateQuantity": 123,
        "userId": 123
      },
      "user": {
        "address": "<string>",
        "avatarUrl": "<string>",
        "billingType": 123,
        "birthday": "<string>",
        "city": "<string>",
        "companyName": "<string>",
        "countryCode": "<string>",
        "countryName": "<string>",
        "createTime": 123,
        "custom": "<string>",
        "email": "<string>",
        "externalUserId": "<string>",
        "facebook": "<string>",
        "firstName": "<string>",
        "gatewayId": 123,
        "gatewayPaymentType": "<string>",
        "gender": "<string>",
        "id": 123,
        "isRisk": 123,
        "isSpecial": 123,
        "language": "<string>",
        "lastLoginAt": 123,
        "lastName": "<string>",
        "linkedIn": "<string>",
        "merchantId": 123,
        "metadata": {},
        "mobile": "<string>",
        "otherSocialInfo": "<string>",
        "paymentMethod": "<string>",
        "phone": "<string>",
        "recurringAmount": 123,
        "registrationNumber": "<string>",
        "school": "<string>",
        "state": "<string>",
        "status": 123,
        "subscriptionId": "<string>",
        "subscriptionName": "<string>",
        "subscriptionStatus": 123,
        "taxPercentage": 123,
        "telegram": "<string>",
        "tikTok": "<string>",
        "timeZone": "<string>",
        "type": 123,
        "userName": "<string>",
        "vATNumber": "<string>",
        "version": 123,
        "weChat": "<string>",
        "whatsAPP": "<string>",
        "zipCode": "<string>"
      }
    },
    "paid": true,
    "paymentId": "<string>",
    "subscription": {
      "addonData": "<string>",
      "amount": 123,
      "billingCycleAnchor": 123,
      "cancelAtPeriodEnd": 123,
      "cancelOrExpireTime": 123,
      "cancelReason": "<string>",
      "countryCode": "<string>",
      "createTime": 123,
      "currency": "<string>",
      "currentPeriodEnd": 123,
      "currentPeriodPaid": 123,
      "currentPeriodStart": 123,
      "defaultPaymentMethodId": "<string>",
      "dunningTime": 123,
      "externalSubscriptionId": "<string>",
      "features": "<string>",
      "firstPaidTime": 123,
      "gasPayer": "<string>",
      "gatewayId": 123,
      "gatewayStatus": "<string>",
      "id": 123,
      "lastUpdateTime": 123,
      "latestInvoiceId": "<string>",
      "link": "<string>",
      "merchantId": 123,
      "metadata": {},
      "originalPeriodEnd": 123,
      "pendingUpdateId": "<string>",
      "planId": 123,
      "productId": 123,
      "quantity": 123,
      "returnUrl": "<string>",
      "status": 123,
      "subscriptionId": "<string>",
      "taskTime": "<string>",
      "taxPercentage": 123,
      "testClock": 123,
      "trialEnd": 123,
      "type": 123,
      "userId": 123,
      "vatNumber": "<string>"
    },
    "token": "<string>",
    "user": {
      "address": "<string>",
      "avatarUrl": "<string>",
      "billingType": 123,
      "birthday": "<string>",
      "city": "<string>",
      "companyName": "<string>",
      "countryCode": "<string>",
      "countryName": "<string>",
      "createTime": 123,
      "custom": "<string>",
      "email": "<string>",
      "externalUserId": "<string>",
      "facebook": "<string>",
      "firstName": "<string>",
      "gatewayId": 123,
      "gatewayPaymentType": "<string>",
      "gender": "<string>",
      "id": 123,
      "isRisk": 123,
      "isSpecial": 123,
      "language": "<string>",
      "lastLoginAt": 123,
      "lastName": "<string>",
      "linkedIn": "<string>",
      "merchantId": 123,
      "metadata": {},
      "mobile": "<string>",
      "otherSocialInfo": "<string>",
      "paymentMethod": "<string>",
      "phone": "<string>",
      "recurringAmount": 123,
      "registrationNumber": "<string>",
      "school": "<string>",
      "state": "<string>",
      "status": 123,
      "subscriptionId": "<string>",
      "subscriptionName": "<string>",
      "subscriptionStatus": 123,
      "taxPercentage": 123,
      "telegram": "<string>",
      "tikTok": "<string>",
      "timeZone": "<string>",
      "type": 123,
      "userName": "<string>",
      "vATNumber": "<string>",
      "version": 123,
      "weChat": "<string>",
      "whatsAPP": "<string>",
      "zipCode": "<string>"
    }
  },
  "merchantId": 123,
  "message": "<string>",
  "redirect": "<string>",
  "requestId": "<string>"
}

Endpoint Overview

POST https://api.unibee.dev/merchant/subscription/create_submit Create Subscription

Authorization

All UniBee Merchant API requests require authentication via API key.
HeaderRequiredDescription
AuthorizationYesBearer <your_api_key>
Content-TypeYesapplication/json (for request body)

Parameters

Parameters for this endpoint are listed below. The schema is also shown in the Try it panel.

Request body

NameTypeRequiredDescription
addonParamsarrayNoOptional. List of addon plan parameters to be attached to this subscription.
applyPromoCreditbooleanNoOptional. Whether to apply available promo credit when creating the first invoice.
applyPromoCreditAmountintegerNoOptional. Maximum promo credit amount to apply. If omitted and applyPromoCredit is true, the system auto-computes the usable amount.
cancelUrlstringNoOptional. URL to redirect the user to when the user cancels or the payment fails.
confirmCurrencystringNoOptional. When provided, represents the expected currency code for the first invoice and must match the value returned from preview, otherwise the request is rejected.
confirmTotalAmountintegerNoOptional. When provided, represents the expected total amount (in minor units) for the first invoice and must match the value returned from preview, otherwise the request is rejected.
currencystringNoOptional. Currency code for charging (e.g. USD, EUR). If empty, plan default currency is used.
discountstringNo
discountCodestringNoOptional. Discount or coupon code to be applied to this subscription creation.
emailstringNoOptional. End-user email. One of (ExternalUserId & Email), UserId or User object must be provided to identify the user.
externalUserIdstringNoOptional. Merchant-side unique user identifier. Used together with email when UserId is not provided.
freeInInitialPeriodbooleanNoOptional. If true, the first billing period is treated as free or trial. This has higher priority than trialEnd.
freeTimeEndintegerNoOptional. Custom free period end time when freeInInitialPeriod is true, as UTC timestamp (seconds). Has higher priority than trialEnd and can shorten or extend the default first-period-free behavior.
gatewayIdintegerNoOptional. Payment gateway ID used to charge the first invoice of this subscription.
gatewayPaymentTypestringNoOptional. Payment type for the selected gateway, such as card, wallet, etc.
metadataobjectNoOptional. Custom metadata map that will be stored on the created invoice and subscription.
paymentMethodIdstringNoOptional. Existing payment method ID to be used for charging the first invoice.
paymentUIModestringNoOptional. Checkout UI mode: hosted | embedded | custom. Default is hosted.
planIdintegerYesRequired. ID of the subscription plan to be created.
productDatastringNo
quantityintegerNoOptional. Number of units for the plan. Defaults to 1 if not specified.
returnUrlstringNoOptional. URL to redirect the user to after successful subscription creation or payment completion.
splitPaymentbooleanNoOptional. If true, always use split payment mode: create a hosted invoice link without attempting automatic payment. If false, the system will try automatic payment first and may still switch to split payment based on gateway response and risk control.
startIncompletebooleanNoOptional. If true, the subscription starts in incomplete status (now pay later): invoice is created and the subscription becomes active temporarily until paid or expired.
taxPercentageintegerNoOptional. External tax percentage override, in basis points (e.g. 1000 = 10%%). Overrides subscription-level taxPercentage when provided.
trialEndintegerNoOptional. Custom trial end time as UTC timestamp (seconds). If greater than now, it overrides the plan default trial configuration.
userstringNo
userIdintegerNoOptional. Internal UniBee user ID. If provided, it must be consistent with email/user when they are also provided.
vatCountryCodestringNoOptional. ISO country code for VAT calculation. If provided together with vatNumber, they must be consistent.
vatNumberstringNoOptional. Customer VAT number used for VAT validation and tax calculation.

Request examples

cURL

curl -X POST "https://api.unibee.dev/merchant/subscription/create_submit" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "addonParams": [],
  "applyPromoCredit": false,
  "applyPromoCreditAmount": 0,
  "cancelUrl": "https://example.com",
  "confirmCurrency": "",
  "confirmTotalAmount": 0,
  "currency": "",
  "discount": "",
  "discountCode": "",
  "email": "user@example.com",
  "externalUserId": "id_example",
  "freeInInitialPeriod": false,
  "freeTimeEnd": 0,
  "gatewayId": 0,
  "gatewayPaymentType": "",
  "metadata": {},
  "paymentMethodId": "id_example",
  "paymentUIMode": "",
  "planId": 0,
  "productData": "",
  "quantity": 0,
  "returnUrl": "https://example.com",
  "splitPayment": false,
  "startIncomplete": false,
  "taxPercentage": 0,
  "trialEnd": 0,
  "user": "",
  "userId": 0,
  "vatCountryCode": "",
  "vatNumber": ""
}'

Sandbox

curl -X POST "https://api-sandbox.unibee.top/merchant/subscription/create_submit" \
  -H "Authorization: Bearer YOUR_SANDBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "addonParams": [],
  "applyPromoCredit": false,
  "applyPromoCreditAmount": 0,
  "cancelUrl": "https://example.com",
  "confirmCurrency": "",
  "confirmTotalAmount": 0,
  "currency": "",
  "discount": "",
  "discountCode": "",
  "email": "user@example.com",
  "externalUserId": "id_example",
  "freeInInitialPeriod": false,
  "freeTimeEnd": 0,
  "gatewayId": 0,
  "gatewayPaymentType": "",
  "metadata": {},
  "paymentMethodId": "id_example",
  "paymentUIMode": "",
  "planId": 0,
  "productData": "",
  "quantity": 0,
  "returnUrl": "https://example.com",
  "splitPayment": false,
  "startIncomplete": false,
  "taxPercentage": 0,
  "trialEnd": 0,
  "user": "",
  "userId": 0,
  "vatCountryCode": "",
  "vatNumber": ""
}'

Response

Success responses return a JSON envelope with code, data, message, redirect, and requestId. code 0 indicates success.
FieldTypeDescription
codeintegerResponse code. 0 = success
dataobjectResponse payload
data.actionobject
data.invoiceIdstringID of the first invoice generated for this subscription.
data.linkstringHosted payment or invoice link. When paid=false, redirect the customer to this link to complete payment.
data.otherPendingCryptoSubscriptionobject
data.paidbooleanWhether the first invoice has been successfully paid at the time of response.
data.paymentIdstringID of the payment created for the first invoice, if any.
data.subscriptionobject
data.tokenstringPortal authentication token for the user, used by admin portal flows.
data.userobject
messagestringHuman-readable message
requestIdstringRequest ID for support

Error handling

HTTP statusMeaning
400Bad request — invalid or missing parameters. Check message in the body.
401Unauthorized — missing or invalid API key.
404Not found — invalid path or resource.
500Server error — retry with backoff.
When code in the response body is non-zero, check message for details. Use requestId when contacting support.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
planId
integer<int64>
required

Required. ID of the subscription plan to be created.

addonParams
object[]

Optional. List of addon plan parameters to be attached to this subscription.

applyPromoCredit
boolean<bool>

Optional. Whether to apply available promo credit when creating the first invoice.

applyPromoCreditAmount
integer<*int64>

Optional. Maximum promo credit amount to apply. If omitted and applyPromoCredit is true, the system auto-computes the usable amount.

cancelUrl
string<string>

Optional. URL to redirect the user to when the user cancels or the payment fails.

confirmCurrency
string<string>

Optional. When provided, represents the expected currency code for the first invoice and must match the value returned from preview, otherwise the request is rejected.

confirmTotalAmount
integer<int64>

Optional. When provided, represents the expected total amount (in minor units) for the first invoice and must match the value returned from preview, otherwise the request is rejected.

currency
string<string>

Optional. Currency code for charging (e.g. USD, EUR). If empty, plan default currency is used.

discount
object
discountCode
string<string>

Optional. Discount or coupon code to be applied to this subscription creation.

email
string<string>

Optional. End-user email. One of (ExternalUserId & Email), UserId or User object must be provided to identify the user.

externalUserId
string<string>

Optional. Merchant-side unique user identifier. Used together with email when UserId is not provided.

freeInInitialPeriod
boolean<*bool>

Optional. If true, the first billing period is treated as free or trial. This has higher priority than trialEnd.

freeTimeEnd
integer<*int64>

Optional. Custom free period end time when freeInInitialPeriod is true, as UTC timestamp (seconds). Has higher priority than trialEnd and can shorten or extend the default first-period-free behavior.

gatewayId
integer<*int64>

Optional. Payment gateway ID used to charge the first invoice of this subscription.

gatewayPaymentType
string<string>

Optional. Payment type for the selected gateway, such as card, wallet, etc.

metadata
object

Optional. Custom metadata map that will be stored on the created invoice and subscription.

paymentMethodId
string<string>

Optional. Existing payment method ID to be used for charging the first invoice.

paymentUIMode
string<string>

Optional. Checkout UI mode: hosted | embedded | custom. Default is hosted.

productData
object
quantity
integer<int64>

Optional. Number of units for the plan. Defaults to 1 if not specified.

returnUrl
string<string>

Optional. URL to redirect the user to after successful subscription creation or payment completion.

splitPayment
boolean<bool>

Optional. If true, always use split payment mode: create a hosted invoice link without attempting automatic payment. If false, the system will try automatic payment first and may still switch to split payment based on gateway response and risk control.

startIncomplete
boolean<bool>

Optional. If true, the subscription starts in incomplete status (now pay later): invoice is created and the subscription becomes active temporarily until paid or expired.

taxPercentage
integer<*int64>

Optional. External tax percentage override, in basis points (e.g. 1000 = 10%%). Overrides subscription-level taxPercentage when provided.

trialEnd
integer<int64>

Optional. Custom trial end time as UTC timestamp (seconds). If greater than now, it overrides the plan default trial configuration.

user
object
userId
integer<int64>

Optional. Internal UniBee user ID. If provided, it must be consistent with email/user when they are also provided.

vatCountryCode
string<string>

Optional. ISO country code for VAT calculation. If provided together with vatNumber, they must be consistent.

vatNumber
string<string>

Optional. Customer VAT number used for VAT validation and tax calculation.

Response

200 - application/json
code
integer<int>
data
object
merchantId
integer<int64>
message
string<string>
redirect
string<string>
requestId
string<string>