Skip to content

dpay SDK · Ruby

Online payments in Ruby with the ready-made dpay SDK.

Add payments to a Ruby backend without hand-crafting every API call. The official SDK helps with checksums, transaction registration, IPN and integration errors.

  • Official dpay library
  • Automatic checksums
  • IPN verification
  • Consistent error handling

Install

Ruby
RubyGems
gem install dpay
Requirements
Ruby 3.1+
Ecosystem
RubyGems

The short answer

What is the dpay SDK for Ruby?

A dpay SDK is an official library that simplifies online payment integration with the dpay API. It reduces custom code for checksums, API calls, IPN verification and error handling.

Backend ecosystem

Ruby payments in popular frameworks and custom architectures.

The SDK is a backend library. Keep the dpay client in your service layer and load Payment Point credentials from secure server configuration.

01

Ruby on Rails

In a Ruby on Rails application, keep the Ruby SDK client in the service layer shared by checkout and IPN handling.

02

Sinatra i Hanami

In a Sinatra i Hanami application, keep the Ruby SDK client in the service layer shared by checkout and IPN handling.

03

RBS i Steep

In a RBS i Steep application, keep the Ruby SDK client in the service layer shared by checkout and IPN handling.

Integration layer

Payment plumbing you do not need to build from scratch.

The Ruby library wraps recurring payment lifecycle tasks in methods and types that fit the language ecosystem.

Checksums without manual assembly

The library calculates the checksum required for each request.

Request integrity

Payment lifecycle

Ready methods simplify payment registration and transaction handling.

Less HTTP code

Verified IPN

The SDK helps validate a notification before the order status changes.

Secure webhooks

Controlled errors

Exceptions and error codes make logging, retries and diagnosis clearer.

Predictable handling

Starter code

Create a dpay client in Ruby.

Get service credentials from the Payment Point settings. Store the Secret Hash in environment configuration or a secrets manager, never in the repository or frontend code.

Secret Hash → server only

ruby
require "dpay"

dpay = DPay::Client.new(
  service: "service_name",
  secret_hash: "secret_hash",
)

Implementation flow

From a Payment Point to a confirmed order.

The secure implementation flow stays the same across technologies.

  1. 01

    Install the library

    Add the official package to your backend and pin the version according to your project rules.

  2. 02

    Configure the client

    Pass the service name and Secret Hash from secure server configuration only.

  3. 03

    Register the payment

    Send the amount plus success, failure and IPN URLs, then redirect the customer to the returned payment URL.

  4. 04

    Verify IPN

    After successful notification verification, update the order status in your database.

Other technologies

The same API in your team's backend.

Compare the available libraries and choose the language that best fits your product architecture.

Integrator FAQ

Before the first line of code.

How do I add online payments in Ruby?

Install the package with “gem install dpay”, create a client with the service name and Secret Hash, then call the payment registration method described in the Ruby SDK documentation.

Does the SDK generate checksums?

Yes. Published dpay SDKs calculate checksums according to the API specification. The Secret Hash must still remain secure on the server.

How does the SDK handle IPN?

The library helps verify the IPN signature and parse the notification. Change order state only after successful verification.

Which dashboard credentials do I need?

You need Payment Point credentials, primarily the service name and Secret Hash. See the library documentation for its complete requirements.

Full documentation

Every Ruby SDK method in one place.

See installation, complete examples, IPN handling, errors and the remaining operations available in the library.