Increase number on DB after IAP purchase


I am on the development of an application which will be available on Android & iOS.

When making a successful purchase on an app I have to add a number of credits to the customer’s current value.

My “Credits” column is of type number.

I tried :

(Logged in - Credits)+1

As well as :

(Logged in - Credits)+INT(1)

This adds everything to me except 1 credit to the current number …
Sometimes it updates 9, sometimes 43, etc …

(My tests is effected on iOS with TestFlight)

Has anyone encountered this problem? Do you have a solution please?

Thank you in advance,
Best regards

I made a video to see the problem.

You can view at this link:

Has anyone encountered this problem before or has a solution?

I realize that when validating a payment for a product, it loads the success actions, of all my products available on the page.

However these have a different product id …

I just tested this and I had the same issue - log the user out and log back in.

It was because I was updating the logged in user but Adalo didn’t know which user that was.

Hello Erik, thank you for your return.

I tried by logging out and logging in again, it didn’t change anything.

The update is always done with +34 each time, on the balance of the connected customer …

I have the impression that the app detects the correct logged in user account, but adds +34 which is the total of all purchases available on the page (1 + 3 + 5 + 10 + 15 = 34).

When Apple returns “success” for the purchase, Adalo therefore loads all the success events of the Digital Purchase, instead of just that of the component purchased.

This takes over the balance of the currently logged-in user and adds +34.

Update the user using a separate action. I didn’t test it with IAP but it works on the individual action.

This is normally what I did and I would like it to happen like this :-).

Attached are screenshots of the action of each of the “Digital Purchase” buttons, you see on the right the button I’m in, for the action performed on the left.

When you buy the pack at 0.99 €, there must be only “+1” for the customer. But this performs all the actions of my buy page, i.e. the value / actions of all buttons …

Normally everything is well configured on my side …

All the actions of the different buttons together make a total of 34. The user is credited with 34 for each purchase of “1 credit” (first screenshot)

However, they all have a different “product ID”.

I used a list for this, as you’ll see in the video.

Erik, thanks for your time and for the video!

I do the same web version, with Stripe, I have no worries about adding the credits correctly …

The error really seems to occur with the “Digital Purchase” and the callback which is made by Apple during the success and not with the addition of the credits finally.

Obviously, it is impossible to put several “Digital Purchase” components and perform an action depending on the component purchased.

The problem really stems from there and not from the addition of the credits itself.

The single action of each button is performed, while I only make one purchase and it is the action of only that product that needs to be performed.

If I record a unique history in the success action of each digital purchase, they are all recorded! While I only buy one consumable product.

If I make a purchase of 0.99 €, upon successful payment, success actions of 0.99 €, 2.99 €, 3.99 €, 6.99 € and 9.99 € are also executed. It should not be the case, I am not attributing all the services for a single purchase, but the corresponding service for the purchase.

Has anyone encountered this problem ?

Does anyone have an app with different Digital Purchase on the same page?..

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.