### Simple Integration Source: https://dev.bpcbt.com/index Get started quickly with simple integration methods that require no or minimal code. ```APIDOC ## Simple Integration ### Description Simple ways of integration that don't require any development effort on your part. ### Methods - Redirect Integration by API - Permanent Payment Link / Universal QR Code - Pay by Link - CMS Plugins - Payment Widget ``` -------------------------------- ### Get Merchant Transactions using cURL Source: https://dev.bpcbt.com/en/pcintegration/api/rest Example of how to retrieve a merchant's transaction list using cURL. This POST request requires an Authorization token and a JSON payload with merchant ID, institution ID, and a period object containing start and end dates. ```curl curl --request POST \ --url https://dev.bpcbt.com/v1/apigate/ws/rest/getMerchantTransactions \ --header 'Authorization: Basic YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "merchantIdn" : "M999101", "institutionId": 2, "period": { "start": "2019-05-01", "end": "2019-06-01" } }' ``` -------------------------------- ### Moving to Production Environment Source: https://dev.bpcbt.com/en/integration/structure/test-to-production Steps to prepare your system for accepting real payments in the production environment. ```APIDOC ## Moving to Production Environment To move to production environment after testing and start accepting real payments, follow these steps: 1. **Change Passwords**: In the Personal Area, change initial passwords for logins from the email with production settings. 2. **Configure Payments**: Configure payments using one of the available integration methods. 3. **Activate Payments**: Activate the payment acceptance. ``` -------------------------------- ### Sandbox Setup Source: https://dev.bpcbt.com/en/pcintegration/api/rest Information on how to use the Sandbox environment to test API functionalities, including downloading a Postman collection and accessing the Sandbox platform. ```APIDOC ## Sandbox Use Sandbox to try API. You can download Postman collection of API requests to test some basic card management functions of SmartVista suite. [sandbox_sv_v1.postman_collection.json](sandbox_sv_v1.postman_collection.json) Download Postman collection Start using the Sandbox Click the log in link to create an account on the Sandbox platform: https://dev.bpcbt.com/cabinet/ You will get access to all of the API's and Merchant Portal. ``` -------------------------------- ### JSON Response Example for Get Geo Restrictions Source: https://dev.bpcbt.com/en/pcintegration/api/rest An example of the JSON response structure returned by the getGeoRestrictions endpoint. It includes lists of regions, countries, transaction groups, and their restrictions. ```json { "regions": { "region": [ { "id": 1, "description": "NETHERLANDS" }, { "id": 2, "description": "EUROPEAN UNION" } ] }, "countries": { "country": [ { "id": 978, "description": "NETHERLANDS" }, { "id": 840, "description": "UNITED STATES" } ] }, "transactionGroups": { "transactionGroup": [ { "id": 1, "description": "Purchase Or Payments" }, { "id": 2, "description": "Cash Withdrawal" } ] }, "restrictions": { "restriction": [ { "regionId": 1, "transactionGroupId": 1, "status": "DISABLED" }, { "countryId": 640, "transactionGroupId": 1, "status": "DISABLED", "startDate": "2021-05-01T00:00:00+03:00", "endDate": "2021-05-09T23:59:59+03:00" } ] } } ``` -------------------------------- ### Register Customer Request Example (cURL) Source: https://dev.bpcbt.com/en/integration/introduction_banking This snippet demonstrates how to register a customer using a cURL command. It includes the necessary headers, the endpoint URL, and a JSON payload with product name and a list of parameters for customer creation in the Sandbox environment. Ensure you replace 'YOUR_TOKEN' with your actual authorization token. ```bash curl --request POST \ --url https://dev.bpcbt.com/v1/apigate/rest/registerCustomer \ --header 'Authorization: Basic YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "productName": "CRCU1001", \ "parameters": [ \ { \ "name": "institutionId", \ "value": "3006" \ }, \ { \ "name": "agent_number", \ "value": "3006" \ }, \ { \ "name": "customer_number", \ "value": "3006P_0000003" \ }, \ { \ "name": "product_id", \ "value": "70000304" \ }, \ { \ "name": "start_date", \ "value": "2021-09-06" \ }, \ { \ "name": "service_id_acc", \ "value": "70000305" \ }, \ { \ "name": "surname", \ "value": "Smith" \ }, \ { \ "name": "firstName", \ "value": "John" \ }, \ { \ "name": "secondName", \ "value": "A." \ }, \ { \ "name": "email", \ "value": "johnsmith@email.com" \ }, \ { \ "name": "mobile_phone", \ "value": "319220977338" \ }, \ { \ "name": "country_code", \ "value": "528" \ }, \ { \ "name": "region", \ "value": "BJ" \ }, \ { \ "name": "city", \ "value": "Utrecht" \ }, \ { \ "name": "street", \ "value": "Papendorpseweg" \ }, \ { \ "name": "house", \ "value": "99" \ }, \ { \ "name": "apartament", \ "value": "1" \ }, \ { \ "name": "postal_code", \ "value": "3528" \ } \ ] \ }' ``` -------------------------------- ### Get Token List Example (cURL) Source: https://dev.bpcbt.com/en/pcintegration/api/rest Shows how to request a list of tokens associated with a card using the getTokenList endpoint. This example uses card number for identification. Requires JSON content type. ```bash curl --request POST \ --url https://dev.bpcbt.com/payment/apigate/ws/rest/getTokenList \ --header 'Content-Type: application/json' \ --data-raw '{ "cardIdentification" : { "cardNumber": 4000010000000001 } }' ``` -------------------------------- ### POST /registerCustomer Source: https://dev.bpcbt.com/en/integration/introduction_banking Registers a new customer in SmartVista and creates an account for them. This endpoint is crucial for onboarding new users in the sandbox environment. ```APIDOC ## POST /registerCustomer ### Description Registers a new customer in SmartVista and creates an account. In the Sandbox, only one account per customer can be created for simplification, but a real project allows multiple accounts. ### Method POST ### Endpoint /registerCustomer ### Parameters #### Request Body - **customerInfo** (object) - Required - Contains information for customer registration. - **name** (string) - Required - The full name of the customer. - **email** (string) - Required - The email address of the customer. - **phone** (string) - Optional - The phone number of the customer. ### Request Example ```json { "customerInfo": { "name": "John Doe", "email": "john.doe@example.com", "phone": "123-456-7890" } } ``` ### Response #### Success Response (200) - **customerId** (string) - The unique identifier for the registered customer. - **accountId** (string) - The unique identifier for the newly created account. #### Response Example ```json { "customerId": "cust_12345", "accountId": "acc_67890" } ``` ``` -------------------------------- ### Get Allowed Beneficiaries Response (JSON) Source: https://dev.bpcbt.com/en/pcintegration/api/rest Example JSON response indicating a list of beneficiaries. ```JSON { "beneficiaries": [ M0001 ] } ``` -------------------------------- ### JavaScript Payment Form Initialization Example Source: https://dev.bpcbt.com/en/integration/sdk/web_sdk_multiframe Demonstrates how to initialize a payment form using JavaScript, specifying required fields and optional configurations for styling and callbacks. This example highlights the structure for passing configuration objects. ```javascript const paymentFormConfig = { mdOrder: "12345", fields: { pan: { container: document.querySelector("#pan"), placeholder: "Card number" }, expiry: { container: document.querySelector("#expiry"), placeholder: "MM/YY" }, cvc: { container: document.querySelector("#cvc"), placeholder: "CVC" } }, apiContext: "/api/v1/payment", language: "en", autofocus: true, shouldMaskPan: false, shouldMaskExpiry: false, shouldMaskCvc: true, showPanIcon: true, panIconStyle: { width: "30px", height: "20px" }, styles: { base: { color: 'blue' }, focus: { borderColor: 'green' }, valid: { backgroundColor: 'lightgreen' }, invalid: { backgroundColor: 'salmon' }, placeholder: { base: { color: 'gray' }, focus: { color: 'darkgray' } } }, customStyles: { pan: { base: { color: 'black' }, focus: { borderColor: 'blue' }, valid: { backgroundColor: 'lightblue' }, invalid: { backgroundColor: 'pink' }, placeholder: { base: { color: 'silver' }, focus: { color: 'gray' } } } }, containerClassName: "form-field", onFormValidate: (isValid) => { console.log("Form is valid: " + isValid); } }; // Assuming a PaymentForm constructor or initialization function exists // const paymentForm = new PaymentForm(paymentFormConfig); ``` -------------------------------- ### Get Card Balance API Request Example (cURL) Source: https://dev.bpcbt.com/en/pcintegration/api/rest This snippet demonstrates how to call the Get Card Balance API using cURL. It includes the necessary URL, HTTP method, headers, and a JSON payload with card identification details. ```curl curl --request POST \ --url https://dev.bpcbt.com/payment/apigate/ws/rest/getCardBalance \ --header 'Content-Type: application/json' \ --data-raw '{ "cardIdentification" : { "cardNumber" : 4000010000000001, "expDate" : 202012 } }' ``` -------------------------------- ### Initialize Web SDK Source: https://dev.bpcbt.com/en/integration/sdk/web_sdk_multiframe Demonstrates how to initialize the Web SDK using the `init()` method. This method returns a promise that resolves upon successful initialization, allowing for actions like hiding a loader. ```javascript webSdkFormWithoutBindings .init() .then((success) => { console.log('success', success) // Script initialized successfully. // Promise returns an object containing some useful information about the registered order. // After that, you can remove the loader or perform other actions: document.querySelector('.payment-form-loader').classList.remove('payment-form-loader--active'); }) .then((error) => { // Errors occurred during the initialization of the script. Further execution is not possible. // Promise returns an error message that we can display on the page: const errorEl = document.querySelector('#error_1'); errorEl.innerHTML = e.message; errorEl.classList.remove('visually-hidden'); }); ``` -------------------------------- ### Get Payment Orders Response Example (JSON) Source: https://dev.bpcbt.com/en/pcintegration/api/rest Example JSON response structure for the getPaymentOrders API call. It includes a list of payment orders, with each order detailing its ID, event date, purpose, currency, amount, status, and order number. ```json { "orderList" : [ { "amount" : 1, "orderNumber" : "2344552", "id" : 3, "eventDate" : "2020-04-30", } ] } ``` -------------------------------- ### Example Swift Core Implementation (No GUI) Source: https://dev.bpcbt.com/en/integration/sdk/sdk_core Provides a comprehensive Swift example for the core functionalities of the SDK, excluding GUI elements. It demonstrates input validation for card details (number, expiry, CVC, cardholder) using dedicated validator classes and then proceeds to generate token results for both new and stored payment methods using `SdkCore`. Ensure all necessary validation results and public keys are correctly handled. ```swift import UIKit import SDKCore final class MainViewController: UIViewController { private let cardNumberValidator = CardNumberValidator() private let cardExpiryValidator = CardExpiryValidator() private let cardCodeValidator = CardCodeValidator() private let cardHolderValidator = CardHolderValidator() private let sdkCore = SdkCore() private var cardNumberValidationResult: ValidationResult = .VALID private var cardExpiryValidationResult: ValidationResult = .VALID private var cardCodeValidationResult: ValidationResult = .VALID private var cardHolderValidationResult: ValidationResult = .VALID private func checkValidation() { cardNumberValidationResult = cardNumberValidator.validate(data: cardNumberValue) cardExpiryValidationResult = cardNumberValidator.validate(data: cardExpiryValue) cardCodeValidationResult = cardNumberValidator.validate(data: cardCodeValue) cardHolderValidationResult = cardNumberValidator.validate(data: cardHolderValue) } private func generateTokenResult() { let newPaymentMethodParams = NewPaymentMethodParams( pan: cardNumberValue, cvc: cardExpiryValue, expiryMMYY: cardExpiryValue, cardholder: cardHolderValue, pubKey: publicKey ) let newPaymentMethodConfig = SDKCoreConfig( paymentMethodParams: .newPaymentMethodParams(params: newPaymentMethodParams) ) let tokenResultWithNewPaymentMethod = sdkCore.generateWithConfig(config: newPaymentMethodConfig) let storedPaymentMethodParams = StoredPaymentMethodParams( pubKey: publicKey, storedPaymentMethodId: "storedPaymentMethodId", cvc: "123" ) let storedPaymentMethodConfig = SDKCoreConfig( paymentMethodParams: .storedPaymentMethodParams(params: storedPaymentMethodParams) ) let tokenResultWithStoredPaymentMethod = sdkCore.generateWithConfig(config: storedPaymentMethodConfig) } } ``` -------------------------------- ### Get Account Balances Request Example (cURL) Source: https://dev.bpcbt.com/en/pcintegration/api/rest An example cURL command to retrieve account balances. It showcases the POST request method, URL, required headers (Authorization and Content-Type), and a sample JSON payload with parameters like terminalId and institutionId. ```cURL curl --request POST \ --url https://dev.bpcbt.com/v1/apigate/ws/rest/getAccountBalances \ --header 'Authorization: Basic YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "terminalId":"2111TEST", "institutionId":"2111" }' ``` -------------------------------- ### Get Allowed MCC List Response (JSON) Source: https://dev.bpcbt.com/en/pcintegration/api/rest Example JSON response showing a list of allowed MCCs. ```JSON { "mccList": [ 1750 ] } ``` -------------------------------- ### POST /v1/apigate/ws/rest/registerCustomer Source: https://dev.bpcbt.com/en/pcintegration/api/rest Registers a new customer in the sandbox environment with specified product and parameters. ```APIDOC ## POST /v1/apigate/ws/rest/registerCustomer ### Description Registers a new customer in the sandbox environment. This endpoint requires a `productName` and a list of `parameters` to define the customer's details. ### Method POST ### Endpoint /v1/apigate/ws/rest/registerCustomer ### Parameters #### Request Body - **productName** (string) - Mandatory - Customer template ID to be used for customer creation. For Sandbox, this should be "CRCU1001". - **parameters** (Object) - Mandatory - Parameter list depending on the customer creation template. - **parameters.name** (string) - Mandatory - Identifies a parameter in the customer template. - **parameters.value** (string) - Mandatory - The value to be set for the specific parameter. **Specific parameters for Sandbox:** - `institutionId` (string) - Mandatory - Obtained via email after registration. - `agent_number` (string) - Mandatory - Same as `institutionId`. - `customer_number` (string) - Mandatory - Unique identifier for the customer in your sandbox project. - `product_id` (string) - Mandatory - Obtained via email after registration. - `start_date` (string) - Mandatory - Any date in the past (YYYY-MM-DD format). - `service_id_acc` (string) - Mandatory - Obtained via email after registration. - `surname` (string) - Mandatory - Customer's last name. - `firstName` (string) - Mandatory - Customer's first name. - `secondName` (string) - Optional - Customer's middle name. - `email` (string) - Mandatory - Customer's email address. - `mobile_phone` (string) - Mandatory - Customer's mobile phone number. - `region` (string) - Mandatory - Customer's region. - `city` (string) - Mandatory - Customer's city. - `street` (string) - Mandatory - Customer's street. - `house` (string) - Mandatory - Customer's house number. - `apartment` (string) - Mandatory - Customer's apartment number. - `postal_code` (string) - Mandatory - Customer's postal code. - `country_code` (string) - Mandatory - ISO 3166-1 numeric country code. ### Request Example ```json { "productName": "CRCU1001", "parameters": [ { "name": "institutionId", "value": "3006" }, { "name": "agent_number", "value": "3006" }, { "name": "customer_number", "value": "3006P_0000003" }, { "name": "product_id", "value": "70000304" }, { "name": "start_date", "value": "2021-09-06" }, { "name": "service_id_acc", "value": "70000305" }, { "name": "surname", "value": "Smith" }, { "name": "firstName", "value": "John" }, { "name": "secondName", "value": "A. " }, { "name": "email", "value": "johnsmith@email.com" }, { "name": "mobile_phone", "value": "319220977338" }, { "name": "country_code", "value": "528" }, { "name": "region", "value": "BJ" }, { "name": "city", "value": "Utrecht" }, { "name": "street", "value": "Papendorpseweg" }, { "name": "house", "value": "99" }, { "name": "apartament", "value": "1" }, { "name": "postal_code", "value": "3528" } ] } ``` ### Response #### Success Response (200) - **customerNumber** (string) - Description: Client number. Matches the number sent in the request. - **accountNumber** (string) - Description: Account number created for the customer. #### Response Example ```json { "customerNumber": "3006P_0000003", "accountNumber": "3006978700000000108" } ``` ``` -------------------------------- ### Get Transactions Request Example (cURL) Source: https://dev.bpcbt.com/en/pcintegration/api/rest This snippet demonstrates how to make a POST request to the Get Transactions API using cURL. It includes the endpoint URL, necessary headers for authorization and content type, and a JSON payload specifying card identification and the transaction period. ```bash curl --request POST \ --url https://dev.bpcbt.com/v1/apigate/ws/rest/getTransactions \ --header 'Authorization: Basic YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{\ "cardIdentification": {\ "cardId": 100000000873\ },\ "period": {\ "start": "2020-04-01",\ "end": "2020-05-01"\ } }' ``` -------------------------------- ### Create Top-up Response Sample (JSON) Source: https://dev.bpcbt.com/cabinet/sv_api_v2 An example of the response received after successfully creating a top-up transaction. It includes all details of the newly created top-up, similar to the individual top-up object schema. ```json { "id": "662691", "amount": 12500, "currency": "EUR", "destinationCard": { "cardNumber": "4143640071118601" }, "creationDate": "2022-02-04T13:14:27", "status": "approved", "statusMessage": "", "rrn": "000000348182" } ``` -------------------------------- ### Response Sample for Session Creation (JSON) Source: https://dev.bpcbt.com/cabinet/ecom_api_v2 This is a sample JSON response for a successful session creation. It includes the session ID, amount, currency, customer details, status, and payment URLs. ```json { "id": "string", "amount": 9000000000000000000, "created": "2019-08-24T14:15:22Z", "currency": "EUR", "customerDetails": { "address": { "city": "string", "country": "st", "line1": "string", "line2": "string", "postalCode": "string", "state": "string" }, "email": "user@example.com", "name": "string", "phone": "string" }, "description": "string", "expiresAt": "string", "failureUrl": "string", "locale": "st", "merchantCustomerId": "string", "merchantReferenceId": "string", "metadata": { }, "paymentData": { "captureMethod": "automatic", "manualCaptureOptions": { "forcedCaptureAt": "string", "forcedCancelAt": "string" }, "setupFutureUsage": { "category": "unscheduled", "recurringModel": { "recurrent": { "expiry": "2019-08-24", "frequency": 4000 }, "installment": { "expiry": "2019-08-24", "frequency": 4000, "phase": 1000 } } } }, "paymentId": "string", "paymentStatus": "paid", "paymentUrl": "string", "status": "open", "successUrl": "string" } ``` -------------------------------- ### Get Transactions API Request Example (cURL) Source: https://dev.bpcbt.com/en/integration/introduction_banking This snippet demonstrates how to make a POST request to the Get Transactions API using cURL. It includes the necessary headers for authorization and content type, along with a JSON payload specifying card identification and the desired time period for transactions. Note that `cardId` should be obtained from a prior `/createVirtualCard` response. ```bash curl --request POST \ --url https://dev.bpcbt.com/v1/apigate/ws/rest/getTransactions \ --header 'Authorization: Basic YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "cardIdentification": { \ "cardId": "100000245258" \ }, \ "period": { \ "start": "2024-10-01", \ "end": "2024-10-23" \ }' } ``` -------------------------------- ### Reference Materials Source: https://dev.bpcbt.com/index Utilize reference materials including a glossary, test cards, and security guidelines. ```APIDOC ## Reference Materials ### Description Use reference materials including glossary and test cards. ### Materials - Merchant Portal User Guide - Glossary - Test Cards - Security (PCI DSS) - Transition to Production Environment ``` -------------------------------- ### Response Example for Get Account Balance Source: https://dev.bpcbt.com/en/pcintegration/api/rest This JSON output displays the balances of an account retrieved from SVBO. It specifies the `availableBalance`, `holdBalance`, and `exceedBalance` as integer values. ```JSON { "availableBalance": 0, "holdBalance": 0, "exceedBalance": 0 } ``` -------------------------------- ### Payment Request Payload Example (JSON) Source: https://dev.bpcbt.com/en/assets/plugins/sandbox_api_v2 This is a detailed JSON payload structure for initiating a payment. It includes various fields for currency, amount, customer details, payment method options (card, Apple Pay, Google Pay, Samsung Pay), and setup for future usage or recurring payments. This example demonstrates the comprehensive data required for a successful payment transaction. ```json { "currency": "EUR", "amount": "", "captureMethod": "automatic", "customerDetails": { "address": { "city": "", "country": "", "line1": "", "line2": "", "postalCode": "", "state": "" }, "email": "", "name": "", "phone": "" }, "description": "", "manualCaptureOptions": { "forcedCancelAt": "", "forcedCaptureAt": "" }, "merchantCustomerId": "", "metadata": "", "paymentMethod": { "type": "fugiat exercitation esse", "card": { "cvc": "", "expiryMonth": "", "expiryYear": "", "holderName": "", "number": "", "token": "" }, "applePay": { "token": "" }, "googlePay": { "token": "" }, "samsungPay": { "token": "" } }, "paymentMethodOptions": { "card": { "threeDSecureMode": "automatic", "verify": "" } }, "returnUrl": "", "setupFutureUsage": { "category": "aliqua mollit est dolore", "recurringModel": { "recurrent": { "expiry": "", "frequency": "" }, "installment": { "expiry": "", "frequency": "", "phase": "" } } }, "storedPaymentMethodId": "" } ``` -------------------------------- ### Initialize Web SDK and Handle Order Session Source: https://dev.bpcbt.com/en/integration/sdk/web_sdk_multiframe Initializes the Web SDK and handles the order session. It sets up event listeners for selecting stored credentials or a new card, and manages UI elements like loaders and error messages. This method returns a promise. ```javascript // Initialization webSdkFormWithBindings .init() .then(({ orderSession }) => { // The `orderSession` object contains all the information about the order, including information about the bindings. console.info("orderSession", orderSession); // Show select binding element document.querySelector("#select-binding-container").style.display = orderSession.bindings.length ? "" : "none"; // Fill the select with stored credentials orderSession.bindings.forEach((binding) => { document .querySelector("#select-binding") .options.add(new Option(binding.pan, binding.id)); }); // Handle select stored credential or a new card document .querySelector("#select-binding") .addEventListener("change", function () { const bindingId = this.value; if (bindingId !== "new_card") { webSdkFormWithBindings.selectBinding(bindingId); // Hide the 'Save card' checkbox document.querySelector("#save-card-container").style.display = "none"; } else { // Selecting stored credentials with null means switching to a new card webSdkFormWithBindings.selectBinding(null); // Show the 'Save card' checkbox document.querySelector("#save-card-container").style.display = ""; } }); // When the form is ready, we can hide the loader document.querySelector("#pay-form-loader").classList.add("visually-hidden"); }) .catch((error) => { // Errors occurred during the initialization of the script. Further execution is not possible. // Promise returns an error message that we can display on the page: const errorEl = document.querySelector('#error_1'); errorEl.innerHTML = e.message; errorEl.classList.remove('visually-hidden'); }); ``` -------------------------------- ### POST Request to Get Geo Restrictions (cURL) Source: https://dev.bpcbt.com/en/pcintegration/api/rest Example of how to make a POST request to the getGeoRestrictions endpoint using cURL. It demonstrates the necessary headers and the JSON payload for card identification. ```curl curl --request POST \ --url https://dev.bpcbt.com/v1/apigate/ws/rest/getGeoRestrictions \ --header 'Authorization: Basic YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "cardIdentification" : { "cardNumber" : 4000010000000001 } }' ``` -------------------------------- ### Configuring Payments Source: https://dev.bpcbt.com/en/integration/structure/test-to-production Details on choosing and configuring payment integration methods for the production environment. ```APIDOC ## Configuring Payments with One of Integration Ways Choose a way of integration: * **Simple Integration Ways**: Suitable for use without IT specialist assistance. * **Advanced Integration Ways**: Require assistance from an IT specialist. * **Integration via API**: To switch a resource to the production environment, change the URL address to `https://dev.bpcbt.com/payment/rest/`. ``` -------------------------------- ### Get Allowed Beneficiaries Request (cURL) Source: https://dev.bpcbt.com/en/pcintegration/api/rest Example cURL request to retrieve a list of allowed beneficiaries for a given account number. Requires an Authorization token and specifies the Content-Type as application/json. ```cURL curl --request POST \ --url https://dev.bpcbt.com/v1/apigate/ws/rest/getAllowedBeneficiaries \ --header 'Authorization: Basic YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "accountNumber" : 4000010000000003 }' ``` -------------------------------- ### POST /v1/apigate/ws/rest/registerCustomer Source: https://dev.bpcbt.com/assets/plugins/sandbox_sv_v1_scenario Registers a new customer with the BPCBT system. This endpoint allows for the creation of customer profiles by providing detailed personal and address information. ```APIDOC ## POST /v1/apigate/ws/rest/registerCustomer ### Description Registers a new customer with the BPCBT system. This endpoint allows for the creation of customer profiles by providing detailed personal and address information. ### Method POST ### Endpoint https://dev.bpcbt.com/v1/apigate/ws/rest/registerCustomer ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **productName** (string) - Required - The name of the product for which the customer is being registered. - **parameters** (array) - Required - An array of parameter objects containing details for customer registration. - **name** (string) - Required - The name of the parameter. - **value** (string) - Required - The value of the parameter. ### Request Example ```json { "productName": "CRCU1001", "parameters": [ { "name": "institutionId", "value": "{{institutionId}}" }, { "name": "agent_number", "value": "{{institutionId}}" }, { "name": "customer_number", "value": "{{institutionId}}_P012" }, { "name": "product_id", "value": "{{productId}}" }, { "name": "start_date", "value": "2021-09-06" }, { "name": "service_id_acc", "value": "{{serviceId}}" }, { "name": "surname", "value": "Smith" }, { "name": "firstName", "value": "John" }, { "name": "secondName", "value": "A." }, { "name": "email", "value": "johnsmith@email.com" }, { "name": "mobile_phone", "value": "319220977338" }, { "name": "country_code", "value": "528" }, { "name": "region", "value": "BJ" }, { "name": "city", "value": "Utrecht" }, { "name": "street", "value": "Papendorpseweg" }, { "name": "house", "value": "99" }, { "name": "apartament", "value": "1" }, { "name": "postal_code", "value": "3528" } ] } ``` ### Response #### Success Response (200) - **accountNumber** (string) - The account number assigned to the newly registered customer. - **customerNumber** (string) - The unique customer number assigned by the system. #### Response Example ```json { "accountNumber": "some_account_number", "customerNumber": "some_customer_number" } ``` ``` -------------------------------- ### Install Magento Payment Plugin (VPS/VDS) Source: https://dev.bpcbt.com/en/integration/cms/plugins Commands to enable and set up the BPC payment plugin on a VPS or VDS hosting environment. This includes enabling the module, upgrading setup, cleaning cache, and deploying static content. ```bash php bin/magento module:enable BPC_BPC php bin/magento setup:upgrade php bin/magento cache:clean php bin/magento setup:static-content:deploy -f ``` -------------------------------- ### POST /v1/apigate/ws/rest/registerCustomer Source: https://dev.bpcbt.com/en/integration/introduction_banking Registers a new customer with specified product and parameter details. ```APIDOC ## POST /v1/apigate/ws/rest/registerCustomer ### Description Registers a new customer by providing product details and a list of parameters required for customer creation. ### Method POST ### Endpoint /v1/apigate/ws/rest/registerCustomer ### Parameters #### Query Parameters - **Authorization** (string) - Required - Your authentication token. - **Content-Type** (string) - Required - Set to application/json. #### Request Body - **productName** (string) - Mandatory - Customer template ID for customer creation. Use "CRCU1001" for Sandbox. - **parameters** (Object) - Mandatory - Parameter list depending on the customer creation template. - **name** (string) - Mandatory - Identifies the parameter in the customer template. - **value** (string) - Mandatory - The value to be set for the specific parameter. **Customer Data Parameters:** - `institutionId` (string) - The value is displayed in your sandbox account. - `agent_number` (string) - Same as `institutionId`. - `customer_number` (string) - Must be unique in your sandbox project. - `product_id` (string) - The value is displayed in your sandbox account. - `start_date` (string) - Any date in the past. YYYY-MM-DD format. - `service_id_acc` (string) - The value is displayed in your sandbox account. - `surname` (string) - Customer data parameter. Can be any text. - `firstName` (string) - Customer data parameter. Can be any text. - `secondName` (string) - Customer data parameter. Can be any text. - `email` (string) - Customer data parameter. Can be any text. - `mobile_phone` (string) - Customer data parameter. Can be any text. - `region` (string) - Customer data parameter. Can be any text. - `city` (string) - Customer data parameter. Can be any text. - `street` (string) - Customer data parameter. Can be any text. - `house` (string) - Customer data parameter. Can be any text. - `apartment` (string) - Customer data parameter. Can be any text. - `postal_code` (string) - Customer data parameter. Can be any text. - `country_code` (string) - ISO 3166-1 numeric country code. ### Request Example ```json { "productName": "CRCU1001", "parameters": [ { "name": "institutionId", "value": "3006" }, { "name": "agent_number", "value": "3006" }, { "name": "customer_number", "value": "3006P_0000003" }, { "name": "product_id", "value": "70000304" }, { "name": "start_date", "value": "2021-09-06" }, { "name": "service_id_acc", "value": "70000305" }, { "name": "surname", "value": "Smith" }, { "name": "firstName", "value": "John" }, { "name": "secondName", "value": "A." }, { "name": "email", "value": "johnsmith@email.com" }, { "name": "mobile_phone", "value": "319220977338" }, { "name": "country_code", "value": "528" }, { "name": "region", "value": "BJ" }, { "name": "city", "value": "Utrecht" }, { "name": "street", "value": "Papendorpseweg" }, { "name": "house", "value": "99" }, { "name": "apartament", "value": "1" }, { "name": "postal_code", "value": "3528" } ] } ``` ### Response #### Success Response (200) - **customerNumber** (string) - Client number. Echoes the number sent in the request. - **accountNumber** (string) - Account number created for the customer. #### Response Example ```json { "customerNumber": "3006P_0000003", "accountNumber": "3006978700000000108" } ``` ``` -------------------------------- ### POST /applepay/payment.do Source: https://dev.bpcbt.com/en/assets/plugins/sandbox_eCommerce Initiates an Apple Pay payment registration. ```APIDOC ## POST /applepay/payment.do ### Description Initiates an Apple Pay payment registration. ### Method POST ### Endpoint {{baseUrl}}/applepay/payment.do ### Parameters #### Request Body (The request body for this endpoint was not fully provided in the source data. It is expected to contain payment details for Apple Pay.) ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) (No specific success response fields provided in the source data) #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Get Payment Orders Example (cURL) Source: https://dev.bpcbt.com/en/pcintegration/api/rest Demonstrates how to retrieve a list of payment orders using a POST request to the getPaymentOrders endpoint. Requires an Authorization token and specifies a date range for the orders. ```bash curl --request POST \ --url https://dev.bpcbt.com/v1/apigate/ws/rest/getPaymentOrders \ --header 'Authorization: Basic YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "merchantNumber" : "M000001", "institutionId": "3012", "period": { "start": "2020-04-20", "end": "2020-04-30" } }' ``` -------------------------------- ### JSON Example: Payment Initialization Parameters Source: https://dev.bpcbt.com/en/integration/sdk/web_sdk_multiframe This JSON object represents the parameters returned by the initialization method, including order details, currency information, merchant settings, and bound card details. It demonstrates the structure and potential fields for a payment transaction. ```json { "mdOrder": "5541f44c-d7ec-7a6c-997d-1d4d0007bc7d", "orderSession": { "amount": "100000", "currencyAlphaCode": "BYN", "currencyNumericCode": "933", "sessionTimeOverAt": 1740385187287, "orderNumber": "27000", "description": "", "cvcNotRequired": false, "bindingEnabled": false, "bindingDeactivationEnabled": false, "merchantOptions": [ "MASTERCARD_TDS", "MASTERCARD", "VISA", "VISA_TDS", "CARD" ], "customerDetails": {}, "merchantInfo": { "merchantUrl": "http://google.com", "merchantFullName": "Coffee to Go", "merchantLogin": "CoffeToGo", "captchaMode": "NONE", "loadedResources": { "logo": true, "footer": false }, "custom": false }, "bindings": [ { "cardholderName": "CARDHOLDER NAME", "createdAt": 1712321609666, "id": "83ffea5d-061f-7eca-912a-02ff0007bc7d", "pan": "4111 11** **** 1111", "expiry": "12/24", "cardInfo": { "name": "TEST BANK-A", "nameEn": "TEST BANK-A", "backgroundColor": "#fbf0ff", "backgroundGradient": [ "#fafafa", "#f3f0ff" ], "supportedInvertTheme": false, "backgroundLightness": true, "country": "hu", "defaultLanguage": "en", "textColor": "#040e5d", "url": null, "logo": "logo/main/293c39ad-0bcb-4cbb-803e-65c435877b5a/1.svg", "logoInvert": "logo/invert/293c39ad-0bcb-4cbb-803e-65c435877b5a/1.svg", "logoMini": "logo/mini/293c39ad-0bcb-4cbb-803e-65c435877b5a/1.svg", "design": null, "paymentSystem": "visa", "cobrand": null, "productCategory": null, "productCode": null, "mnemonic": "TEST BANK-A", "params": null } } ] } } ``` -------------------------------- ### Get Allowed MCC List Request (cURL) Source: https://dev.bpcbt.com/en/pcintegration/api/rest Example cURL request to fetch a list of allowed Merchant Category Codes (MCC) for a card or account. It includes the account number and requires authentication. ```cURL curl --request POST \ --url https://dev.bpcbt.com/v1/apigate/ws/rest/getAllowedMccList \ --header 'Authorization: Basic YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "accountNumber" : 4000010000000003 }' ``` -------------------------------- ### Get Account Limits Response Example (JSON) Source: https://dev.bpcbt.com/en/pcintegration/api/rest This JSON object shows the structure of the response when retrieving account limits. It includes details about various limits, their values, cycle types, and any associated exceptions. ```json { "limits": [ { "name": "LMTTC01", "value": 10000000, "cycleType": 4, "cycleLength": 1, "currency": 978, "currentValue": 0, "limitExceptions": [ { "limitName": "LMTTA02", "startDate": "2014-12-30", "endDate": "2014-12-31", "value": 10000, "cycleType": 0, "cycleLength": 0 } ] } ] } ``` -------------------------------- ### Merchant GW API v2 - Introduction Source: https://dev.bpcbt.com/en/assets/plugins/sandbox_api_v2 General introduction to the Merchant Payment API v2, its design principles, and capabilities. ```APIDOC ## Introduction The Merchant Payment API design is based on [REST](https://en.wikipedia.org/wiki/Representational_state_transfer). The Merchant Payment API provides a wide range of payment solutions with supporting various features. ```