Skip to content

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.

MIT licensedSemantic versioningReleased together

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

terminal
1npm install @paycux/node

First call

first-call.ts
1import Paycux from '@paycux/node';
2
3const paycux = new Paycux(process.env.PAYCUX_API_KEY);
4
5// List the organizations in this environment
6const { data } = await paycux.organizations.listOrganizations({ limit: 10 });
7
8for (const organization of data) {
9 console.log(organization.id, organization.name);
10}

Python

paycux

Python 3.9 and newer · type hints included

Install

terminal
1pip install paycux

First call

first_call.py
1import os
2import paycux
3from paycux import client
4
5paycux.api_key = os.environ["PAYCUX_API_KEY"]
6
7# List the organizations in this environment
8result = client.organizations.list_organizations(limit=10)
9
10for organization in result.data:
11 print(organization.id, organization.name)

Go

github.com/paycux/paycux-go

Go 1.22 and newer · context aware

Install

terminal
1go get github.com/paycux/paycux-go

First call

main.go
1package main
2
3import (
4 "context"
5 "fmt"
6 "os"
7
8 "github.com/paycux/paycux-go/pkg/organizations"
9)
10
11func main() {
12 organizations.SetAPIKey(os.Getenv("PAYCUX_API_KEY"))
13
14 list, err := organizations.ListOrganizations(
15 context.Background(),
16 organizations.ListOrganizationsOpts{Limit: 10},
17 )
18 if err != nil {
19 panic(err)
20 }
21
22 for _, organization := range list.Data {
23 fmt.Println(organization.ID, organization.Name)
24 }
25}

Ruby

paycux

Ruby 3.1 and newer · Rails friendly

Install

terminal
1gem install paycux

First call

first_call.rb
1require 'paycux'
2
3Paycux.key = ENV['PAYCUX_API_KEY']
4
5# List the organizations in this environment
6result = Paycux::Organizations.list_organizations(limit: 10)
7
8result.data.each do |organization|
9 puts "#{organization.id} #{organization.name}"
10end

PHP

paycux/paycux-php

PHP 8.1 and newer · PSR-4 autoloading

Install

terminal
1composer require paycux/paycux-php

First call

first-call.php
1<?php
2
3require 'vendor/autoload.php';
4
5Paycux\Paycux::setApiKey(getenv('PAYCUX_API_KEY'));
6
7$organizations = new Paycux\Organizations();
8$result = $organizations->listOrganizations(['limit' => 10]);
9
10foreach ($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

build.gradle
1// build.gradle
2dependencies {
3 implementation 'com.paycux:paycux-java:3.4.0'
4}

First call

FirstCall.java
1import com.paycux.Paycux;
2import com.paycux.organizations.ListOrganizationsOptions;
3import com.paycux.organizations.OrganizationList;
4
5public class FirstCall {
6 public static void main(String[] args) {
7 Paycux paycux = new Paycux(System.getenv("PAYCUX_API_KEY"));
8
9 OrganizationList list = paycux.organizations.listOrganizations(
10 ListOrganizationsOptions.builder().limit(10).build()
11 );
12
13 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.