TagMangoTagMango Docs
Subscription

Get Subscriptions By User

GET
/api/v1/external/subscriptions/{userId}

Get all subscriptions for an user

AuthorizationBearer <token>

In: header

Path Parameters

userId*string

User identifier for subscriber

Query Parameters

limit?number

Number of items per page of the results

Range1 <= value
page?number

Page number of the results

Range1 <= value
statuses?string

Comma-separated list of status to filter subscriptions

Avaliable statuses: initiated, authenticated, active, pending, halted, completed, cancelled, manualactive, manualexpired, expired
affiliate_enabled?booleanDeprecated

Affiliate enabled

affiliateEnabled?boolean

Affiliate enabled

Header Parameters

x-whitelabel-host*string

Host name of the dashboard, ex: mydomain.tagmango.com

Response Body

application/json

application/json

application/json

curl -X GET "https://api-prod-new.tagmango.com/api/v1/external/subscriptions/62f1f378a7aeb6ce86fae3dd" \  -H "x-whitelabel-host: string"
[
  {
    "createdAt": "2024-11-04T13:05:43.799Z",
    "updatedAt": "2024-11-04T13:05:43.799Z",
    "_id": "66a1390268a76f2f5c9f39a3",
    "videocall": 5,
    "subscribedAt": "2024-08-11T10:20:30Z",
    "latestSubscriptionDate": "2024-08-11T10:20:30Z",
    "expiredAt": "2024-08-11T10:20:30Z",
    "status": "active",
    "razorpaySubscriptionStatus": "authenticated",
    "autopayEnabled": true,
    "isMigrated": true,
    "nextChargeAt": "2024-08-18T10:20:30Z",
    "razorpayChargeAtWillToken": "token_1234567890",
    "razorpayChargeAtWillTokenStatus": "active",
    "fan": {
      "_id": "6659ca9e5f2acb7abfdcd8fd",
      "name": "John Doe",
      "email": "john.doe@example.com",
      "userSlug": "john-doe",
      "phone": 1234567890,
      "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
      "isDeactivated": false,
      "country": "India",
      "dialCode": "+91",
      "currency": "USD"
    },
    "creator": {
      "_id": "6659ca9e5f2acb7abfdcd8fd",
      "name": "John Doe",
      "email": "john.doe@example.com",
      "userSlug": "john-doe",
      "phone": 1234567890,
      "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
      "isDeactivated": false,
      "country": "India",
      "dialCode": "+91",
      "currency": "USD"
    },
    "mango": {
      "_id": "66a1390268a76f2f5c9f39a3",
      "creator": "77b2390268a76f2f5c9f39a4",
      "title": "Introduction to Coding",
      "start": "2024-08-11T10:20:30Z",
      "end": "2024-08-11T10:20:30Z",
      "price": 500,
      "currency": "USD",
      "inr": 500,
      "usd": 6,
      "eur": 5,
      "inrAmount": 500,
      "usdAmount": 6,
      "eurAmount": 5,
      "description": "This is a comprehensive guide to coding.",
      "styledDescription": "<p>This is a <strong>comprehensive</strong> guide to coding.</p>",
      "isStopTakingPayment": false,
      "isHidden": false,
      "isDeleted": false,
      "recurringType": "MONTHLY",
      "noOfDays": 30,
      "isLifeTime": true,
      "content": true,
      "chat": true,
      "videocall": 5,
      "webinar": true,
      "razorpayPlanId": "plan_HVfP7VFX3bGm8c",
      "razorpayPlanIdUSD": "plan_HVfP8WFX3bGm9d",
      "razorpayPlanIdEUR": "plan_HVfP9XFX3bGm0e",
      "isPublic": false,
      "isFree": true,
      "whatsapp": "+1234567890",
      "imgUrl": "https://linktoimage.com/image.jpg",
      "videoUrl": "https://linktovideo.com/video.mp4",
      "videoThumbnail": "https://linktothumbnail.com/thumbnail.jpg",
      "additionalCoverContent": [
        "Content 1",
        "Content 2"
      ],
      "gstEnabled": true,
      "excludegst": false,
      "includegst": false,
      "activeSubscribers": 100,
      "totalEarning": 10000,
      "playlistArr": [
        "88d3490268a76f2f5c9f39a3",
        "99e4590268a76f2f5c9f39a4"
      ],
      "shortUrl": "shorturl.com",
      "mangoSlug": "introduction-to-coding",
      "certificateSentOn": "2024-08-11T10:20:30Z",
      "disableMoe": false,
      "mangoPageId": "99f5690268a76f2f5c9f39a5",
      "disableReciept": false,
      "mangoPageUploadedLink": "https://linktomangopage.com/page",
      "landingPagePublished": false,
      "oldMigratedMangoId": "5f8b9c0268a76f2f5c9f39a3",
      "thankYouContent": "Thank you for purchasing!",
      "maxSubscriber": 1000,
      "usdStripeProductPriceId": "price_HVfP7WFX3bGm8c",
      "eurStripeProductPriceId": "price_HVfP8XFX3bGm9d",
      "disableEngagement": true,
      "otpLess": true,
      "customFields": [
        {
          "fieldName": "Some name",
          "validation": "required",
          "helpText": "Please enter your full name",
          "dropdownValues": [
            "Value 1",
            "Value 2"
          ]
        }
      ],
      "affiliateEnabled": true,
      "affiliatePercentage": 10,
      "lifetimeLinkingEnabled": true,
      "aliasCreator": "5f8b9c0268a76f2f5c9f39a3",
      "customHeaderTags": {
        "tag": "value"
      },
      "trialPeriod": 7,
      "additionalMangoes": [
        "5f8b9c0268a76f2f5c9f39a3",
        "5f9b9d0268a76f2f5c9f39a4"
      ],
      "offers": [
        "Offer 1",
        "Offer 2"
      ],
      "emailToCreatorOnEveryPurchase": false,
      "emailToCreatorOnPurchaseFailure": false,
      "hideCouponCodeInput": true,
      "defaultPaymentGateway": "RAZORPAY",
      "repurchaseOneTime": true,
      "zeroCostMango": false,
      "mangoFacebookPixelId": "FB_PIXEL_123456",
      "accountSettingsMangoTier": "Gold",
      "accountSettingsMangoCommission": 10,
      "affiliatedMangoes": {
        "mango": "string",
        "affiliatePercentage": 0,
        "affiliateEnabled": true,
        "affiliateFixedPercentage": 0
      },
      "allowMultipleQuantity": false,
      "strikeThroughPrice": {
        "inr": 0,
        "usd": 0,
        "eur": 0
      },
      "maxBillingCycle": 12,
      "isLevelUpEnabled": true,
      "upsellTitle": "Upgrade to Premium",
      "upsellDetails": {
        "mango": "string",
        "newTitle": "string",
        "newDescription": "string",
        "newCoverImage": "string",
        "backgroundColor": "string",
        "borderColor": "string",
        "borderWidth": "string",
        "borderStyle": "string",
        "corner": "string",
        "markDownDescription": "string"
      },
      "customAffiliateLink": "https://affiliate.link/mango",
      "isPriceIncludedGst": false,
      "openEndedMango": true,
      "freebieMangoes": [
        "5f8b9c0268a76f2f5c9f39a3",
        "5f9b9d0268a76f2f5c9f39a4"
      ],
      "iapProductId": "com.mango.product.id",
      "iapDescription": "This is iap purchase description",
      "iapPrice": 100,
      "settleToTagmango": true,
      "funnelBridge": "5f6e5e0268a76f2f5c9f39a3",
      "funnelBridgedMangoes": [
        "5f8b9c0268a76f2f5c9f39a3",
        "5f9b9d0268a76f2f5c9f39a4"
      ],
      "isFunnelBridgeShared": true,
      "createdAt": "2024-08-11T10:20:30Z",
      "updatedAt": "2024-08-11T10:20:30Z"
    },
    "orders": [
      {
        "_id": "66a1390268a76f2f5c9f39a3",
        "fan": "66a1390268a76f2f5c9f39a3",
        "creator": "66a1390268a76f2f5c9f39a3",
        "mango": "66a1390268a76f2f5c9f39a3",
        "mangoArr": [
          "66a1390268a76f2f5c9f39a3",
          "77b2390268a76f2f5c9f39a4"
        ],
        "subscription": "88c3390268a76f2f5c9f39a5",
        "coupon": "DISCOUNT2024",
        "amount": 1000,
        "subscriberCurrency": "INR",
        "inr": {
          "mangoPrice": 3000,
          "preDiscount": 3000,
          "discount": 0,
          "gstAmount": 0,
          "afterGstAmount": 3000,
          "commissionCharged": 30,
          "gstForCommission": 0,
          "gstForCreator": 0,
          "afterCommissionAmount": 2970,
          "afterDiscountAmount": 3000,
          "convenienceFee": 75,
          "convenienceWithoutGst": 63.56,
          "convenienceFeeGst": 11.44,
          "afterConvenienceAmount": 3075,
          "paymentGatewayComissionAmount": 30,
          "tmCommissionCharged": 0,
          "affiliateComission": 0,
          "affiliateFixedCost": 0,
          "affiliateEnablementStatus": false,
          "refernEarnCommission": 0,
          "refernEarnProductValue": 0,
          "funnelBridgedTotalAmount": null,
          "funnelBridgedTotalPercentage": null,
          "funnelBridgeReferralTotalCommission": 0
        },
        "usd": {
          "mangoPrice": 35.7,
          "preDiscount": 35.7,
          "discount": 0,
          "gstAmount": 0,
          "afterGstAmount": 35.7,
          "commissionCharged": 0.36,
          "gstForCommission": 0,
          "gstForCreator": 0,
          "afterCommissionAmount": 35.34,
          "afterDiscountAmount": 35.7,
          "convenienceFee": 0.9,
          "convenienceWithoutGst": 0.76,
          "convenienceFeeGst": 0.14,
          "afterConvenienceAmount": 36.6,
          "paymentGatewayComissionAmount": 0.36,
          "tmCommissionCharged": 0,
          "affiliateComission": 0,
          "affiliateFixedCost": 0,
          "affiliateEnablementStatus": false,
          "refernEarnCommission": 0,
          "refernEarnProductValue": 0,
          "funnelBridgedTotalAmount": null,
          "funnelBridgedTotalPercentage": null,
          "funnelBridgeReferralTotalCommission": 0
        },
        "eur": {
          "mangoPrice": 33,
          "preDiscount": 33,
          "discount": 0,
          "gstAmount": 0,
          "afterGstAmount": 33,
          "commissionCharged": 0.33,
          "gstForCommission": 0,
          "gstForCreator": 0,
          "afterCommissionAmount": 32.67,
          "afterDiscountAmount": 33,
          "convenienceFee": 0.83,
          "convenienceWithoutGst": 0.7,
          "convenienceFeeGst": 0.13,
          "afterConvenienceAmount": 33.83,
          "paymentGatewayComissionAmount": 0.33,
          "tmCommissionCharged": 0,
          "affiliateComission": 0,
          "affiliateFixedCost": 0,
          "affiliateEnablementStatus": false,
          "refernEarnCommission": 0,
          "refernEarnProductValue": 0,
          "funnelBridgedTotalAmount": null,
          "funnelBridgedTotalPercentage": null,
          "funnelBridgeReferralTotalCommission": 0
        },
        "gstAmountInr": 180,
        "gstAmountUsd": 25,
        "gstAmountEur": 22,
        "discount": 200,
        "preDiscount": 1200,
        "afterDiscountAmount": 900,
        "gst": 180,
        "commissionCharged": 100,
        "afterCommissionAmount": 800,
        "gstForCommission": 18,
        "gstForCreator": 18,
        "gstNumber": "27AAACB2894B1Z1",
        "gstRegistrationName": "John Doe Pvt. Ltd.",
        "gstRegistrationAddress": "123, Business Street, Mumbai, India",
        "gstState": "Maharashtra",
        "razorpayFee": 20,
        "razorpayTax": 3.6,
        "stripeFee": 25,
        "paytmFee": 15,
        "paytmTax": 2.7,
        "status": "PAID",
        "externalTransactionId": "txn_abc123xyz",
        "isManualRecurring": true,
        "razorpaySubscriptionId": "sub_HVfP6XFX3bGm7b",
        "razorpayOrderId": "order_HVfP7VFX3bGm8c",
        "razorpayPaymentId": "pay_HVfP8VFX3bGm9d",
        "razorpayPaymentStatus": "SUCCESS",
        "stripeSubscriptionId": "sub_1FHGjfGHJKl789",
        "razorpayTransferId": "trf_HVfP9VFX3bGm0e",
        "paymentProvider": "Razorpay",
        "successRedirectionRoute": "/payment/success",
        "failureRedirectionRoute": "/payment/failure",
        "stripeOrderId": "order_1G34vHFjkgl8V8",
        "paytmOrderId": "PAYTM_HJ34v56FHgk87",
        "paytmTxnToken": "txn_HJ34v56FHgk87",
        "paytmPrice": "1000",
        "juspayOrderId": "jus_HJ34v56FHgk87",
        "transferAmount": 500,
        "scenario": "SCENARIO_1",
        "webhookStatus": "PENDING",
        "remainingDays": 30,
        "isWebhookFixed": true,
        "discovery": true,
        "payslip": "PSLIP_2024",
        "isDeductedFromMg": true,
        "refOrders": [
          "66a1390268a76f2f5c9f39a3",
          "77b2390268a76f2f5c9f39a4"
        ],
        "manualPayAmount": 400,
        "adminUser": "99d2390268a76f2f5c9f39a5",
        "manualTransferId": "MT_1234567890",
        "invoiceNumber": 12345,
        "isZapier": false,
        "moengageCouponUsed": false,
        "manualRefundRequest": true,
        "isRefunded": false,
        "refundType": "Full",
        "refundState": "Initiated",
        "refundInitiatedBy": "5f2b3c0268a76f2f5c9f39a3",
        "refundInitiatedAt": "2024-08-11T10:20:30Z",
        "refundNotes": "Customer requested refund due to incorrect charge",
        "stripeRefundId": "re_1G74yBFx7dF29FJ1",
        "manualRefundPhotoProof": "https://linktoimage.com/photo.jpg",
        "manualRefundTransactionId": "TXN_1234567890",
        "invoice": "INV_9876543210",
        "commissionInvoice": "COMM_INV_1234567890",
        "commissionInvoiceNumber": 12345,
        "withdrawalStatus": "Pending",
        "withdrawal": "5f3b4c0268a76f2f5c9f39a3",
        "trackerId": "5f4b5c0268a76f2f5c9f39a3",
        "creatorCurrency": "USD",
        "tmCommission": 15,
        "tmCommissionCharged": 150,
        "convenienceFee": 50,
        "convenienceWithoutGst": 45,
        "convenienceFeeGst": 5,
        "afterConvenienceAmount": 950,
        "convenienceFeeInvoice": "CONV_INV_9876543210",
        "convenienceFeeInvoiceNumber": 67890,
        "whitelabelHost": "yourcustomdomain.com",
        "isSubscriptionOrder": false,
        "chargeAtWillStatus": "Enabled",
        "chargeAtWill": true,
        "subscriptionProvider": "Stripe",
        "customFields": {
          "customField1": "value1",
          "customField2": "value2"
        },
        "paymentGatewayComissionAmount": 20,
        "paymentGatewayComissionType": "Percentage",
        "affiliateUser": "5f6b7c0268a76f2f5c9f39a3",
        "affiliateComission": 30,
        "affiliateFixedCost": 50,
        "affiliateWithdrawalStatus": "Completed",
        "affiliateWithdrawalDate": "2024-08-11T10:20:30Z",
        "cartOrder": "5f8b9c0268a76f2f5c9f39a3",
        "noCostEmiAvailable": true,
        "noCostEmiRefreshed": false,
        "oldCoupon": "OLDCOUPON2024",
        "oldDiscount": 100,
        "noCostEmiDiscount": 50,
        "changePaymentMethod": true,
        "customNextPaymentDate": "2024-09-11T10:20:30Z",
        "duplicateInitiatedFlag": true,
        "orderCompletedFlag": true,
        "orderFailedFlag": false,
        "quantity": 2,
        "mangoPrice": 500,
        "refundAmount": {
          "inrAmount": 100,
          "usdAmount": 15,
          "eurAmount": 13
        },
        "refundFromApi": true,
        "isLedgerMigrated": true,
        "cartOrdersDetails": [
          {
            "item1": "details1"
          },
          {
            "item2": "details2"
          }
        ],
        "refernEarnCommission": 50,
        "refernEarnParent": "5fabc0268a76f2f5c9f39a3",
        "refernEarnRefferee": "5fcdf0268a76f2f5c9f39a3",
        "refernEarnProduct": "5feff0268a76f2f5c9f39a3",
        "refernEarnProductValue": 1000,
        "isCartOrder": false,
        "notes": "Urgent delivery requested",
        "processingLock": 0,
        "failProcessingLock": 0,
        "failNotified": false,
        "purchaseNotified": false,
        "ledgerEntry": "5f4e3c0268a76f2f5c9f39a3",
        "hasCustomAffiliatePriceInjection": true,
        "customAffiliateSellingPrice": 500,
        "customAffiliateSellingPriceCurrency": "USD",
        "mangoPriceBreakup": [
          {
            "inrAmount": 100,
            "usdAmount": 15,
            "eurAmount": 13,
            "mango": "5f4e3c0268a76f2f5c9f39a3"
          }
        ],
        "funnelBridgeMangoesToPurchase": [
          "5f4e3c0268a76f2f5c9f39a3",
          "5f5e4d0268a76f2f5c9f39a4"
        ],
        "funnelBridge": "5f6e5e0268a76f2f5c9f39a3",
        "hideFunnelBridgeOrder": false,
        "funnelbridgeWrapperOrderId": "5f7e6f0268a76f2f5c9f39a3",
        "razorpayInternalAccountType": "SAVINGS",
        "razorpayInternalInvoiceUploaded": false,
        "webinarReferral": "5f8e7f0268a76f2f5c9f39a3"
      }
    ],
    "earning": 50,
    "totalSalesAmount": 100
  }
]
{
  "code": 400,
  "type": "Bad request",
  "statusMessage": "BAD_REQUEST",
  "message": "Invalid request",
  "success": false
}
{
  "code": 401,
  "type": "Unauthorized",
  "statusMessage": "UNAUTHORIZED",
  "message": "Invalid token",
  "success": false
}