POST
/register.doEndpoint 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
userName | Yes | String [1..100] | Login of the API user on whose behalf requests are processed for a particular merchant. |
password | Yes | String [1..200] | User’s password. |
orderNumber | Yes | String [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. |
amount | Mandatory | Integer [0..12] | Order amount in the minor denomination |
currency | Optional | Integer [3] | Payment currency code in the ISO 4217 format. |
returnUrl | Yes | String [1..512] | URL to which the customer is redirected after a successful payment. |
failUrl | Optional | URL to which the customer is redirected after a failed payment. | |
description | No | String [1..598] | Free form description of the order. |
language | No | String [2] | Language code in the ISO 639-1 format. |
clientId | No | String [0..255] | Customer identifier in the merchant system. |
sendPaymentLink | No | String [3..10] | Specifies the channel used to send the payment link. Possible values: · SMS · EMAIL |
email | No | Object | Customer's email to which the payment link is sent. It is required if sendPaymentLink = EMAIL. |
phone | No | Integer [1..9] | Customer's phone number to which the payment link is sent. It is required if sendPaymentLink = SMS. |
postAddress | Optional | String [1..255] | Delivery address. |
orderBundle | Optional | Object | Object containing cart of items. The description of the nested elements is given below. |
feeInput | Optional | Integer [1..8] | Fee amount in minimum currency units. Must be enabled by respective Merchant-level permission in the Gateway. |
email | Optional | String [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
| Code | Description |
|---|---|
| 0 | No system error. |
| 1 | Order 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. |
| 3 | Unknown currency. |
| 4 | Order number is not specified. Merchant user name is not specified. Amount is not specified. Return URL cannot be empty. Password cannot be empty. |
| 5 | Incorrect value of a request parameter. Incorrect value in the Language parameter. Access is denied. Merchant must change the password. |
| 7 | System 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"
}
}
}
}
}
}