Overview

Payrix supplies multiple SDK packages for various programming languages and environments. The mobile/device SDKs (iOS/Android) are maintained by the mobile team and the documentation is available in Payrix Mobile App & Mobile SDKs. Additionally, Payrix supplies plugins for popular eCommerce platforms like WooCommerce.

This page will document the SDKs provided for integration with the Payrix API as well as any plugins for use in eCommerce platforms.

Implementation

SDKs

The SDK design is universal across the various languages. Each API resource made available in the SDK should allow for CRUD (Create, Read, Update, Delete) actions via centralized methods and includes all available fields for that API resource.

Your SDK wireframe should be designed by a language expert and then uploaded to the portal for integration. The portal integration will auto-generate all resources based on the wireframe using the swagger definition. Any utility/helper files and classes will be integrated into the portal as well for this specific SDK.

Plugins

The plugins are very platform-specific and must be designed and implemented by a domain expert for that platform. The code will almost entirely be integrated into the portal as-is, except for any white-label needs.

The plugins should use SDK packages where possible and must use PayFields or (if not possible) PayFrame so that the merchant is kept in reduced PCI scope.

SDK Package Installation

1. From the Portal Dashboard, click Settings (under the Admin tab).

2. Under Business Settings, click Packages.

3. Click the Edit Icon. (Located in the upper right-hand corner of the Packages menu.)

4. Click the SDKs dropdown (under Stage).

a. Download the specific SDK you’d like to work with.

b. Make your desired changes and upload the new SDK into the portal.

5. Once you’ve uploaded all desired customized SDKs, chose a Stage:

a. Development - notes that your SDKs are still in development and are not completed.

b. Beta - notes that your SDKs have been uploaded and are in testing.

c. Live - notes that your SDKs are active in the production environment.

SDKs

Most development languages have a package manager that allows for easy inclusion and usage of 3rd party libraries, including SDKs. The portal will include instructions and information about the package installation for each SDK, provided that a package manager name is set for that SDK. In order for the package manager to know about the SDK, some manual steps are required:

  1. For all SDKs (except for .NET)

    1. A repository should be created (usually in GitHub) that will host the package

    2. The SDK code should be pushed to this repository including the package details in the format needed for the package manager

    3. An initial version of the package should be tagged and released

    4. A package manager account should be created and linked to this repository

    5. Update the package manager name in the portal to reflect this new package

  2. For .NET

    1. The source code for .NET should be downloaded from the portal

    2. Update the source to include package details in the format needed for Nuget

    3. Compile the package

    4. Create an account on NuGet and upload the NuGet package there or publish it from the compiler

    5. Update the package manager name in the portal to reflect this new package

These steps should be performed anytime there’s a schema change on the API for each white-label need or it can be done after significant changes.

Available SDKs

Current Packages

The packages currently fully integrated in the portal are:

  • PHP

  • Ruby

  • .NET (C#)

  • WooCommerce

Additional SDKs

For manual NodeJS SDK package installation, download the original source/wireframe here:

Additionally, other SDKs are available for Mobile platforms (iOS and Android) as indicated above.

splash_payments(node).zip

Package Managers

Package managers enhance the library user experience and allow for quick inclusion in any project.

Documented below is the current status for each package registered at a package manager for Payrix:

PHP

The PHP package for Payrix is maintained in a public GitLab repository and linked to the Packagist package manager, which is the default for PHP packages.

Package Name

payrix/payrix-php

Package Link

https://packagist.org/packages/payrix/payrix-php

Repository

https://gitlab.com/payrix/public/payrix-php

Latest Version

2.0.2

Last Modified

Namespace

PayrixPHP

License

Apache-2.0

Ruby

The Ruby package for Payrix is maintained in a public GitLab repository and uploaded to the RubyGems package manager, which is the default for Ruby packages.

Package Name

payrix

Package Link

https://rubygems.org/gems/payrix

Repository

https://gitlab.com/payrix/public/payrix-ruby

Latest Version

0.1.2

Last Modified

Module

Payrix

License

Apache-2.0

.NET

The .NET package for Payrix is maintained in a private GitLab repository and uploaded to the Nuget package manager, which is the default for .NET packages.

Package Name

PayrixNET

Package Link

https://www.nuget.org/packages/PayrixNET/

Repository

https://gitlab.com/payrix/public/payrix-net

Latest Version

2.0.3

Last Modified

Namespace

PayrixNET

License

Apache-2.0

Additional Information:

SDK White-labeling

As part of our white-label offering, the portal will automatically offer these packages white-labeled for each configuration.

This includes file names, URLs, and class names based on the white-label's partition name or package name if provided. This allows each white label partner to provide this added value tool to its clients with its branding.

Portal SDK Settings

SDKs

Since the SDK is generated using the swagger definition file, the available resources and actions will be based on that definition. By default (with no logged-in user) the swagger will return all resources and actions available to a Referrer-level user. This is the default SDK delivered to guests and should be the SDK submitted to package managers.

Plugins

Plugin packages are generally just delivered for integration to the platform with no swagger automation required.

All Packages

The settings currently supported in the portal are: 

Setting

Description

Name

this will set the downloaded file name as well as package name in the package itself, if applicable.

Package Manager Name

For SDKs only, the name used to reference this package when using the package manager can be set here.

Stage

This will set the package to a specific stage of “readiness”. Available Stage options are:

  • Live - set by default

  • Beta

  • Development

Upload File

A packaged file (possibly with some edits or some other package entirely) can be uploaded to be used for that package (it will override the default generated by the portal directly).

Note: This is required for the .NET SDK as it is a compiled language and the SDK is delivered as a DLL. There won’t be a download option for the customer without first uploading the package here.