MundiPagg Ruby Client Library

Build StatusGem Version

Ruby API for integration with MundiPagg payment web services.


Unit tests made with Cucumber and RSpec



After get your MerchantKey you can run the unit tests in our simulator environment, all you need to do is put your MerchantKey in the TestConfiguration.rb file and execute cucumber tests with the command below:

“ $ bundle exec rake integration


Below a simple exemple of an order with one credit card transaction.

“ $ gem install mundipagg

“by require ‘mundipagg’

Create the client instance

client = :production

Create the order

order =

Fill order information

order.amountInCents = 1000 # R$ 10,00 order.amountInCentsToConsiderPaid = 1000 order.merchantKey = ‘00000000-0000-0000-0000-000000000000’ order.orderReference = ‘Custom Order 42’

Credit card transaction information

credit =

credit.amountInCents = 1000; # R$ 10,00 credit.creditCardBrandEnum = Mundipagg::CreditCardTransaction.BrandEnum[:Visa] credit.creditCardOperationEnum = Mundipagg::CreditCardTransaction.OperationEnum[:AuthAndCapture] credit.creditCardNumber = ‘4111111111111111’ credit.holderName = ‘Anthony Edward Stark’ credit.installmentCount = 1 credit.paymentMethodCode = 1 #Simulator credit.securityCode = 123 credit.transactionReference = ‘Custom Transaction Identifier’ credit.expirationMonth = 5 credit.expirationYear = 2020

Add transaction to order

order.creditCardTransactionCollection « credit

response = client.CreateOrder(order)

The response variable will contain a Hash like the one below.

“by }, :boleto_transaction_result_collection=>nil, :mundi_pagg_suggestion=>nil, :error_report=>nil, :“@xmlns:a”=>“”, :“@xmlns:i”=>“”}, :@xmlns=>“”}}


See the LICENSE file.