Click Bank V4 IPN & Non Default Currencies

5 replies
Hello Everyone.

I have updated my clickbank ipn to use v4.

Recently we had a customer purchase through cb in indian rupees.
Now, clickbank automatically transforms this into $'s immediately in my cb account and payment received is in $'s.

Ok, All Good.

But in the IPN response, the sale amount is sent as Indian Rupees.
What would be the proper way to make sure that the payment amount in another curreny is equal to the product price in USD, and add the transaction in the database as $?

I spoke to clickbank support (sucks), and they informed me that they do not send an ipn response for the actual sale amount in the default currency, and there is no api access to their currency conversion system.

How do you handle this?
#bank #click #currencies #default #ipn
  • Profile picture of the author SteveSRS
    I think best solution is to save transaction in original currency (with datetime stamp).. that is what I do any way (however I don't work with clickbank just own system with multi currency)...

    There are various apis to do conversion however those are probably not same as the one clickbank uses (if they pay you in USD they probably do it in their favor)..

    You could ask them what their source of currency conversion is..
    Yahoo Finance has API I believe and also 'xe.com' and some others..
    {{ DiscussionBoard.errors[7372831].message }}
    • Profile picture of the author oldschoolwarrior
      "There are various apis to do conversion however those are probably not same as the one clickbank uses (if they pay you in USD they probably do it in their favor).."

      I considered that, but those api's update in real time, and clickbank updates theirs once per day.

      To be fair, there is no conversion on the receiving end as we are guaranteed the US dollar price set in the account, but I see no way of comparing my product price with the currency the customer pays.
      {{ DiscussionBoard.errors[7373104].message }}
      • Profile picture of the author SteveSRS
        Originally Posted by oldschoolwarrior View Post

        To be fair, there is no conversion on the receiving end as we are guaranteed the US dollar price set in the account, but I see no way of comparing my product price with the currency the customer pays.
        hmm well if you're not working on a system with predefined products (and thus prices which you can then set in advance) I guess you will just have to use an convert API and you will probably have some differences in the end but don't expect them to be that big it will be a problem...

        Still though if they always pay out in USD and they process everything from USD (as prices then are also set in USD I assume) very weird they send in amount in local currency via API to seller..
        {{ DiscussionBoard.errors[7376086].message }}
        • Profile picture of the author oldschoolwarrior
          Originally Posted by SteveSRS View Post

          hmm well if you're not working on a system with predefined products (and thus prices which you can then set in advance) I guess you will just have to use an convert API and you will probably have some differences in the end but don't expect them to be that big it will be a problem...
          I am using predefined products, but it is a good requirement to verify the ipn total with the product price, isnt it.
          Is it possible to receive an (hacked) IPN notification for a product with the wrong price? Even with ppaypal verify, it still suggests checking received data against stored data.
          Originally Posted by SteveSRS View Post

          Still though if they always pay out in USD and they process everything from USD (as prices then are also set in USD I assume) very weird they send in amount in local currency via API to seller..
          I agree, this is what cb said ...

          [quote]
          The purchase was made in Indian rupees, so that is why your instant notification presented that currency. If you want to see the US dollar equivalent, you can locate the order in your Transactions page, and it will display the earnings in US dollars. [quote] I guess I just need to check if the ipn is sent in us dollars, if not, than just pull the product price, and insert that price into the transaction DB.

          Thanks for you comments on this thread.
          {{ DiscussionBoard.errors[7376155].message }}
          • Profile picture of the author SteveSRS
            Originally Posted by oldschoolwarrior View Post

            I am using predefined products, but it is a good requirement to verify the ipn total with the product price, isnt it.
            Is it possible to receive an (hacked) IPN notification for a product with the wrong price? Even with ppaypal verify, it still suggests checking received data against stored data.
            100% correct is indeed a MUST to do.. however then in this case there is a good solution..

            Just use a API to convert to USD and set a margin in your calculation to check..

            something like
            if currency = USD then check if receivedamount == predefinedamount
            else {
            $amnt = converttousd(receivedamount,currency);
            if($amnt > (predefinedamount - maxdeviation) && $amnt < ((predefinedamount + maxdeviation) ) then
            all is good
            }

            Hope you understand I'm mixing up php and just writing programming flow a bit here..
            {{ DiscussionBoard.errors[7380221].message }}

Trending Topics