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: 7c99a7a

Create a authentication tokenPOST/v1/cardholder/{id}/tokens

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

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

const result = await client.createCardholderAuthenticationToken({
  id: "cardholder/28958679-e8a8-47a8-967c-f979ae8509a2",
  attestations: [
    {
      has: "DEVICE",
      capturedAt: "2019-03-07T15:24:27.697Z"
    },
    {
      knows: "PIN",
      capturedAt: "2019-03-07T15:24:27.697Z"
    }
  ]
});

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

requests.post(
  "https://api-json.sandbox.paybase.io/v1/cardholder/cardholder/28958679-e8a8-47a8-967c-f979ae8509a2Params: id/tokens",
  data = json.dumps({
    id: "cardholder/28958679-e8a8-47a8-967c-f979ae8509a2",
    attestations: [
      {
        has: "DEVICE",
        capturedAt: "2019-03-07T15:24:27.697Z"
      },
      {
        knows: "PIN",
        capturedAt: "2019-03-07T15:24:27.697Z"
      }
    ]
  }),
  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
21
22
23
24
$client = new \GuzzleHttp\Client();
$client->request(
  "post",
  "https://api-json.sandbox.paybase.io/v1/cardholder/cardholder/28958679-e8a8-47a8-967c-f979ae8509a2Params: id/tokens",
  [
    "body" => "{
      id: \"cardholder/28958679-e8a8-47a8-967c-f979ae8509a2\",
      attestations: [
        {
          has: \"DEVICE\",
          capturedAt: \"2019-03-07T15:24:27.697Z\"
        },
        {
          knows: \"PIN\",
          capturedAt: \"2019-03-07T15:24:27.697Z\"
        }
      ]
    }",
    "headers" => [
      "Content-Type" => "application/json",
      "X-Token" => "<X-Token goes here>",
    ]
  ]
);

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
curl -X POST \
"https://api-json.sandbox.paybase.io/v1/cardholder/cardholder/28958679-e8a8-47a8-967c-f979ae8509a2Params: id/tokens"  -H "Content-Type: application/json" \
  -H "X-Token: <X-Token goes here>" \
  -d '{
    id: "cardholder/28958679-e8a8-47a8-967c-f979ae8509a2",
    attestations: [
      {
        has: "DEVICE",
        capturedAt: "2019-03-07T15:24:27.697Z"
      },
      {
        knows: "PIN",
        capturedAt: "2019-03-07T15:24:27.697Z"
      }
    ]
  }'

Request

FieldDescription
idURI Param
string

The unique identifier of the entity. Entity can be either customer or cardholder

Format

entity/_uuid_

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

attestationsoptional
array<Attestation>

An array of Attestation objects.

You must ensure that a minimum of two unique attestations are added to the customer or cardholder as this will determing the functionality that they can access.

An example of an attestation object can be found here

Response

FieldDescription
accessToken
string

The access token to be used for entity requests such as creating a card.

shortId
string

A short, url friendly, id for retrieving a token. This should be used as the token identifier when usin our hosted card solution

requirements.missing
int32

Total number of missing requirements

requirements.possibleFactors
array<string>

No description

requirements.providedFactors
array<string>

No description

requirements.message
string

No description

success
bool

No description

expiresAt
date

No description