Brankas Brankas

Pay API v1.2.0

Bank transfer is still the main mode of payment in Southeast Asia. In fact, 94% of online merchants in Indonesia alone offer it as a payment option with Vietnam and Philippines at 80% and Thailand at 79%.

Brankas Pay provides SMEs with an API-driven payment solution that allows them to have one-click payable invoices. By leveraging Brankas Pay, SMEs are able to execute fund transfer based transactions over a growing basket of banks via a single set of APIs.

Home businesses are now common. Covid-19 has moved brick and mortar stores online and at home. Payments are manually made via bank transfers where merchants share their bank account details (may contain more than 10 numbers). Customers who do not use online or mobile banking need to go to a bank or ATM and manually transfer funds to the merchant’s account. Merchants also require a proof of payment (photos of deposit slip or pictures of online fund transfers) which they verify by logging into their bank portals.

The process is tedious, and as with any manual task, is prone to human error. Pay allows merchants to generate a unique URL that allows end-users to make payments via the Brankas Direct IdP flow. Micro and small businesses can conveniently take payments via bank transfers.

Another key feature is a Transaction List page that gives merchants the visibility on all of the Pay invoice status and transactions that went through via the unique Direct IdP URL enabling merchants to reconcile payments.

  • Host https://api.pay.bnk.to

  • Base Path v1

Retrieve Merchant

Retrieve Merchant returns business info and the set of destination accounts. An HTTP request is considered a success if its status code is not 4xx or 5xx.

HTTP Request

GET https://api.pay.bnk.to/v1/merchant

Headers
Content-Type: application/json

Query Parameters

NameTypeDescription
merchant_idstringA unique merchant account ID, profile ID or the bank account number depending on the type.

Responses

Response body

NameTypeDescription
business_namestringThe business name of the account.
active_url_countintegerCurrently unused
accounts[]PayAccountArray of destination accounts. Deprecated
summaryPayValueSummaryAmount values earned on the account
merchant_idstringA unique merchant account Id.
default_account_idstringThe default destination account Id which will be used for fund transfers unless overridden.
destination_accountsPayAccountThe destination account object.
countrystringThe country of merchant.
business_emailstringThe business email of merchant, this can be different from the user registration email.
mobile_country_codestringMobile country code of merchant.
mobile_numberstringMobile number of merchant.
url_expirystringThe default expiry time of invoice in hours.
Objects
PayAccount
NameTypeDescription
idstringA unique account Id, profile Id or the bank account number depending on the type.
bankstringBank type.
account_numberstringThe account number of the bank account
biller_idstringThe biller id of the merchant (only for Thailand).
first_namestringThe First Name of the bank account.
last_namestringThe Last Name of the bank account.
PayValueSummary
NameTypeDescription
yearPayAmountAmount generated for the current year to date
prev_yearPayAmountAmount generated for the previous year
monthPayAmountAmount generated for the current month to date
PayAmount
NameTypeDescription
curstringThe currency value.
amtstringThe amount value.

Example:

{
  "business_name": "string",
  "active_url_count": 0,

  "summary": {
    "year": [
      {
        "cur": "string",
        "amt": "string"
      }
    ],
    "prev_year": [
      {
        "cur": "string",
        "amt": "string"
      }
    ],
    "month": [
      {
        "cur": "string",
        "amt": "string"
      }
    ]
  },
  "merchant_id": "string",
  "default_account_id": "string",
  "destination_accounts": {
    "additionalProp1": {
      "id": "string",
      "bank": "string",
      "account_number": "string",
      "biller_id": "string", //optional
      "first_name": "string",
      "last_name": "string"
    },
    "additionalProp2": {
      "id": "string",
      "bank": "string",
      "account_number": "string",
      "biller_id": "string", //optional
      "first_name": "string",
      "last_name": "string"
    },
    "additionalProp3": {
      "id": "string",
      "bank": "string",
      "account_number": "string",
      "biller_id": "string", //optional
      "first_name": "string",
      "last_name": "string"
    }
  },
  "country": "string",
  "business_email":"string",
  "mobile_country_code":"string",
  "mobile_number": "string",
  "url_expiry": 0
}

Response codes

StatusDescription
200Request executed successfully.

Create Merchant

Create Merchant will store business info related to a merchant. A HTTP request is considered a success if its status code is not 4xx or 5xx.

curl -X POST \
	https://api.pay.bnk.to/v1/merchant \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-H 'Content-Type: application/json' \
	-d '{
		"name": "string",
		"address_line1": "string",
		"address_line2": "string",
		"city": "string",
		"state_province": "string",
		"country": "string",
		"email_address": "string",
		"mobile_country_code": "string",
		"mobile_number": "string",
		"url_expiry": 0
		}'

HTTP Request

POST https://api.pay.bnk.to/v1/merchant

Headers
Content-Type: application/json

Body Parameters

NameTypeDescription
namestringThe name of the merchant account holder.
address_line1stringThe address of the merchant line 1.
address_line2stringThe address of the merchant line 2.
citystringThe city of the merchant location.
state_provincestringThe state of the merchant location.
countrystringThe country of the merchant location.
email_addressstringThe email address of the merchant.
mobile_country_codestringThe mobile country code of the merchant.
mobile_numberstringThe mobile number of the merchant.
url_expiryintegerNumber of expiry hours for the requested url.

Responses

Example:

{}

Response codes

StatusDescription
200Request executed successfully.

Update Merchant

Update Merchant update its business information. An HTTP request is considered a success if its status code is not 4xx or 5xx.

curl -X PUT \
	https://api.pay.bnk.to/v1/merchant/{merchant_id} \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-H 'Content-Type: application/json' \
	-d '{
		"url_expiry": 0,
		"merchant_id": "string",
		"name": "string",
		"email": "string",
		"mobile_country_code": "string",
		"mobile_number": "string"
		}'

HTTP Request

PUT https://api.pay.bnk.to/v1/merchant/{merchant_id}

Headers
Content-Type: application/json

Query Parameters

NameTypeDescription
merchant_idstringA unique merchant account ID, profile ID or the bank account number depending on the type.

Body Parameters

NameTypeDescription
url_expiryintegerNumber of expiry hours for the requested url
merchant_idstringA unique merchant Id.
namestringThe business name of the merchant.
emailstringThe business email of the merchant.
mobile_country_codestringThe mobile country code of the merchant.

Responses

Example:

{}

Response codes

StatusDescription
200Request executed successfully.

Create Invoice

Create Invoice initializes a single-use URL for a payment. A HTTP request is considered a success if its status code is not 4xx or 5xx.

curl -X PUT \
	https://api.pay.bnk.to/v1/invoice \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-H 'Content-Type: application/json' \
	-d '{
		"merchant_id": "string",
		"account_id": "string",
		"amount": {
			"cur": "string",
			"amt": "string"
		},
		"item_id": "string",
		"description": "string",
		"remarks": "string",
		"customer_name": "string",
		"expiry": 0
		}'

HTTP Request

POST https://api.pay.bnk.to/v1/invoice

Headers
Content-Type: application/json

Body Parameters

NameTypeDescription
merchant_idstringA unique merchant account ID, profile ID or the bank account number depending on the type.
account_idstringThe destination account ID to use in the fund transfer.
amountPayAmountThe amount of the fund transfer.
item_idstringThe name of the ordered item.
descriptionstringThe description of the ordered item.
remarksstringAdditional remarks of the invoice.
customer_namestringThe customer name.
expiryintegerNumber of expiry hours for the requested url.
Objects
PayAmount
NameTypeDescription
curstringThe currency value.
amtstringThe amount value.

Responses

Example:

{
  "url": "string",
  "expiry": "2020-10-27T03:40:19.749Z",
  "message": "string",
  "invoice_id": "string"
}

Response codes

StatusDescription
200Request executed successfully.

Retrieve Invoice

Retrieve Invoice returns a set of objects containing invoice details and the current payment status. A HTTP request is considered a success if its status code is not 4xx or 5xx.

HTTP Request

GET https://api.pay.bnk.to/v1/invoice

Headers
Content-Type: application/json

Query Parameters

NameTypeDescription
merchant_idstringA unique merchant account ID, profile ID or the bank account number depending on the type.
startstringTimestamp to start pulling invoice details from
endstringTimestamp to stop pulling invoice details from
limitintegerLimit the number of invoice details returned

Responses

Response body

NameTypeDescription
startstringTimestamp to start pulling invoice details from
endstringTimestamp to stop pulling invoice details from
nextstringThe invoice id of the next batch of invoice details, if a limit was reached
urls[]PayURLStatusAn array of Invoice details
Objects
PayURLStatus
NameTypeDescription
invoice_idstringThe invoice unique ID.
urlstringThe url created for the payment.
statusPayPaymentStatusThe status object of the payment.
amountstringThe amount of the fund transfer.
item_idstringThe name of the ordered item.
descriptionstringThe description of the ordered item.
remarksstringAdditional remarks of the invoice.
createdstringTimestamp of when the invoice entry was created.
paid_datestringThe date time of when the payment is completed.
customer_namestringThe customer name.
Enums
PayPaymentStatus
ValueDescription
CREATEDThe payment url is created
FAILEDThe payment url has been accessed by the customer and failed to complete the payment.
SUCCESSThe payment url has been accessed by the customer and successfully completed the payment.
EXPIREDThe payment url is expired and the payment has not been completed.

Example:

{
  "start": "2020-10-27T03:45:35.055Z",
  "end": "2020-10-27T03:45:35.055Z",
  "next": "string",
  "urls": [
    {
      "invoice_id": "string",
      "url": "string",
      "status": "Created",
      "amount": {
        "cur": "string",
        "amt": "string"
      },
      "item_id": "string",
      "description": "string",
      "remarks": "string",
      "created": "2020-10-27T03:45:35.055Z",
      "paid_date": "2020-10-27T03:45:35.055Z",
      "customer_name": "string"
    }
  ]
}

Response codes

StatusDescription
200Request executed successfully.

Create Deposit Account

Create Deposit Account will store merchant destination account info, returning our internal account id. A HTTP request is considered a success if its status code is not 4xx or 5xx.

curl -X POST \
	https://api.pay.bnk.to/v1/deposit-account \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-H 'Content-Type: application/json' \
	-d '{
		"bank_code": 0,
		"account_number": "string",
		"account_first_name": "string",
		"account_middle_name": "string",
		"account_last_name": "string",
		"set_default": true,
		"biller_id" : "string" //optional
		}'

HTTP Request

POST https://api.pay.bnk.to/v1/deposit-account

Headers
Content-Type: application/json

Body Parameters

NameTypeDescription
bank_codeintegerBrankas bank code.
account_numberstringThe account number of the bank account.
account_number_first_namestringThe first name of the account holder name of the bank account.
account_number_middle_namestringThe middle name of the account holder name of the bank account.
account_last_namestringThe last name of the account holder name of the bank account.
set_defaultbooleanTRUE for the bank account selected as default bank account. FALSE for other bank account options.
biller_idstringThe biller ID of the merchant that provided by the bank ( only for Thailand )

Responses

Response body

NameTypeDescription
account_idstringA unique account ID, profile ID, or the bank account number depending on the type.

Example:

{
  "account_id": "string"
}

Response codes

StatusDescription
200Request executed successfully.

Update Deposit Account

Update Deposit Account will update a matching merchant destination account with new account info. A HTTP request is considered a success if its status code is not4xx or 5xx.

curl -X PUT \
	https://api.pay.bnk.to/v1/deposit-account/{account_id} \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-H 'Content-Type: application/json' \
	-d '{
		"account_id": "string",
		"bank_code": 0,
		"account_number": "string",
		"account_first_name": "string",
		"account_middle_name": "string",
		"account_last_name": "string",
		"set_default": true,
		"biller_id" : "string" //optional
		}'

HTTP Request

PUT https://api.pay.bnk.to/v1/deposit-account/{account_id}

Headers
Content-Type: application/json

Query Parameters

NameTypeDescription
account_idstringA unique account ID, profile ID, or the bank account number depending on the type.

Body Parameters

NameTypeDescription
account_idstringA unique account ID, profile ID, or the bank account number depending on the type.
bank_codeintegerBrankas bank code.
account_numberstringThe account number of the bank account.
account_first_namestringThe first name of the account holder name of the bank account.
account_middle_namestringThe middle name of the account holder name of the bank account.
account_last_namestringThe last name of the account holder name of the bank account.
set_defaultbooleanTRUE for the bank account selected as default bank account. FALSE for other bank account options.
biller_idstringThe biller ID of merchant that provided by the bank ( only for Thailand )

Responses

Example:

{}

Response codes

StatusDescription
200Request executed successfully.

Retrieve Supported Banks

Retrieve Supported Banks will return a map of supported bank codes. A HTTP request is considered a success if its status code is not 4xx or 5xx.

HTTP Request

GET https://api.pay.bnk.to/v1/supported-banks

Headers
Content-Type: application/json

Responses

Example:

{
  "banks": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  }
}

Response codes

StatusDescription
200Request executed successfully.