Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Welcome to the Bambora Java SDK wiki!
Please note that this SDK still contains some references to the previous 'Beanstream' name.
Also check out our main developer documentation located at dev.na.bambora.com
Step 1: Create a Test Account
Head over to the Quick Start Guide and create a developer sandbox account. Take note of the Merchant ID it gives you.
Step 2: Download the SDK
Check out the source here and build the jar file.
Add the jar file to your project.
Step 3: Run this example code
Create a test class in your Java project and add the following code to your main method.
Gateway beanstream = new Gateway("v1", YOUR_MERCHANT_ID, "YOUR_API_KEY"); CardPaymentRequest req = new CardPaymentRequest(); req.setAmount("100.00") .setMerchantId("300200578") .setOrderNumber(getRandomOrderId("test")); req.getCard() .setName("John Doe") .setNumber("5100000010001004") .setExpiryMonth("12") .setExpiryYear("18") .setCvd("123"); PaymentResponse response = beanstream.payments().makePayment(req);
Switch the MerchantId variable's value from YOUR_MERCHANT_ID to your actual merchant ID.
Next, head to the [Merchant Member Area](https://web.na.bambora.com/admin/sDefault.asp and navigate to
Administration -> Account -> Order Settings
Copy the API Key and replace the ApiKey variable's "YOUR_API_KEY" with your actual API key.
Run the code to make a payment!