POST
/
merchant
/
subscription
/
user_subscription_detail
curl --request POST \
  --url https://api.unibee.top/merchant/subscription/user_subscription_detail \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "externalUserId": "<string>",
  "productId": 123,
  "userId": 123
}'
{
  "code": 123,
  "data": {
    "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
            }
          ],
          "planName": "<string>",
          "productId": 123,
          "publishStatus": 123,
          "status": 123,
          "taxPercentage": 123,
          "trialAmount": 123,
          "trialDemand": "<string>",
          "trialDurationTime": 123,
          "type": 123
        },
        "quantity": 123
      }
    ],
    "gateway": {
      "IsSetupFinished": true,
      "archive": true,
      "autoChargeEnabled": true,
      "bank": {
        "accountHolder": "<string>",
        "address": "<string>",
        "bic": "<string>",
        "iban": "<string>"
      },
      "countryConfig": {},
      "createTime": 123,
      "currency": "<string>",
      "currencyExchange": [
        {
          "exchange_rate": 123,
          "from_currency": "<string>",
          "to_currency": "<string>"
        }
      ],
      "currencyExchangeEnabled": true,
      "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>"
        }
      ],
      "gatewaySecret": "<string>",
      "gatewayType": 123,
      "gatewayWebhookIntegrationLink": "<string>",
      "gatewayWebsiteLink": "<string>",
      "minimumAmount": 123,
      "name": "<string>",
      "privateSecretName": "<string>",
      "publicKeyName": "<string>",
      "setupGatewayPaymentTypes": [
        {
          "autoCharge": true,
          "category": "<string>",
          "countryName": "<string>",
          "name": "<string>",
          "paymentType": "<string>"
        }
      ],
      "sort": 123,
      "subGateway": "<string>",
      "subGatewayName": "<string>",
      "webhookEndpointUrl": "<string>",
      "webhookSecret": "<string>"
    },
    "latestInvoice": {
      "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>",
        "planApplyType": 123,
        "planIds": [
          123
        ],
        "quantity": 123,
        "startTime": 123,
        "status": 123,
        "upgradeLongerOnly": true,
        "upgradeOnly": true,
        "userLimit": 123,
        "userScope": 123
      },
      "discountAmount": 123,
      "discountCode": "<string>",
      "finishTime": 123,
      "id": 123,
      "invoiceId": "<string>",
      "invoiceName": "<string>",
      "lines": [
        {
          "amount": 123,
          "amountExcludingTax": 123,
          "currency": "<string>",
          "description": "<string>",
          "discountAmount": 123,
          "metricCharge": {
            "CurrentUsedValue": 123,
            "chargePricing": {
              "chargeType": 123,
              "graduatedAmounts": [
                {
                  "endValue": 123,
                  "flatAmount": 123,
                  "perAmount": 123,
                  "startValue": 123
                }
              ],
              "metricId": 123,
              "standardAmount": 123,
              "standardStartValue": 123
            },
            "description": "<string>",
            "maxEventId": 123,
            "metricId": 123,
            "minEventId": 123,
            "name": "<string>",
            "totalChargeAmount": 123
          },
          "name": "<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
              }
            ],
            "planName": "<string>",
            "productId": 123,
            "publishStatus": 123,
            "status": 123,
            "taxPercentage": 123,
            "trialAmount": 123,
            "trialDemand": "<string>",
            "trialDurationTime": 123,
            "type": 123
          },
          "proration": true,
          "quantity": 123,
          "tax": 123,
          "taxPercentage": 123,
          "unitAmountExcludingTax": 123
        }
      ],
      "link": "<string>",
      "metadata": {},
      "originAmount": 123,
      "partialCreditPaidAmount": 123,
      "paymentId": "<string>",
      "paymentLink": "<string>",
      "periodEnd": 123,
      "periodStart": 123,
      "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": [
          {
            "CurrentUsedValue": 123,
            "chargePricing": {
              "chargeType": 123,
              "graduatedAmounts": [
                {
                  "endValue": 123,
                  "flatAmount": 123,
                  "perAmount": 123,
                  "startValue": 123
                }
              ],
              "metricId": 123,
              "standardAmount": 123,
              "standardStartValue": 123
            },
            "description": "<string>",
            "maxEventId": 123,
            "metricId": 123,
            "minEventId": 123,
            "name": "<string>",
            "totalChargeAmount": 123
          }
        ],
        "recurringChargeStats": [
          {
            "CurrentUsedValue": 123,
            "chargePricing": {
              "chargeType": 123,
              "graduatedAmounts": [
                {
                  "endValue": 123,
                  "flatAmount": 123,
                  "perAmount": 123,
                  "startValue": 123
                }
              ],
              "metricId": 123,
              "standardAmount": 123,
              "standardStartValue": 123
            },
            "description": "<string>",
            "maxEventId": 123,
            "metricId": 123,
            "minEventId": 123,
            "name": "<string>",
            "totalChargeAmount": 123
          }
        ]
      },
      "vatNumber": "<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
        }
      ],
      "planName": "<string>",
      "productId": 123,
      "publishStatus": 123,
      "status": 123,
      "taxPercentage": 123,
      "trialAmount": 123,
      "trialDemand": "<string>",
      "trialDurationTime": 123,
      "type": 123
    },
    "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
              }
            ],
            "planName": "<string>",
            "productId": 123,
            "publishStatus": 123,
            "status": 123,
            "taxPercentage": 123,
            "trialAmount": 123,
            "trialDemand": "<string>",
            "trialDurationTime": 123,
            "type": 123
          },
          "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,
        "email": "<string>",
        "firstName": "<string>",
        "id": 123,
        "isBlankPasswd": true,
        "isOwner": true,
        "lastName": "<string>",
        "merchantId": 123,
        "mobile": "<string>",
        "status": 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
          }
        ],
        "planName": "<string>",
        "productId": 123,
        "publishStatus": 123,
        "status": 123,
        "taxPercentage": 123,
        "trialAmount": 123,
        "trialDemand": "<string>",
        "trialDurationTime": 123,
        "type": 123
      },
      "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
              }
            ],
            "planName": "<string>",
            "productId": 123,
            "publishStatus": 123,
            "status": 123,
            "taxPercentage": 123,
            "trialAmount": 123,
            "trialDemand": "<string>",
            "trialDurationTime": 123,
            "type": 123
          },
          "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
          }
        ],
        "planName": "<string>",
        "productId": 123,
        "publishStatus": 123,
        "status": 123,
        "taxPercentage": 123,
        "trialAmount": 123,
        "trialDemand": "<string>",
        "trialDurationTime": 123,
        "type": 123
      },
      "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>",
      "profession": "<string>",
      "recurringAmount": 123,
      "registrationNumber": "<string>",
      "school": "<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>"
    }
  },
  "message": "<string>",
  "redirect": "<string>",
  "requestId": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
externalUserId
string

ExternalUserId, unique, either ExternalUserId&Email or UserId needed

productId
integer

default product will use if productId not specified and subscriptionId is blank

userId
integer

UserId

Response

200 - application/json
code
integer
data
object
message
string
redirect
string
requestId
string