gitcordovabranch.ioreferrals

Branch io referral redeem rewards sending decimal values


We are using branch io for referral integration in our app, it's an cordova application which involves real time payment via users credit card.

We have come across scenario where we want to redeem user's money from there referral balance sending DECIMAL value for amount in method , got it from https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking#handle-referrals

But understanding document came across an important note, that amount should be integer, we have many cases where amount will be decimal value, so what will be possible best solution for us in this case!

Any help will be greatly appreciated!! Thank you ton!.


Solution

  • Branch referral program uses integer values for credit system. So for your use-case, you can convert dollars into cents and use that in the credit system. So 43.34$ would 4334 cents.