Bermuda Commercial Bank RESTful Open Banking API Implementation (v1)

The Bermuda Commercial Bank (BCB) RESTful Open Banking API provides secure, programmatic access to BCB's banking services, enabling developers to integrate financial services into their applications.

Key Features

  • Account details retrieval
  • Internal transfers
  • Payments (Swift)
  • Transaction information access
  • Robust security and compliance
  • Comprehensive documentation

Available Environments

UAT Environment

URL: https://api-uat.bcb.bm

Purpose: Testing and integration

Production Environment

URL: https://api.bcb.bm

Purpose: Live production use

Download OpenAPI description
Overview
URL

https://www.bcb.bm

Bermuda Commercial Bank Limited, 34 Bermudiana Road, Hamilton HM 11, Bermuda

enquiries@bcb.bm

Languages
Servers
Mock server

https://developers.bcb.bm/_mock/apis/open-banking-api/open-banking-api/

UAT Environment - Used for testing and integration purposes

https://api-uat.bcb.bm/

Production Environment - Live environment for production use

https://api.bcb.bm/

Accounts

Operations

Credentials

Operations

FxQuotes

Operations

InternalTransfers

Operations

Payments

Operations

SWIFT Payment

Request

Initiates a SWIFT payment transfer. The request must include all required payment details including:

  • Source and destination account information
  • Payment amount and currency
  • Beneficiary details
  • Payment purpose and reference information

Key Features:

  • Supports international wire transfers via SWIFT network
  • Implements idempotency to prevent duplicate transactions
  • Validates payment requests before processing
  • Supports both JSON and CSV response formats

Content Negotiation

Clients must use the HTTP Accept header to indicate the desired response format:

  • Set Accept: application/json for JSON responses (default)
  • Set Accept: text/csv for CSV responses If the Accept header is omitted, application/json is assumed.

Base URL:

All API requests use the versioned base URL:

https://api.bcb.bm/v1/payments/swift

Idempotency

The API supports idempotency through the optional Idempotency-Key header:

  • If no idempotency key is provided, the request is processed normally (duplicates are possible)
  • If a valid UUID idempotency key is provided for a new transaction, the system stores the key and associates it with the transaction results
  • If the same idempotency key is received again for the same endpoint/action, the system returns the previously stored response
  • Idempotency keys are user-specific - different users don't share cached responses
  • The idempotency key must be a valid UUID format (e.g., "123e4567-e89b-12d3-a456-426614174000")

Sample Request in JavaScript:

async function processSwiftPayment() {
  try {
    const response = await fetch('https://api.bcb.bm/v1/payments/swift', {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'Content-Type': 'application/json',
        'Accept': 'application/json',
        'Idempotency-Key': '123e4567-e89b-12d3-a456-426614174000' // Optional: UUID format required if provided
      },
      body: JSON.stringify({
        instructionIdentification: "PAYMENT-123456",
        debtorAccount: {
          identification: "DEBTOR-ACC-123"
        },
        instructedAmount: {
          currency: "USD",
          amount: "1000.00"
        },
        creditorAccount: {
          identification: "CREDITOR-ACC-456",
          name: "John Doe",
          additionalInformation: ["Additional details"]
        },
        creditorAgent: {
          identification: "BANKBIC123",
          name: "Beneficiary Bank",
          additionalInformation: ["SWIFT/BIC code"]
        },
        chargesType: "OUR",
        remittanceInformation: ["Payment for services"]
      })
    });

    if (!response.ok) {
      const errorData = await response.json();
      throw new Error(`Error processing payment: ${errorData.message || 'Unknown error'}`);
    }

    const result = await response.json();
    
    // Check payment status
    if (result.status === 'success') {
      console.log('Payment processed successfully');
      
      // Log payment details
      console.log('Payment ID:', result.id);
      console.log('Transaction Status:', result.transactionStatus);
      console.log('Unique Identifier:', result.uniqueIdentifier);
      
      // Process payment details
      const details = result.details;
      console.log('External Reference:', details.extReference);
      console.log('Instructed Amount:', details.instructedAmount.amount, details.instructedAmount.currency);
      
      // Process account information
      console.log('Debtor Account:', details.debtorAccount.identification);
      console.log('Creditor Account:', details.creditorAccount.identification);
      console.log('Beneficiary Account:', details.beneficiaryAccount.identification);
      
      // Process settlement details
      const settlement = details.settlementDetails;
      console.log('Amount Credited:', settlement.amountCredited.amount, settlement.amountCredited.currency);
      console.log('Amount Debited:', settlement.amountDebited.amount, settlement.amountDebited.currency);
      console.log('Value Date:', settlement.valueDate);
      console.log('Record Status:', settlement.recordStatus);
      
      // Process charge details
      const charges = details.chargeDetails;
      console.log('Charges Type:', charges.chargesType);
      console.log('Total Charges:', charges.chargeAmount.amount, charges.chargeAmount.currency);
      
      // Process charge analysis
      const chargeAnalysis = charges.chargeAnalysis;
      console.log('Sender Charges:', chargeAnalysis.sender.amount, chargeAnalysis.sender.currency);
      console.log('Receiver Charges:', chargeAnalysis.receiver.amount, chargeAnalysis.receiver.currency);
      
      // Process beneficiary information
      console.log('Beneficiary Name:', details.beneficiary.name);
      console.log('Beneficiary Bank:', details.beneficiaryAgent.name);
      
      // Process remittance information
      if (details.remittanceInformation) {
        console.log('Remittance Information:');
        details.remittanceInformation.forEach(info => console.log('-', info));
      }
      
      // Process linked activities
      if (result.linkedActivities && result.linkedActivities.length > 0) {
        console.log('Linked Activities:');
        result.linkedActivities.forEach(activity => {
          console.log('- Activity ID:', activity.id);
          console.log('  Status:', activity.status);
          console.log('  Transaction Status:', activity.transactionStatus);
          console.log('  Unique Identifier:', activity.uniqueIdentifier);
        });
      }
    } else {
      console.error('Payment processing failed:', result.status);
      // Handle failed payment
      if (result.details) {
        console.error('Error details:', result.details);
      }
    }
  } catch (error) {
    console.error('Error:', error);
    // Handle error appropriately
  }
}

// Example usage:
processSwiftPayment();

Response Structure

FieldTypeDescription
idstringUnique identifier for the payment
statusstringPayment status (success or failed)
transactionStatusstringDetailed transaction status
uniqueIdentifierstringUnique identifier for tracking
detailsobjectPayment details object
linkedActivitiesarrayRelated financial activities

Required Permission: payment-swift

This endpoint requires the permission claim payment-swift to be present in the JWT token. These permissions are embedded in the token during the authentication process and cannot be modified afterward. The token must be obtained with the appropriate permissions to access this endpoint.

Security
Authorization or Feature Permissions
Bodyapplication/json

The SWIFT payment request containing all necessary payment details.

instructionIdentificationstringnon-emptyrequired

Unique identification as assigned by an instructing party for an instructed party to unambiguously identify the instruction.

debtorAccountAccountDetails (object)required

Unambiguous identification of the account of the debtor to which a debit entry will be made as a result of the transaction.

One of:

Unambiguous identification of the account of the debtor to which a debit entry will be made as a result of the transaction.

debtorAccount.​identificationstringnon-emptyrequired

Unique identification of the account, such as an IBAN (International Bank Account Number) or a local account number.

instructedAmountCurrencyAmount (object)required

Amount of money to be moved between the debtor and creditor, before deduction of charges, expressed in the currency as ordered by the initiating party.

One of:

Amount of money to be moved between the debtor and creditor, before deduction of charges, expressed in the currency as ordered by the initiating party.

instructedAmount.​currencystring or null

Currency ISO code

instructedAmount.​amountstring or null

Amount

creditorAccountPartyDetails (object)required

Unambiguous identification of the account of the creditor to which a credit entry will be posted as a result of the payment transaction.

One of:

Unambiguous identification of the account of the creditor to which a credit entry will be posted as a result of the payment transaction.

creditorAccount.​identificationstringnon-emptyrequired

Unique identification of the party, such as a BIC (Bank Identifier Code) for financial institutions or an account number for account holders.

creditorAccount.​namestringnon-emptyrequired

Name by which the party is known and which is usually used to identify the party.

creditorAccount.​additionalInformationArray of stringsrequired

Additional information about the party that may be required for processing the payment, such as address details, country codes, or specific payment instructions.

creditorAgentPartyDetails (object)required

Financial institution servicing an account for the creditor.

One of:

Financial institution servicing an account for the creditor.

creditorAgent.​identificationstringnon-emptyrequired

Unique identification of the party, such as a BIC (Bank Identifier Code) for financial institutions or an account number for account holders.

creditorAgent.​namestringnon-emptyrequired

Name by which the party is known and which is usually used to identify the party.

creditorAgent.​additionalInformationArray of stringsrequired

Additional information about the party that may be required for processing the payment, such as address details, country codes, or specific payment instructions.

intermediaryAgent(PartyDetails (object or null))

Agent between the debtor's agent and the creditor's agent.

One of:

Agent between the debtor's agent and the creditor's agent.

chargesTypestringnon-emptyrequired

Specifies which party/parties will bear the charges associated with the processing of the payment transaction.

remittanceInformationArray of stringsrequired

Information supplied to enable the matching/reconciliation of an entry with the items that the payment is intended to settle.

curl -i -X POST \
  https://developers.bcb.bm/_mock/apis/open-banking-api/open-banking-api/v1/payments/swift \
  -H 'Authorization: Bearer <YOUR_jwt_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "instructionIdentification": "PAY-2024-03-21-001",
    "debtorAccount": {
      "identification": "BM12BCBK00001234567890"
    },
    "instructedAmount": {
      "currency": "USD",
      "amount": 50000
    },
    "creditorAccount": {
      "identification": "US12BCBK00001234567890",
      "name": "Global Investment Services Inc",
      "additionalInformation": [
        "350 Fifth Avenue",
        "New York, NY 10118",
        "United States"
      ]
    },
    "creditorAgent": {
      "identification": "CHASUS33",
      "name": "JPMorgan Chase Bank",
      "additionalInformation": [
        "SWIFT/BIC: CHASUS33",
        "383 Madison Avenue",
        "New York, NY 10179",
        "United States"
      ]
    },
    "intermediaryAgent": {
      "identification": "BCBKBMHM",
      "name": "Bermuda Commercial Bank",
      "additionalInformation": [
        "SWIFT/BIC: BCBKBMHM",
        "Victoria Place",
        "31 Victoria Street",
        "Hamilton HM 10, Bermuda"
      ]
    },
    "chargesType": "OUR",
    "remittanceInformation": [
      "Payment for investment management services Q1 2024",
      "Invoice #INV-2024-001",
      "Service Period: Jan-Mar 2024"
    ]
  }'

Responses

Created - The payment was successfully processed.

Bodyapplication/json
idstring

Unique identifier assigned by the bank for the SWIFT transfer. This ID can be used for future reference and tracking of the payment.

statusstring

The current status of the payment processing. Possible values include:

  • success: Payment has been accepted for processing
  • failed: Payment failed
transactionStatusstring

Detailed transaction status indicating the current state of the transfer. This provides more granular status information than the main status field.

uniqueIdentifierstring

A unique identifier specific to this instance of the SWIFT transfer. This identifier remains constant throughout the lifecycle of the payment and can be used for reconciliation purposes.

detailsPaymentResponseDetails (object)

Detailed information about the payment transaction including amounts, accounts, and settlement information.

One of:

Detailed information about the payment transaction including amounts, accounts, and settlement information.

linkedActivitiesArray of objects(Activity)

Collection of related financial activities associated with this payment. This may include charges, forex conversions, or other related transactions.

Response
application/json
{ "id": "PAY987654321", "status": "success", "transactionStatus": "COMPLETED", "uniqueIdentifier": "unique-identifier-987", "details": { "extReference": "EXT98765", "instructedAmount": {}, "debtorAccount": {}, "beneficiaryAccount": {}, "creditorAccount": {}, "settlementDetails": {}, "chargeDetails": {}, "remittanceInformation": [], "beneficiary": {}, "beneficiaryAgent": {}, "intermediaryAgent": {} }, "linkedActivities": [ {} ] }

List payment statuses for an account

Request

Retrieves status information for all payments associated with a specific account. This endpoint provides a comprehensive view of payment status details including:

  • Type: The type of payment (e.g., "Outward Swift Payment MT103 API")
  • Status: Current status of the payment (e.g., "Pending", "Completed", "Failed")
  • TransactionId: Unique payment identifier (or Transaction Id)
  • ExternalReference: External reference number for the payment
  • RemittanceInformation: Free-text information about the purpose of the payment
  • DebitAmount: The amount debited from the account, including currency code
  • CreditAmount: The amount credited to the account, including currency code
  • ValueDate: The date when the payment was/will be processed
  • ExchangeRate: The exchange rate applied to the payment

Content Negotiation

Clients must use the HTTP Accept header to indicate the desired response format:

  • Set Accept: application/json for JSON responses (default)
  • Set Accept: text/csv for CSV responses If the Accept header is omitted, application/json is assumed.

Base URL:

All API requests use the versioned base URL:

https://api.bcb.bm/v1/accounts/{accountNumber}/payments

Sample Request in JavaScript:

async function getAccountPaymentStatuses(accountNumber) {
  try {
    const response = await fetch(`https://api.bcb.bm/v1/accounts/${accountNumber}/payments`, {
      method: 'GET',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
      }
    });

    if (!response.ok) {
      const errorData = await response.json();
      throw new Error(`Error: ${errorData.message || 'Unknown error'}`);
    }

    const { meta, data } = await response.json();
    console.log('Payment statuses:', data);

    // Process pagination metadata if available
    if (meta && meta.pagination) {
      console.log('Page Start:', meta.pagination.page_start);
      console.log('Total Size:', meta.pagination.total_size);
      console.log('Page Size:', meta.pagination.page_size);
      console.log('Page Token:', meta.pagination.page_token);
      
      // Optionally, store the page token for fetching subsequent pages
      localStorage.setItem('paginationToken', meta.pagination.page_token);
    }
    
    // Process each payment status
    data.forEach(payment => {
      console.log('Payment ID:', payment.transactionId);
      console.log('Type:', payment.type);
      console.log('Status:', payment.status);
      console.log('External Reference:', payment.externalReference);
      console.log('Remittance Information:', payment.remittanceInformation);
      console.log('Value Date:', payment.valueDate);
      console.log('Debit Amount:', `${payment.debitAmount.amount} ${payment.debitAmount.currency}`);
      if (payment.creditAmount && payment.creditAmount.amount) {
        console.log('Credit Amount:', `${payment.creditAmount.amount} ${payment.creditAmount.currency}`);
      }
      console.log('-------------------');
    });
  } catch (error) {
    console.error('There was a problem retrieving payment statuses:', error.message);
  }
}

// Example usage:
getAccountPaymentStatuses('123456789');

Pagination Example:

After obtaining the page token from the initial request and storing it (e.g., in localStorage), you can retrieve subsequent pages. For example, to fetch results starting from page 2 using the stored token:

async function getAccountPaymentStatusesPage() {
  try {
    // Retrieve the stored page token from localStorage
    const storedPageToken = localStorage.getItem('paginationToken');
    
    // Make the API call with the stored page token and pagination parameters
    const response = await fetch(`https://api.bcb.bm/v1/accounts/123456789/payments?pageToken=${storedPageToken}&pageStart=2`, {
      method: 'GET',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
      }
    });
    
    // Check if the response is OK; if not, throw an error with details
    if (!response.ok) {
      const errorData = await response.json();
      throw new Error(`Error fetching payment statuses: ${JSON.stringify(errorData)}`);
    }
    
    // Parse the JSON response
    const { meta, data } = await response.json();
    
    // Log pagination metadata and store the new page token
    console.log('Pagination Meta:', meta.pagination);
    localStorage.setItem('paginationToken', meta.pagination.page_token);
    
    // Process each payment status record
    data.forEach(payment => console.log('Payment ID:', payment.paymentId));
    
  } catch (error) {
    // Log any errors that occur during the fetch operation
    console.error('Error:', error);
  }
}

// Execute the function to fetch payment statuses with pagination
getAccountPaymentStatusesPage();

Required Permission: get-payment-status

This endpoint requires the permission claim get-payment-status to be present in the JWT token. These permissions are embedded in the token during the authentication process and cannot be modified afterward. The token must be obtained with the appropriate permissions to access this endpoint.

Security
Authorization or Feature Permissions
Path
accountNumberstringrequired

The account number to retrieve payment statuses for.

Query
pageStartinteger or null(int32)

Optional. The starting index for pagination (default: 1).

pageSizeinteger or null(int32)

Optional. The number of records per page. Maximum allowed is 1,000.

pageTokenstring or null

Optional. A token for retrieving the next page of results.

curl -i -X GET \
  'https://developers.bcb.bm/_mock/apis/open-banking-api/open-banking-api/v1/accounts/{accountNumber}/payments?pageSize=0&pageStart=0&pageToken=string' \
  -H 'Authorization: Bearer <YOUR_jwt_HERE>'

Responses

OK - The request was successful.

Bodyapplication/json
meta(Meta (object or null))

Response metadata

One of:

Response metadata

dataArray of objects or null(TransactionStatus)

Response data

Response
application/json
{ "meta": { "pagination": {} }, "data": [ {}, {}, {} ] }

Get payment status

Request

Retrieves detailed status information for a specific payment identified by its payment ID (also known as transaction ID). This endpoint provides comprehensive status details including:

  • Type: The type of payment (e.g., "Outward Swift Payment MT103 API")
  • Status: Current status of the payment (e.g., "Pending", "Completed", "Failed")
  • TransactionId: Unique payment identifier (or Transaction Id)
  • ExternalReference: External reference number for the payment
  • RemittanceInformation: Free-text information about the purpose of the payment
  • DebitAmount: The amount debited from the account, including currency code
  • CreditAmount: The amount credited to the account, including currency code
  • ValueDate: The date when the payment was/will be processed
  • ExchangeRate: The exchange rate applied to the payment

Content Negotiation

Clients must use the HTTP Accept header to indicate the desired response format:

  • Set Accept: application/json for JSON responses (default)
  • Set Accept: text/csv for CSV responses If the Accept header is omitted, application/json is assumed.

Base URL:

All API requests use the versioned base URL:

https://api.bcb.bm/v1/payments/{paymentId}/status

Sample Request in JavaScript:

async function getPaymentStatus(paymentId) {
  try {
    const response = await fetch(`https://api.bcb.bm/v1/payments/${paymentId}/status`, {
      method: 'GET',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
      }
    });

    if (!response.ok) {
      const errorData = await response.json();
      throw new Error(`Error: ${errorData.message || 'Unknown error'}`);
    }

    const paymentStatus = await response.json();
    console.log('Payment Status Details:');
    console.log('Payment ID:', paymentStatus.transactionId);
    console.log('Type:', paymentStatus.type);
    console.log('Status:', paymentStatus.status);
    console.log('External Reference:', paymentStatus.externalReference);
    console.log('Remittance Information:', paymentStatus.remittanceInformation);
    console.log('Value Date:', paymentStatus.valueDate);
    console.log('Debit Amount:', `${paymentStatus.debitAmount.amount} ${paymentStatus.debitAmount.currency}`);
    
    if (paymentStatus.creditAmount && paymentStatus.creditAmount.amount) {
      console.log('Credit Amount:', `${paymentStatus.creditAmount.amount} ${paymentStatus.creditAmount.currency}`);
    }
    
    // Implement business logic based on payment status
    if (paymentStatus.status === 'Completed') {
      console.log('Payment has been successfully completed.');
    } else if (paymentStatus.status === 'Pending') {
      console.log('Payment is still being processed.');
    } else if (paymentStatus.status === 'Failed') {
      console.log('Payment failed. Please check the details or contact support.');
    }
  } catch (error) {
    console.error('There was a problem retrieving the payment status:', error.message);
  }
}

// Example usage:
getPaymentStatus('PAY-001-2023');

Required Permission: get-payment-status

This endpoint requires the permission claim get-payment-status to be present in the JWT token. These permissions are embedded in the token during the authentication process and cannot be modified afterward. The token must be obtained with the appropriate permissions to access this endpoint.

Security
Authorization or Feature Permissions
Path
paymentIdstringrequired

The unique identifier of the payment (also known as transactionId) to retrieve status for.

curl -i -X GET \
  'https://developers.bcb.bm/_mock/apis/open-banking-api/open-banking-api/v1/payments/{paymentId}/status' \
  -H 'Authorization: Bearer <YOUR_jwt_HERE>'

Responses

OK - The request was successful.

Bodyapplication/json
typestring

The type of transaction (e.g., "Outward Swift Payment MT103 API")

externalReferencestring or null

External reference number for the transaction

statusstring

Current status of the transaction (e.g., "Pending", "Completed", "Failed")

remittanceInformationstring or null

Free-text remittance information provided by the client, describing the purpose of the transaction.

transactionIdstring

Unique transaction number

debitAmountCurrencyAmount (object)

The amount debited from the account

One of:

The amount debited from the account

valueDatestring

The date when the transaction will be processed

creditAmountCurrencyAmount (object)

The amount credited from the account

One of:

The amount credited from the account

exchangeRatenumber or null(decimal)

Exchange rate applied to the transaction

Response
application/json
{ "type": "Outward Swift Payment MT103 API", "externalReference": "REF123456", "status": "Completed", "remittanceInformation": "Invoice payment #INV-2023-001", "transactionId": "TX-001-2023", "debitAmount": { "currency": "USD", "amount": 1000 }, "valueDate": "2023-05-15", "creditAmount": { "currency": "USD", "amount": null }, "exchangeRate": null }

Token

Operations

Transactions

Operations