Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Discount not Applied Problem #54

Closed
WrathChaos opened this issue Mar 1, 2023 · 5 comments
Closed

iOS Discount not Applied Problem #54

WrathChaos opened this issue Mar 1, 2023 · 5 comments
Assignees

Comments

@WrathChaos
Copy link

WrathChaos commented Mar 1, 2023

Hello @divanc :)

I have a problem with discounted prices not being applied when I try to purchase the subscription.

I was sending the discount id before version 2 and it was working without any problem however since the v2 documentation says Adapty will handle the discount by itself automatically. I don't know what I should do or if it is working.

Our app has both introductory and promotional discounts.

Could it be because of the sandbox and production differences? Should I trust this?

Can you enlighten me, please? :)

Here you can see the discounted price but when I try to purchase it shows the full price.

I was expecting something like this:

Here is the data for the subscription:

{
  "currencyCode": "USD",
  "currencySymbol": "$",
  "introductoryDiscount": {
    "localizedNumberOfPeriods": "3 months",
    "localizedPrice": "$0.99",
    "localizedSubscriptionPeriod": "1 month",
    "numberOfPeriods": 3,
    "price": 0.99,
    "subscriptionPeriod": {
      "numberOfUnits": 1,
      "unit": "month"
    },
    "ios": {
      "paymentMode": "pay_as_you_go"
    }
  },
  "introductoryOfferEligibility": "unknown",
  "localizedDescription": "Monthly Premium",
  "localizedPrice": "$2.99",
  "localizedSubscriptionPeriod": "1 month",
  "localizedTitle": "Premium",
  "paywallABTestName": "Get Premium",
  "paywallName": "Get Premium",
  "price": 2.99,
  "subscriptionPeriod": {
    "numberOfUnits": 1,
    "unit": "month"
  },
  "variationId": "----",
  "vendorProductId": "----,
  "ios": {
    "discounts": [
      {
        "localizedNumberOfPeriods": "3 months",
        "localizedPrice": "$0.99",
        "localizedSubscriptionPeriod": "1 month",
        "numberOfPeriods": 3,
        "price": 0.99,
        "subscriptionPeriod": {
          "numberOfUnits": 1,
          "unit": "month"
        },
        "ios": {
          "paymentMode": "pay_as_you_go",
          "identifier": "-----"
        }
      }
    ],
    "isFamilyShareable": true,
    "regionCode": "US",
    "subscriptionGroupIdentifier": "------"
  }
}
@divanc divanc self-assigned this Mar 2, 2023
@divanc
Copy link
Collaborator

divanc commented Mar 2, 2023

Hey, @WrathChaos, hope you're feeling better!
Is this data you've mentioned extracted from v2 SDK?

Basically, you just need to set a promo in your Adapty dashboard and it should be applied automatically as your purchase screen suggests. No extra builds or stuff.

Rendering prices however is on your side, you can check if discount list is not empty, then you can render product.price and discount.price nearby. Every discount is applied to a product inside native SDKs before buying popup appears. If you need a more comprehensive understanding I can learn from our iOS team and pass my knowledge 😄

About your issue... Can you specify Adapty library version?

@WrathChaos
Copy link
Author

I am much better, thank you :)

This data is extracted from v2 SDK, we're using [v2.3.6] of react-native-adapty.

I did not change anything neither on Adapty dashboard or Apple side for discount prices. I can confirm that I can get discount prices and its identifier etc. I also checked Adapty dashboard inside Products -> Monthly Subscriptions -> Promotional Offers

Also, I can confirm that it works with the [v1.3.4] and I was sending the discount id to Adapty but it works differently with the v2 version as you can see on the screenshots.

If you can give me a guide, I can try it out for more detailed information :)

@x401om
Copy link

x401om commented Mar 3, 2023

@WrathChaos I would like to clarify one more thing. In order for the promotional offer to be attached to the product, you need to select the appropriate offer id from the list during paywall configuration. Note that in order for the offer to be available for selection, it is necessary to add it in the corresponding product page in advance.

Have you done this setup for your paywall?

@WrathChaos
Copy link
Author

@x401om You're a life saver :)

Is this one new? I did setup only in the monthly one before.

Thank you :)

@x401om
Copy link

x401om commented Mar 3, 2023

No, it's not a new thing. You most likely made the decision to show the promo offer by yourself, while Adapty provides an interface for this (if the user is not allowed to have the offer, it will not apply).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants