BomaPay Documentation

BomaPay API documentation covering payment partners, integration flows, authentication, API endpoints, and SDKs.

← Back to projects
POST
/register.do

Endpoint metadata is pulled from Strapi and paired with the imported GitBook reference content below.

Create Order

To register an order, useregister.dorequest.

When sending request, you should use header:Content-Type: application/x-www-form-urlencoded

Request parameters

userNameYesString [1..100]Login of the API user on whose behalf requests are processed for a particular merchant.
passwordYesString [1..200]User’s password.
orderNumberYesString [1..32]Number (identifier) of the order in the merchant’s online store system. It is unique for every store in the system and is generated on the order registration. If the Require system to generate order numbers permission is enabled for the merchant, the order number is generated automatically. Otherwise, the order number data is sent in API.
amountMandatoryInteger [0..12]Order amount in the minor denomination
currencyOptionalInteger [3]Payment currency code in the ISO 4217 format.
returnUrlYesString [1..512]URL to which the customer is redirected after a successful payment.
failUrlOptionalURL to which the customer is redirected after a failed payment.
descriptionNoString [1..598]Free form description of the order.
languageNoString [2]Language code in the ISO 639-1 format.
clientIdNoString [0..255]Customer identifier in the merchant system.
sendPaymentLinkNoString [3..10]Specifies the channel used to send the payment link. Possible values: · SMS · EMAIL
emailNoObjectCustomer's email to which the payment link is sent. It is required if sendPaymentLink = EMAIL.
phoneNoInteger [1..9]Customer's phone number to which the payment link is sent. It is required if sendPaymentLink = SMS.
postAddressOptionalString [1..255]Delivery address.
orderBundleOptionalObjectObject containing cart of items. The description of the nested elements is given below.
feeInputOptionalInteger [1..8]Fee amount in minimum currency units. Must be enabled by respective Merchant-level permission in the Gateway.
emailOptionalString [1..40]Email to be displayed on the payment page. Customer's email must be passed if client notification is configured for the merchant. Example: . The email will not be validated on registration. It will be later validated on payment.

Response Codes

CodeDescription
0No system error.
1Order with given order number has already been processed or the childId is incorrect. Order with this number was registered, but was not paid. Submerchant is blocked or deleted.
3Unknown currency.
4Order number is not specified. Merchant user name is not specified. Amount is not specified. Return URL cannot be empty. Password cannot be empty.
5Incorrect value of a request parameter. Incorrect value in the Language parameter. Access is denied. Merchant must change the password.
7System error.

API Spec

POST /register.do

Registers an order
{
  "openapi": "3.0.0",
  "info": {
    "title": "BomaPay API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://dev.bpcbt.com/payment/rest",
      "description": "Dev Sandbox"
    }
  ],
  "paths": {
    "/register.do": {
      "post": {
        "description": "Registers an order",
        "operationId": "registerOrder",
        "requestBody": {
          "description": "Order item to register",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Order"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderSuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid input, object invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderFailureResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Order": {
        "required": [
          "userName",
          "password",
          "orderNumber",
          "amount",
          "returnUrl"
        ],
        "type": "object",
        "properties": {
          "userName": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32
          },
          "amount": {
            "type": "integer",
            "minLength": 1,
            "maxLength": 12
          },
          "sendPaymentLink": {
            "type": "string",
            "enum": [
              "SMS",
              "EMAIL"
            ]
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "integer",
            "minLength": 1,
            "maxLength": 12
          },
          "name": {
            "type": "string",
            "description": "Customer's full name."
          },
          "returnUrl": {
            "type": "string",
            "description": "string"
          }
        }
      },
      "OrderSuccessResponse": {
        "required": [
          "orderId",
          "formUrl"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string"
          },
          "formUrl": {
            "type": "string"
          }
        }
      },
      "OrderFailureResponse": {
        "required": [
          "errorCode",
          "errorMessage"
        ],
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "integer"
          },
          "errorMessage": {
            "type": "string"
          }
        }
      }
    }
  }
}

The Order object

{
  "openapi": "3.0.0",
  "info": {
    "title": "BomaPay API",
    "version": "1.0.0"
  },
  "components": {
    "schemas": {
      "Order": {
        "required": [
          "userName",
          "password",
          "orderNumber",
          "amount",
          "returnUrl"
        ],
        "type": "object",
        "properties": {
          "userName": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32
          },
          "amount": {
            "type": "integer",
            "minLength": 1,
            "maxLength": 12
          },
          "sendPaymentLink": {
            "type": "string",
            "enum": [
              "SMS",
              "EMAIL"
            ]
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "integer",
            "minLength": 1,
            "maxLength": 12
          },
          "name": {
            "type": "string",
            "description": "Customer's full name."
          },
          "returnUrl": {
            "type": "string",
            "description": "string"
          }
        }
      }
    }
  }
}