Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tipalti-ruby

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tipalti-ruby

  • 0.5.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Gem Version CircleCI

Tiplaty Ruby

An API client for Tipalti in ruby.

Installation

Add to your Gemfile:

gem 'tipalti-ruby'

Then bundle install.

Usage

API Client

The Tipalti API uses OAuth to authenticate API requests.

First you need ot get an access code externally by following the Tipalti authorization flow.

Then you can create a Tipalti API client.

client = Tipalti::Client.new(
  client_id: 'client_id', # Tipalti developer app client id
  client_secret: 'client_secret', # Tipalti developer app client id
  access_token: 'access_token', # Access token from authorization flow
  refresh_token: 'refresh_token', # Refresh token from authorization flow
  code_verifier: 'secret', # Code verifier from authorization flow
)

You can use the Tipalti sandbox by setting client.sanbox = true or as part of the client initialization

client = Tipalti::Client.new(
  ...
  sandbox: true
)

API Endpoints

For use of each endpoint and available attributes or filtering criteria, please consult the Tipalti API reference.

Payees create

API docs

Example: client.payee_create(refCode: '123abc')

Payees get

API docs

Example: client.payee_get('123abc')

Payees list

API docs

Example: client.payee_list(filter: 'status=="ACTIVE"')

Payment batches create

API docs

Example:

client.payment_batch_create({ 
                              paymentInstructions: [
                                { 
                                  payeeId: '123456', 
                                  amountSubmitted: { amount: 5, currency: 'USD' }, 
                                  refCode: '123ref' 
                                }
                              ] 
                            })
Payment batches instructions get

API docs

Example: client.payment_batch_instructions_get('3456789')

Payments get

API docs

Example: client.payment_get('123abc')

Token Management

Refresh

If your OAuth access token has expired, you can use the client to refresh your token.

API docs

client.token_refresh

This will return this response object as well as update the client to use the new access token on successful refresh.

Errors

Any error code returned by the Tipalti API will result in one of the following expections

CodeException
400Tipalti::BadRequest
401Tipalti::Unauthorized
403Tipalti::Forbidden
404Tipalti::NotFound
429Tipalti::TooManyRequests
400Tipalti::ClientError
500Tipalti::InternalServerError
503Tipalti::ServiceUnavailable
500Tipalti::ServerError

IPNs

Tiplati uses an IPN (instance payment notification) messaging service that enables you to receive notifications from Tipalti. Notifications are triggered when defined events occur (e.g., changes in payee details, system events and payment statuses).

To manage IPNs you will need to instantiate a IPN instance like so.

ipn = Tipalti::Ipn.new(
  payload: '...', # The raw payload received to your server from the Tipalti IPN
)

You can use the Tipalti sandbox by setting ipn.sanbox = true or as part of the initialization

ipn = Tipalti::Ipn.new(
  ...
  sandbox: true
)
Verify

API docs

Example: ipn.verify

License

Copyright (C) 2023 Jordan Ell. See LICENSE for details.

FAQs

Package last updated on 14 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc