TheRealPapa TheRealPapa - 2 months ago 14x
PHP Question

Braintree API in PHP - enforce currency for transaction

I am trying to enforce a currency for a transaction via the Braintree API but I cannot see how this is done. Stripe is very easy, as the currency (AUD, USD) is passed to the Stripe server as part of the execution.

With Braintree what I can see is that the currency is dependent on the merchant account receiving the money. My app will allow a user to invoice their customer, so the user will select the presentment currency of the invoice. I want to lock this selection to their merchant account currency.

If I understood this correctly, then pushing a transaction of MYR 250 (for example) and having a customer pay for this, if the merchant account behind the transaction is a EUR account, then the customer was presented by my app a MYR 250 value, but his CC is debited a EUR 250 value.

Is there a way to do this with Braintree? I want to do this with the standard merchant accounts and not under the Master Merchant set up.

Alternatively, is there a way to confirm the currency of an account from the Merchant Id / keys that a user supplies my app?

I have read the entire API docs, but I cannot see how this is done. Did i miss something? It has been a long week already!


Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.

It's possible to have different presentment currencies and settlement currencies. To set this up, please check out this section and email the Braintree Accounts team directly:

To confirm the currency associated with a MerchantAccount, you can call MerchantAccount.find using a merchant_account_id. With the MerchantAccount object, you can check its currency_iso_code attribute.