Local Payment Methods
BANCOMAT Pay
Overview
Availability
BANCOMAT Pay is currently in limited release and is available to pilot merchants in selected
countries. If you want to participate in the pilot,
contact us.
- Create, verify, and link your PayPal business account in the Braintree Control Panel. In order to process Local Payment Methods, you need to have a valid PayPal business account.
- Make sure you are using the latest version of the Client SDK.
Payment type | Buyer countries | Seller countries | Currency codes | Customer transaction limits |
---|---|---|---|---|
`bancomatpay` | Italy | Global except Russia, Japan, Brazil | `EUR` | Min: 0.01 EUR |
Loading the SDK
You will need to load the Client SDK and Local Payments SDK. One way is to load these from external
sources:
- HTML
<script src="https://js.braintreegateway.com/web/3.111.0/js/client.min.js"></script>
<script src="https://js.braintreegateway.com/web/3.111.0/js/local-payment.min.js"></script>
Capturing BANCOMAT Pay Transactions
BANCOMAT Pay works by circumventing the normal tokenization process. For this reason, merchants
must be signed up to receive and process the
LPMs webhooks.
The merchant will receive the single-use token they must transact upon through the
local_payment_completed
webhook.
BANCOMAT Pay with GraphQL
Note
BANCOMAT Pay is currently available only through the Javascript Client SDK and various server-side
SDKs.
Example Requests
The client-side implementation of BANCOMAT Pay is the same as described for
other LPM types
with these caveats:
- No pop-up will be launched, and the merchant will not receive a response with a nonce. The merchant will receive a response with a payment ID that they will need to keep track of in their system.
- Callback
- Promise
function createLocalPaymentClickListener(type) {
return function (event) {
event.preventDefault();
localPaymentInstance.startPayment({
paymentType: 'bancomatpay',
amount: '10.00',
currencyCode: 'EUR',
phone: '0226830102',
phoneCountryCode: '39',
givenName: 'Joe',
surname: 'Doe',
address: {
countryCode: 'IT'
},
onPaymentStart: function (data) {
// NOTE: It is critical here to store data.paymentId on your server
// so it can be mapped to a webhook sent by Braintree once the
// buyer completes their payment. See Start the payment
// section for details.
}
}, function (startPaymentError) {
if (startPaymentError) {
if (startPaymentError.code === 'LOCAL_PAYMENT_START_PAYMENT_FAILED') {
console.error('LocalPayment startPayment failed.');
} else {
console.error('Error!', startPaymentError);
}
} else {
// Success! Respond accordingly here.
}
});
};
}