Mollie API client for Crystal

Example payment

Accepting iDEAL, Bancontact, SOFORT Banking, Creditcard, SEPA Bank transfer, SEPA Direct debit, PayPal, KBC/CBC Payment Button, Belfius Direct Net, paysafecard, ING Home’Pay, Gift cards, EPS, Giropay and Apple Pay online payments without fixed monthly costs or any punishing registration procedures. Just use the Mollie API to receive payments directly on your website or easily refund transactions to your customers.

Build Status GitHub version

Disclaimer

This is the unofficial Crystal shard for Mollie. It is directly ported from the Ruby version (mollie-ruby-api) but not an exact copy. Usage might vary from the Ruby version due to language differences and to make the most of Crystal's type system.

Requirements

To use the Mollie API client, the following things are required:

Installation

Add mollie as a depencency to your application's shard.yml:

dependencies:
  mollie:
    github: tilishop/mollie.cr

Then run shards install.

Usage

Configure your API key:

Mollie.configure do |config|
  config.api_key = "test_O5GwT48772F3f3Cr0211c83341Q83F"
end

Create a payment:

payment = Mollie::Payment.create({
  amount: {
    value: "10.00",
    currency: "EUR",
  },
  method:       "creditcard",
  description:  "My first API payment",
  redirect_url: "https://shop.org/order/12345",
  webhook_url:  "https://shop.org/mollie-webhook",    
})

Documentation

Contributing

  1. Fork it (https://github.com/your-github-user/mollie/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

API documentation

If you wish to learn more about the Mollie API, please visit the Mollie API Documentation.

License

BSD (Berkeley Software Distribution) License.

Support

Mollie Contact: www.mollie.com[email protected] — +31 20-612 88 55