Get Sandbox Access

Paybase Developer Centre

OverviewAPI GuidesGetting StartedRecipesGig Economy PlatformsSharing Economy PlatformsMarketplacesBlockchain BusinessesEscrowRolesRulesDue DiligenceCustomersAccountsBank AccountsCardsTransactionsIntroductionInboundGetting money into the systemTransaction ReferenceAccount ReferenceInternalOutboundEscrowSplit PaymentsRefundsStrong Customer Authentication3D Secure AuthenticationIntroductionCreate a cardCreate a transactionDocument UploadStatementsWebhooksErrorsPQLAPI ReferenceAccountCreate an accountRetrieve an accountTransition account statusList all accountsAnnotate an accountDelete annotation from an accountTag an accountDelete tag from an accountBank AccountCreate a bank accountRetrieve a bank accountUpdate a bank accountTransition bank account statusList all bank accountsAnnotate a bank accountDelete annotation from a bank accountTag a bank accountDelete tag from a bank accountCardCreate a cardRetrieve a cardUpdate a cardTransition card statusList all cardsAnnotate a cardDelete annotation from a cardTag a cardDelete tag from a cardCardholderCreate a cardholderRetrieve a cardholderUpdate a cardholderTransition cardholder statusList all cardholdersAnnotate a cardholderDelete annotation from a cardholderTag a cardholderDelete tag from a cardholderCreate an authentication tokenCheckCreate a checkCustomerIndividual CustomerCreate a customerRetrieve a customerUpdate a customerSole TraderCreate a customerRetrieve a customerUpdate a customerOrganisationCreate a CustomerRetrieve a CustomerUpdate a CustomerIncorporated BusinessCreate a customerRetrieve a customerUpdate a customerBusiness PersonAdd a business personRetrieve a business personUpdate a business personDelete a business personRetrieve a customerTransition state of a customerList all customersAnnotate a customerDelete annotation from a customerTag a customerRemove tag from a customerCreate an authentication tokenTouch a customerDocumentCreate a documentRetrieve a documentList Document TypesReferenceRetrieve a referenceStatementRetrieve a statementStatusRetrieve API statusTransactionCreate inbound transactionCreate internal transactionCreate outbound transactionRetrieve a transactionTransition transaction statusList all transactionsAnnotate a transactionDelete annotation from a transactionTag a transactionDelete tag from a transaction
API version: 04b55bd

Create a cardholderPOST/v1/cardholders

1
2
3
4
5
6
7
8
9
10
11
12
13
import { v1 } from '@paybase/client';

const client = v1('<- API Key ->', { sandbox: true });

const result = await client.createCardholder({
  fullName: "John Doe",
  email: "john.doe@mail.com",
  roleSlug: "acme-cardholder-role",
  terms: {
    acceptedAt: "2019-03-07T15:24:27.697Z",
    revision: "1.0.0"
  }
});

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import json
import requests

requests.post(
  "https://api-json.sandbox.paybase.io/v1/cardholders",
  data = json.dumps({
    "fullName": "John Doe",
    "email": "john.doe@mail.com",
    "roleSlug": "acme-cardholder-role",
    "terms": {
      "acceptedAt": "2019-03-07T15:24:27.697Z",
      "revision": "1.0.0"
    }
  }),
  headers = {
    "Content-Type": "application/json",
    "X-Token": "<X-Token goes here>"
  }
).json()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$client = new \GuzzleHttp\Client();
$client->request(
  "post",
  "https://api-json.sandbox.paybase.io/v1/cardholders",
  [
    "body" => "{
      \"fullName\": \"John Doe\",
      \"email\": \"john.doe@mail.com\",
      \"roleSlug\": \"acme-cardholder-role\",
      \"terms\": {
        \"acceptedAt\": \"2019-03-07T15:24:27.697Z\",
        \"revision\": \"1.0.0\"
      }
    }",
    "headers" => [
      "Content-Type" => "application/json",
      "X-Token" => "<X-Token goes here>",
    ]
  ]
);

1
2
3
4
5
6
7
8
9
10
11
12
13
curl -X POST \
"https://api-json.sandbox.paybase.io/v1/cardholders"  -H "Content-Type: application/json" \
  -H "X-Token: <X-Token goes here>" \
  -d '{
    "fullName": "John Doe",
    "email": "john.doe@mail.com",
    "roleSlug": "acme-cardholder-role",
    "terms": {
      "acceptedAt": "2019-03-07T15:24:27.697Z",
      "revision": "1.0.0"
    }
  }'

Request

FieldDescription
fullNamerequired
string

The full name of the cardholder.

emailrequired
string

The email address of the cardholder.

Email address is one of the parameters we use to determine if a cardholder is unique.

typeoptional
enum

Whether the card is held by an individual or a company.

enum

INDIVIDUAL, COMPANY

If left empty, the value will default to UNKNOWN

terms.acceptedAtrequired
date

The timestamp in UTC at which the Terms were accepted.

terms.revisionrequired
string

Version name or number of the Terms that were accepted.

roleIdrequired
string

The unique identifier of the role. Can be found on your Console.

Format

role/_uuid_

e.g. role/62dc1d23-d473-46a6-b4b3-e63c3f6d4658

roleSlugrequired
string

The unique slug for the role. Can be found on your Console.

Format

The default is the lower kebab-case of the role's name.

e.g. if the role name is Platform Seller, the slug will platform-seller.

tagsoptional
array<string>

An array of string values. Tags can be attached to objects in order to drive rules based logic either on Paybase or on your own system.

annotationsoptional
object<string, string>

A hash map of key value pairs. Annotations allow you to supply information which is pertinent to your own system (e.g. Providing the ID of a customer on your system to link to their Paybase account). Annotations can also drive various Paybase rules.

Response

FieldDescription
id
string

The unique identifier of the cardholder.

Format

cardholder/_uuid_

e.g. cardholder/62dc1d23-d473-46a6-b4b3-e63c3f6d4658

fullName
string

The full name of the cardholder.

email
string

The email address of the cardholder.

Email address is one of the parameters we use to determine if a cardholder is unique.

terms.acceptedAt
date

The timestamp in UTC at which the Terms were accepted.

terms.revision
string

Version name or number of the Terms that were accepted.

type
enum

Whether the card is held by an individual or a company.

enum

INDIVIDUAL, COMPANY,

If left empty, the value will default to UNKNOWN

roleId
string

The unique identifier of the role.

Format

role/_uuid_

e.g. role/62dc1d23-d473-46a6-b4b3-e63c3f6d4658

stateId
enum

The current state of the cardholder.

enum

PENDING, ENABLED, DISABLED, CLOSED

tags
array<string>

An array of string values. Tags can be attached to objects in order to drive rules based logic either on Paybase or on your own system.

annotations
object<string, string>

A hash map of key value pairs. Annotations allow you to supply information which is pertinent to your own system (e.g. Providing the ID of a customer on your system to link to their Paybase account). Annotations can also drive various Paybase rules.