Back in late 2012 we announced a new bridge parameter: amount_int. We got the feedback from developers that this was a little confusing.

To clarify: You may either use amount_int or amount to specify the amount to charge when calling paymill.createToken().

In the first case the provided amount unit has to be cents (e.g. 5560 for 55.60 EUR). In the latter case it is a full currency value (e.g. 55.60).

Code usage of amount_int

  paymill.createToken({
      ...
      amount_int: 5560,
      currency: 'EUR'
    }, PaymillResponseHandler);

    return false;
  });

Code usage of amount

  paymill.createToken({
      ...
      amount: 55.60,
      currency: 'EUR'
    }, PaymillResponseHandler);

    return false;
  });

Furthermore it is necessary to specify exactly the same amount when actually triggering the payment against the Paymill API (here the amount unit is always cents). If there is a difference in those two amounts a payment will be rejected.

I hope we made this clearer!

Guest Blogger

This is a guest post written by one of our contributors.