Reference
Official SDKs
Six first-party clients, generated from the same specification and released on the same day. Method names, argument names and object shapes match the API, so a snippet from the reference translates without thinking about it.
What you get
Every client handles the parts you would otherwise write twice: authentication headers, retries with backoff on transient failures, cursor pagination, and typed errors that carry the request id you will need if you ever open a ticket.
- Typed request and response objects, including custom directory attributes
- Automatic retry on 429 and 5xx, honouring the Retry-After header
- Webhook signature verification built in, with a constant-time comparison
- Session helpers for sealing, unsealing and refreshing access tokens
Node.js
@paycux/node
Node 20 and newer · TypeScript types included
Install
1npm install @paycux/node
First call
1import Paycux from '@paycux/node';23const paycux = new Paycux(process.env.PAYCUX_API_KEY);45// List the organizations in this environment6const { data } = await paycux.organizations.listOrganizations({ limit: 10 });78for (const organization of data) {9 console.log(organization.id, organization.name);10}
Python
paycux
Python 3.9 and newer · type hints included
Install
1pip install paycux
First call
1import os2import paycux3from paycux import client45paycux.api_key = os.environ["PAYCUX_API_KEY"]67# List the organizations in this environment8result = client.organizations.list_organizations(limit=10)910for organization in result.data:11 print(organization.id, organization.name)
Go
github.com/paycux/paycux-go
Go 1.22 and newer · context aware
Install
1go get github.com/paycux/paycux-go
First call
1package main23import (4 "context"5 "fmt"6 "os"78 "github.com/paycux/paycux-go/pkg/organizations"9)1011func main() {12 organizations.SetAPIKey(os.Getenv("PAYCUX_API_KEY"))1314 list, err := organizations.ListOrganizations(15 context.Background(),16 organizations.ListOrganizationsOpts{Limit: 10},17 )18 if err != nil {19 panic(err)20 }2122 for _, organization := range list.Data {23 fmt.Println(organization.ID, organization.Name)24 }25}
Ruby
paycux
Ruby 3.1 and newer · Rails friendly
Install
1gem install paycux
First call
1require 'paycux'23Paycux.key = ENV['PAYCUX_API_KEY']45# List the organizations in this environment6result = Paycux::Organizations.list_organizations(limit: 10)78result.data.each do |organization|9 puts "#{organization.id} #{organization.name}"10end
PHP
paycux/paycux-php
PHP 8.1 and newer · PSR-4 autoloading
Install
1composer require paycux/paycux-php
First call
1<?php23require 'vendor/autoload.php';45Paycux\Paycux::setApiKey(getenv('PAYCUX_API_KEY'));67$organizations = new Paycux\Organizations();8$result = $organizations->listOrganizations(['limit' => 10]);910foreach ($result->data as $organization) {11 echo $organization->id . ' ' . $organization->name . PHP_EOL;12}
Java
com.paycux:paycux-java
Java 17 and newer · Gradle and Maven
Install
1// build.gradle2dependencies {3 implementation 'com.paycux:paycux-java:3.4.0'4}
First call
1import com.paycux.Paycux;2import com.paycux.organizations.ListOrganizationsOptions;3import com.paycux.organizations.OrganizationList;45public class FirstCall {6 public static void main(String[] args) {7 Paycux paycux = new Paycux(System.getenv("PAYCUX_API_KEY"));89 OrganizationList list = paycux.organizations.listOrganizations(10 ListOrganizationsOptions.builder().limit(10).build()11 );1213 list.getData().forEach(organization ->14 System.out.println(organization.getId() + " " + organization.getName())15 );16 }17}
Shared conventions
Four rules hold in every client, which is what makes the examples portable.
Naming follows the language
The API field is snake_case; the SDK exposes whatever your language expects — camelCase in Node, snake_case in Python and Ruby, exported names in Go.
Lists return a cursor
Every list method returns data plus list metadata. Iterate with the cursor rather than an offset — the underlying set moves while you read it.
Errors are typed
A failed call raises a class you can catch by category, carrying the status, the machine-readable code and the request id.
The client is stateless
Construct it once at boot and share it. There is no connection to keep warm and no per-request state to reset.