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

Bank accounts

A Bank Account is an external account linked to a Customer primarily to make withdrawals from the Paybase platform. Withdrawals can be made via UK Faster Payments.

Bank Accounts can also be used for inbound payments. Paybase currently supports inbound payments via UK Faster Payments only. Creating a bankAccount is not required prior to sending a bank transfer to a Paybase account. If a correctly referenced payment is received into a Paybase Account, a Bank Account with the sender’s bank details will automatically be created and linked to the Customer to whose Account funds are sent.

Creating a Bank Account

Use the bank-accounts endpoint to create a bankAccount on the system. You will need the id of the customer to who the bankAccount will need to be linked. Note that the currencyISO of the bankAccount is the currency that will be PAID by Paybase into the bank account, and NOT the currency in which the account is held.

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

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

const { accessToken } = await client.createCustomerAuthenticationToken({
  id: "customer/0315c31b-b316-486f-bce1-90325f49286a"
});

const result = await client.createBankAccount({
  ownerId: "customer/0315c31b-b316-486f-bce1-90325f49286a",
  accountNumber: "41406760",
  sortCode: "309457",
  countryISO: "GB",
  currencyISO: "GBP",
  billingAddress: {
    postalCode: "SE6 9YU",
    countryISO: "GB",
    houseNameNumber: "7",
    street: "Brick Lane",
    townCity: "London"
  }
}, { apiKey: accessToken });

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

requests.post(
  "https://api-json.sandbox.paybase.io/v1/bank-accounts",
  data = json.dumps({
    ownerId: "customer/0315c31b-b316-486f-bce1-90325f49286a",
    accountNumber: "41406760",
    sortCode: "309457",
    countryISO: "GB",
    currencyISO: "GBP",
    billingAddress: {
      postalCode: "SE6 9YU",
      countryISO: "GB",
      houseNameNumber: "7",
      street: "Brick Lane",
      townCity: "London"
    }
  }),
  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
25
$client = new \GuzzleHttp\Client();
$client->request(
  "post",
  "https://api-json.sandbox.paybase.io/v1/bank-accounts",
  [
    "body" => "{
      ownerId: \"customer/0315c31b-b316-486f-bce1-90325f49286a\",
      accountNumber: \"41406760\",
      sortCode: \"309457\",
      countryISO: \"GB\",
      currencyISO: \"GBP\",
      billingAddress: {
        postalCode: \"SE6 9YU\",
        countryISO: \"GB\",
        houseNameNumber: \"7\",
        street: \"Brick Lane\",
        townCity: \"London\"
      }
    }",
    "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
18
curl -X POST \
"https://api-json.sandbox.paybase.io/v1/bank-accounts"  -H "Content-Type: application/json" \
  -H "X-Token: <X-Token goes here>" \
  -d '{
    ownerId: "customer/0315c31b-b316-486f-bce1-90325f49286a",
    accountNumber: "41406760",
    sortCode: "309457",
    countryISO: "GB",
    currencyISO: "GBP",
    billingAddress: {
      postalCode: "SE6 9YU",
      countryISO: "GB",
      houseNameNumber: "7",
      street: "Brick Lane",
      townCity: "London"
    }
  }'

The response to the API call is the full bankAccount object.

Next up...