Get Sandbox Access

Paybase Developer Centre

OverviewAPI GuidesGetting StartedRecipesGig Economy PlatformsSharing Economy PlatformsMarketplacesBlockchain BusinessesEscrowSandboxRolesRulesDue 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: ba085a6

Creating a document

When uploading a document, a multipart/form request should be made to the endpoint with the following fields.

field namedescriptiontyperequiredformat
customerIdEntity Identifier for Customerstringtruecustomer/<uuid>
typeA stringified JSON object containing both a type identifier and a subtype (please see below in the document.Create message definition for more information)stringtrue{"type": "...", "subtype": "..." }
tagsA stringified JSON array of attached tagsstringfalse
annotationsA stringified JSON object of attached annotationsstringfalse
documentA file object containing the file to be uploaded (this must come last in the multipart form)filetrue

As you can see, in this endpoint any value that is of a complex type such as an object or array should be stringified. The following is example in JavaScript using the native FormData object and fetch. The document should always be the last item of the data.

 * Given a form input of the following structure:
 * <input id="doc" type="file">
const fd = new FormData();
const file = document.getElementById('doc').files[0];

fd.append('customerId', 'customer/...');
fd.append('type', JSON.stringify({ type: 1, subtype: '...' }));
fd.append('tags', JSON.stringify(['foo', 'bar']));
fd.append('annotations', JSON.stringify({ foo: 'bar' }));
fd.append('document', file,;

fetch('/v1/documents/upload', {
  method: 'post',
  headers: Object.assign({ 'X-Token': '<Token>' }, fd.getHeaders()),
  body: fd,

The following table defines the internal structure of an upload request, it can be ignored.