PAY API v1.3.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://pay.sandbox.bnk.to

API Reference Overview

Create destination account

Create destination account create a destination account to allow merchant receive payment

curl -X POST \
	https://pay.sandbox.bnk.to/v1/deposit-account \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"bank_code": "int32",
		"account_number": "string",
		"account_first_name": "string",
		"account_middle_name": "string",
		"account_last_name": "string",
		"set_default": "bool",
		"biller_id": "string",
		"settlement_id": "string",
		"settlement_alias_id": "string"
	}'

HTTP Request

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

Body Parameters

Name Type Description
bank_code int32 The bank code to create destination account
account_number string The bank account number
account_first_name string The bank account’s first name
account_middle_name string The bank account’s middle name
account_last_name string The bank account’s last name
set_default bool True to set this account as default destination account
biller_id string The bank’s biller ID ( required for TH bank)
settlement_id string The id from other payment method
settlement_alias_id string The alias id from other payment method

Responses

Response body

Name Type Description
account_id string

Example:

{
  "account_id": "string"
}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Delete destination account

Delete destination account delete the destination account by account ID

curl -X DELETE \
	https://pay.sandbox.bnk.to/v1/deposit-account/{AccountID} \
	-H 'Authorization: Bearer USE_YOUR_TOKEN'

HTTP Request

DELETE https://pay.sandbox.bnk.to/v1/deposit-account/{AccountID}

Query Parameters

Name Type Description
account_id string The Account ID to delete

Responses

Response body

Name Type Description

Example:

{}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Get Supported banks

Get the list of supported banks in merchant’s country

curl -X GET \
	https://pay.sandbox.bnk.to/v1/supported-banks \
	-H 'Authorization: Bearer USE_YOUR_TOKEN'

HTTP Request

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

Responses

Response body

Name Type Description
map[int]string The list of supported bank

Example:

{
  "": "map[int]string"
}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Update destination account

Update destination account update the destination account information by account ID

curl -X PUT \
	https://pay.sandbox.bnk.to/v1/deposit-account/{AccountID} \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"account_id": "string",
		"bank_code": "int32",
		"account_number": "string",
		"account_first_name": "string",
		"account_middle_name": "string",
		"account_last_name": "string",
		"set_default": "bool",
		"biller_id": "string",
		"settlement_id": "string",
		"settlement_alias_id": "string"
	}'

HTTP Request

PUT https://pay.sandbox.bnk.to/v1/deposit-account/{AccountID}

Query Parameters

Name Type Description
account_id string The account ID to update

Body Parameters

Name Type Description
account_id string The account ID to update
bank_code int32 The bank code of destination account
account_number string The bank account number
account_first_name string The bank account’s first name
account_middle_name string The bank account’s middle name
account_last_name string The bank account’s last name
set_default bool True to set this account as default destination account
biller_id string The bank’s biller ID ( required for TH bank)
settlement_id string The id from other payment method
settlement_alias_id string The alias id from other payment method

Responses

Response body

Name Type Description

Example:

{}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Create Pay Merchant

Create merchant’s business information

curl -X POST \
	https://pay.sandbox.bnk.to/v1/merchant \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-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": "int32",
		"logo": "bytes",
		"qr": "string",
		"webhook_url": "string",
		"notification": "string"
	}'

HTTP Request

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

Body Parameters

Name Type Description
name string Merchant’s business name
address_line1 string Merchant’s address line 1
address_line2 string Merchant’s address line 2
city string Merchant’s city
state_province string Merchant’s state
country string Merchant’s country
email_address string Merchant’s business email
mobile_country_code string Merchant’s mobile country code
mobile_number string Merchant’s mobile Number
url_expiry int32 URL Expiry in hours
logo bytes Merchant’s logo as array of bytes
qr string Merchant’s qr code (using for payment)
webhook_url string The callback url to notify merchant whenever the invoice get paid
notification string Allow merchant to get notification

Responses

Response body

Name Type Description

Example:

{}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Update Pay Merchant

Update merchant’s business information by merchant ID

curl -X PUT \
	https://pay.sandbox.bnk.to/v1/merchant/{MerchantID} \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"url_expiry": "int32",
		"merchant_id": "string",
		"name": "string",
		"email": "string",
		"mobile_country_code": "string",
		"mobile_number": "string",
		"logo": "bytes",
		"qr": "string",
		"webhook_url": "string",
		"remove_logo": "bool",
		"notification": "string",
		"merchant_fee": {
			"fee_type": "string",
			"fee_val": "float"
		}
	}'

HTTP Request

PUT https://pay.sandbox.bnk.to/v1/merchant/{MerchantID}

Query Parameters

Name Type Description
merchant_id string The update merchant ID

Body Parameters

Name Type Description
url_expiry int32 URL Expiry in hours
merchant_id string The update merchant ID
name string Merchant’s business name
email string Merchant’s business email
mobile_country_code string Merchant’s mobile country code
mobile_number string Merchant’s mobile Number
logo bytes Merchant’s logo as array of bytes
qr string Merchant’s qr code (using for payment)
webhook_url string The callback url to notify merchant whenever the invoice get paid
remove_logo bool Set it to true to remove logo
notification string Allow merchant to get notification
merchant_fee Fee Merchant fee configuration
Objects
Fee
Name Type Description
fee_type string Type of fee (Fixed or Percentage)
fee_val float Fee value minor format ( for 1 pls input 100) for fixed fee, float with maximum 2 decimal digit for percentage fee

Responses

Response body

Name Type Description

Example:

{}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Get Account Info

Return the business information and account list of merchant

curl -X GET \
	https://pay.sandbox.bnk.to/v1/merchant \
	-H 'Authorization: Bearer USE_YOUR_TOKEN'

HTTP Request

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

Responses

Response body

Name Type Description
business_name string Merchant’s business name
active_url_count int32 Deprecated
accounts []Account Deprecated
summary ValueSummary Deprecated
merchant_id string Merchant’s ID
default_account_id string Merchant’s default destination account ID
country string Merchant’s country
business_email string Merchant’s business email (might different with register email)
mobile_country_code string Merchant’s mobile country code
mobile_number string Merchant’s Mobile number
url_expiry int32 Default expiry time for invoice
logo_url string Merchant’s logo url
qr string Merchant’s qr url
status string Merchant’s status
plan string Merchant’s subscription plan
webhook_url string Merchant’s webhook url
short_code string Deprecated
short_url string Merchant’s short url
merchant_type string Merchant’s type
merchant_fee Fee Merchant fee
invitation_url string Invitation URL (only for platform merchant)
map[string]Account DestAccounts are the destination accounts, keyed by the account id
Objects
Account
Name Type Description
id string The Id of account
bank string The name of destination account
account_number string Account Number
biller_id string The biller ID of destination account (currently it’s required for TH Bank)
first_name string The First Name of account
last_name string The Last Name of account
bank_code int32 Account’s BankCode for mapping inside Pay
settlement_id string The id from other payment method
settlement_alias_id string The alias id from other payment method
ValueSummary
Name Type Description
year []Amount
prev_year []Amount
month []Amount
Fee
Name Type Description
fee_type string Type of fee (Fixed or Percentage)
fee_val float Fee value minor format ( for 1 pls input 100) for fixed fee, float with maximum 2 decimal digit for percentage fee
Amount
Name Type Description
cur string The Currency Value
amt string The Amount Value

Example:

{
  "business_name": "string",
  "active_url_count": "int32",
  "accounts": [
    {
      "id": "string",
      "bank": "string",
      "account_number": "string",
      "biller_id": "string",
      "first_name": "string",
      "last_name": "string",
      "bank_code": "int32",
      "settlement_id": "string",
      "settlement_alias_id": "string"
    }
  ],
  "summary": {
    "year": [
      {
        "cur": "string",
        "amt": "string"
      }
    ],
    "prev_year": [
      {
        "cur": "string",
        "amt": "string"
      }
    ],
    "month": [
      {
        "cur": "string",
        "amt": "string"
      }
    ]
  },
  "merchant_id": "string",
  "default_account_id": "string",
  "country": "string",
  "business_email": "string",
  "mobile_country_code": "string",
  "mobile_number": "string",
  "url_expiry": "int32",
  "logo_url": "string",
  "qr": "string",
  "status": "string",
  "plan": "string",
  "webhook_url": "string",
  "short_code": "string",
  "short_url": "string",
  "merchant_type": "string",
  "merchant_fee": {
    "fee_type": "string",
    "fee_val": "float"
  },
  "invitation_url": "string",
  "": "map[string]Account"
}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Create Template

Create a invoice template under merchant to allow merchant quickly create an invoice

curl -X POST \
	https://pay.sandbox.bnk.to/v1/template \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"template_name": "string",
		"customer_name": "string",
		"description": "string",
		"remarks": "string",
		"destination_account_id": "string",
		"amount": {
			"cur": "string",
			"amt": "string"
		}
	}'

HTTP Request

POST https://pay.sandbox.bnk.to/v1/template

Body Parameters

Name Type Description
template_name string The name of template
customer_name string Invoice’s customer name
description string Invoice’s description
remarks string Invoice’s additional remarks
destination_account_id string Invoice’s destination account
amount Amount Invoice’s amount
Objects
Amount
Name Type Description
cur string The Currency Value
amt string The Amount Value

Responses

Response body

Name Type Description
template_id string

Example:

{
  "template_id": "string"
}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Create Pay Invoice

Create Pay Invoice create an invoice to allow merchant receive payment

curl -X POST \
	https://pay.sandbox.bnk.to/v1/invoice \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"merchant_id": "string",
		"account_id": "string",
		"amount": {
			"cur": "string",
			"amt": "string"
		},
		"item_id": "string",
		"description": "string",
		"remarks": "string",
		"customer_name": "string",
		"expiry": "int32",
		"attachments": "bytes",
		"payment_method": "PaymentMethod",
		"child_amounts": [
			{
				"cur": "string",
				"amt": "string"
			}
		],
		"sub_merchant_id": "string"
	}'

HTTP Request

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

Body Parameters

Name Type Description
merchant_id string The ID of Merchant
account_id string The destination account ID of merchant
amount Amount the amount of invoice
item_id string The name of ordered item
description string The description of invoice
remarks string Additional remarks of the invoice.
customer_name string The customer name
expiry int32 Expiry (hours) for requested URL
attachments bytes The attachment of invoice
payment_method PaymentMethod The Payment method to pay invoice
child_amounts []Amount The array contains list of child invoice amount
sub_merchant_id string The sub merchant ID to allow platform merchant to create invoice for sub merchant
Objects
Amount
Name Type Description
cur string The Currency Value
amt string The Amount Value
Enums
PaymentMethod
Value Description
UnknownPaymentMethod
Brankas
ShopeePay

Responses

Response body

Name Type Description
url string Invoice URL
expiry Timestamp Expiry time
message string Deprecated
invoice_id string The invoice ID
transaction_id string Transaction ID
children []Child Children invoice if this is the split invoice
Objects
Timestamp
Name Type Description
seconds int64
nanos int32
Child
Name Type Description
invoice_id string The ID of invoice
url string The URL of invoice
status PaymentStatus The status of invoice
amount Amount The total amount of invoice (fee included) - this is what end user will pay
created Timestamp Created date
paid_date Timestamp Paid Date
reference_no string Bank Reference Number
transaction_id string The Direct transaction ID
expiry Timestamp Expiry time of child
user_note_1 string List of children invoice
user_note_2 string List of children invoice
actual_amount Amount The actual amount of invoice (fee excluded) - this is what merchant will receive
fee_amount Amount The invoice’s fee
sub_merchant_id string The invoice’s sub merchant ID
Amount
Name Type Description
cur string The Currency Value
amt string The Amount Value
Enums
PaymentStatus
Value Description
Created
Failed
Success
Expired
Flagged

Example:

{
  "url": "string",
  "expiry": {
    "seconds": "int64",
    "nanos": "int32"
  },
  "message": "string",
  "invoice_id": "string",
  "transaction_id": "string",
  "children": [
    {
      "invoice_id": "string",
      "url": "string",
      "status": "PaymentStatus",
      "amount": {
        "cur": "string",
        "amt": "string"
      },
      "created": {
        "seconds": "int64",
        "nanos": "int32"
      },
      "paid_date": {
        "seconds": "int64",
        "nanos": "int32"
      },
      "reference_no": "string",
      "transaction_id": "string",
      "expiry": {
        "seconds": "int64",
        "nanos": "int32"
      },
      "user_note_1": "string",
      "user_note_2": "string",
      "actual_amount": {
        "cur": "string",
        "amt": "string"
      },
      "fee_amount": {
        "cur": "string",
        "amt": "string"
      },
      "sub_merchant_id": "string"
    }
  ]
}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Report Pay Invoice

Report an invoice as problematic, Pay team will process an verification on this invoice

curl -X PUT \
	https://pay.sandbox.bnk.to/v1/invoice/{InvoiceID}/report \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"invoice_id": "string",
		"attachments": "bytes",
		"description": "string",
		"status": "string"
	}'

HTTP Request

PUT https://pay.sandbox.bnk.to/v1/invoice/{InvoiceID}/report

Query Parameters

Name Type Description
invoice_id string The ID of invoice

Body Parameters

Name Type Description
invoice_id string The ID of invoice
attachments bytes The attachments to identify the problem
description string Description of the issues
status string The expected status of the invoice ( optional)

Responses

Response body

Name Type Description

Example:

{}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Get Invoice List

Return the list of merchant’s invoice

curl -X GET \
	https://pay.sandbox.bnk.to/v1/invoice \
	-H 'Authorization: Bearer USE_YOUR_TOKEN'

HTTP Request

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

Responses

Response body

Name Type Description
start Timestamp
end Timestamp
next string
urls []URLStatus
file CsvFile
Objects
Timestamp
Name Type Description
seconds int64
nanos int32
URLStatus
Name Type Description
invoice_id string The ID of invoice
url string The URL of invoice
status PaymentStatus The status of invoice
amount Amount The total amount of invoice (fee included) - this is what end user will pay
item_id string The ordered item
description string The description
remarks string The additional remarks
created Timestamp Created date
paid_date Timestamp Paid Date
customer_name string Customer name
destination_account_id string Destination Account ID of invoice
reference_no string Bank Reference Number
transaction_id string The Direct transaction ID
raw_qr_data string QR Data for TH Payment
attachments string Additional Attachments
payment_method PaymentMethod Additional Attachments
children []Child List of children invoice
user_note_1 string List of children invoice
user_note_2 string List of children invoice
actual_amount Amount The actual amount of invoice (fee excluded) - this is what merchant will receive
fee_amount Amount The invoice’s fee
sub_merchant_id string The invoice’s sub merchant ID
CsvFile
Name Type Description
filename string
data bytes
size int32
Amount
Name Type Description
cur string The Currency Value
amt string The Amount Value
Child
Name Type Description
invoice_id string The ID of invoice
url string The URL of invoice
status PaymentStatus The status of invoice
amount Amount The total amount of invoice (fee included) - this is what end user will pay
created Timestamp Created date
paid_date Timestamp Paid Date
reference_no string Bank Reference Number
transaction_id string The Direct transaction ID
expiry Timestamp Expiry time of child
user_note_1 string List of children invoice
user_note_2 string List of children invoice
actual_amount Amount The actual amount of invoice (fee excluded) - this is what merchant will receive
fee_amount Amount The invoice’s fee
sub_merchant_id string The invoice’s sub merchant ID
Enums
PaymentStatus
Value Description
Created
Failed
Success
Expired
Flagged
PaymentMethod
Value Description
UnknownPaymentMethod
Brankas
ShopeePay

Example:

{
  "start": {
    "seconds": "int64",
    "nanos": "int32"
  },
  "end": {
    "seconds": "int64",
    "nanos": "int32"
  },
  "next": "string",
  "urls": [
    {
      "invoice_id": "string",
      "url": "string",
      "status": "PaymentStatus",
      "amount": {
        "cur": "string",
        "amt": "string"
      },
      "item_id": "string",
      "description": "string",
      "remarks": "string",
      "created": {
        "seconds": "int64",
        "nanos": "int32"
      },
      "paid_date": {
        "seconds": "int64",
        "nanos": "int32"
      },
      "customer_name": "string",
      "destination_account_id": "string",
      "reference_no": "string",
      "transaction_id": "string",
      "raw_qr_data": "string",
      "attachments": "string",
      "payment_method": "PaymentMethod",
      "children": [
        {
          "invoice_id": "string",
          "url": "string",
          "status": "PaymentStatus",
          "amount": {
            "cur": "string",
            "amt": "string"
          },
          "created": {
            "seconds": "int64",
            "nanos": "int32"
          },
          "paid_date": {
            "seconds": "int64",
            "nanos": "int32"
          },
          "reference_no": "string",
          "transaction_id": "string",
          "expiry": {
            "seconds": "int64",
            "nanos": "int32"
          },
          "user_note_1": "string",
          "user_note_2": "string",
          "actual_amount": {
            "cur": "string",
            "amt": "string"
          },
          "fee_amount": {
            "cur": "string",
            "amt": "string"
          },
          "sub_merchant_id": "string"
        }
      ],
      "user_note_1": "string",
      "user_note_2": "string",
      "actual_amount": {
        "cur": "string",
        "amt": "string"
      },
      "fee_amount": {
        "cur": "string",
        "amt": "string"
      },
      "sub_merchant_id": "string"
    }
  ],
  "file": {
    "filename": "string",
    "data": "bytes",
    "size": "int32"
  }
}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Template List

Get a List of merchant’s template

curl -X GET \
	https://pay.sandbox.bnk.to/v1/template \
	-H 'Authorization: Bearer USE_YOUR_TOKEN'

HTTP Request

GET https://pay.sandbox.bnk.to/v1/template

Responses

Response body

Name Type Description
template []Template
Objects
Template
Name Type Description
template_id string The ID of template
template_name string The name of template
customer_name string Invoice’s customer name
description string Invoice’s description
remarks string Invoice’s additional remarks
destination_account_id string Invoice’s destination account
amount Amount Invoice’s amount
Amount
Name Type Description
cur string The Currency Value
amt string The Amount Value

Example:

{
  "template": [
    {
      "template_id": "string",
      "template_name": "string",
      "customer_name": "string",
      "description": "string",
      "remarks": "string",
      "destination_account_id": "string",
      "amount": {
        "cur": "string",
        "amt": "string"
      }
    }
  ]
}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Update Pay Invoice

Update a flagged Invoice to the end status

curl -X PUT \
	https://pay.sandbox.bnk.to/v1/invoice/{InvoiceID} \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"invoice_id": "string",
		"status": "PaymentStatus",
		"notes": "string",
		"attachments": "bytes"
	}'

HTTP Request

PUT https://pay.sandbox.bnk.to/v1/invoice/{InvoiceID}

Query Parameters

Name Type Description
invoice_id string The ID of invoice

Body Parameters

Name Type Description
invoice_id string The ID of invoice
status PaymentStatus The requested status
notes string Notes is the notes for this update
attachments bytes The attachments to additional information
Enums
PaymentStatus
Value Description
Created
Failed
Success
Expired
Flagged

Responses

Response body

Name Type Description
invoice URLStatus
Objects
URLStatus
Name Type Description
invoice_id string The ID of invoice
url string The URL of invoice
status PaymentStatus The status of invoice
amount Amount The total amount of invoice (fee included) - this is what end user will pay
item_id string The ordered item
description string The description
remarks string The additional remarks
created Timestamp Created date
paid_date Timestamp Paid Date
customer_name string Customer name
destination_account_id string Destination Account ID of invoice
reference_no string Bank Reference Number
transaction_id string The Direct transaction ID
raw_qr_data string QR Data for TH Payment
attachments string Additional Attachments
payment_method PaymentMethod Additional Attachments
children []Child List of children invoice
user_note_1 string List of children invoice
user_note_2 string List of children invoice
actual_amount Amount The actual amount of invoice (fee excluded) - this is what merchant will receive
fee_amount Amount The invoice’s fee
sub_merchant_id string The invoice’s sub merchant ID
Amount
Name Type Description
cur string The Currency Value
amt string The Amount Value
Timestamp
Name Type Description
seconds int64
nanos int32
Child
Name Type Description
invoice_id string The ID of invoice
url string The URL of invoice
status PaymentStatus The status of invoice
amount Amount The total amount of invoice (fee included) - this is what end user will pay
created Timestamp Created date
paid_date Timestamp Paid Date
reference_no string Bank Reference Number
transaction_id string The Direct transaction ID
expiry Timestamp Expiry time of child
user_note_1 string List of children invoice
user_note_2 string List of children invoice
actual_amount Amount The actual amount of invoice (fee excluded) - this is what merchant will receive
fee_amount Amount The invoice’s fee
sub_merchant_id string The invoice’s sub merchant ID
Enums
PaymentStatus
Value Description
Created
Failed
Success
Expired
Flagged
PaymentMethod
Value Description
UnknownPaymentMethod
Brankas
ShopeePay

Example:

{
  "invoice": {
    "invoice_id": "string",
    "url": "string",
    "status": "PaymentStatus",
    "amount": {
      "cur": "string",
      "amt": "string"
    },
    "item_id": "string",
    "description": "string",
    "remarks": "string",
    "created": {
      "seconds": "int64",
      "nanos": "int32"
    },
    "paid_date": {
      "seconds": "int64",
      "nanos": "int32"
    },
    "customer_name": "string",
    "destination_account_id": "string",
    "reference_no": "string",
    "transaction_id": "string",
    "raw_qr_data": "string",
    "attachments": "string",
    "payment_method": "PaymentMethod",
    "children": [
      {
        "invoice_id": "string",
        "url": "string",
        "status": "PaymentStatus",
        "amount": {
          "cur": "string",
          "amt": "string"
        },
        "created": {
          "seconds": "int64",
          "nanos": "int32"
        },
        "paid_date": {
          "seconds": "int64",
          "nanos": "int32"
        },
        "reference_no": "string",
        "transaction_id": "string",
        "expiry": {
          "seconds": "int64",
          "nanos": "int32"
        },
        "user_note_1": "string",
        "user_note_2": "string",
        "actual_amount": {
          "cur": "string",
          "amt": "string"
        },
        "fee_amount": {
          "cur": "string",
          "amt": "string"
        },
        "sub_merchant_id": "string"
      }
    ],
    "user_note_1": "string",
    "user_note_2": "string",
    "actual_amount": {
      "cur": "string",
      "amt": "string"
    },
    "fee_amount": {
      "cur": "string",
      "amt": "string"
    },
    "sub_merchant_id": "string"
  }
}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Update Template

Update a merchant’s template by template ID

curl -X PUT \
	https://pay.sandbox.bnk.to/v1/template/{TemplateID} \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"template_id": "string",
		"template_name": "string",
		"customer_name": "string",
		"description": "string",
		"remarks": "string",
		"destination_account_id": "string",
		"amount": {
			"cur": "string",
			"amt": "string"
		}
	}'

HTTP Request

PUT https://pay.sandbox.bnk.to/v1/template/{TemplateID}

Query Parameters

Name Type Description
template_id string The ID of template

Body Parameters

Name Type Description
template_id string The ID of template
template_name string The name of template
customer_name string Invoice’s customer name
description string Invoice’s description
remarks string Invoice’s additional remarks
destination_account_id string Invoice’s destination account
amount Amount Invoice’s amount
Objects
Amount
Name Type Description
cur string The Currency Value
amt string The Amount Value

Responses

Response body

Name Type Description

Example:

{}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Approve sub merchant request

Approve sub merchant request

curl -X PUT \
	https://pay.sandbox.bnk.to/v1/platform-merchant/approve \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"request_id": "string"
	}'

HTTP Request

PUT https://pay.sandbox.bnk.to/v1/platform-merchant/approve

Body Parameters

Name Type Description
request_id string Request’s ID

Responses

Response body

Name Type Description

Example:

{}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Deny sub merchant request

Deny sub merchant request

curl -X PUT \
	https://pay.sandbox.bnk.to/v1/platform-merchant/deny \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"request_id": "string",
		"note": "string"
	}'

HTTP Request

PUT https://pay.sandbox.bnk.to/v1/platform-merchant/deny

Body Parameters

Name Type Description
request_id string Request’s ID
note string The reason why deny

Responses

Response body

Name Type Description

Example:

{}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Sub Merchant Request

Get the sub merchant request list

curl -X GET \
	https://pay.sandbox.bnk.to/v1/platform-merchant/request \
	-H 'Authorization: Bearer USE_YOUR_TOKEN'

HTTP Request

GET https://pay.sandbox.bnk.to/v1/platform-merchant/request

Responses

Response body

Name Type Description
signup_requests []SignupRequest Request’s ID
total int32 Total is the total number of request on the filter (remove the filter to get all request)
Objects
SignupRequest
Name Type Description
request_id string Request’s ID
name string Merchant’s business name
email_address string Merchant’s email
mobile_country_code string Merchant’s mobile country code
mobile_number string Merchant’s mobile Number
status string Status is request’s status
note string Note is request’s note (platform merchant’s note)
reason string Reason is request’s reason (system’s reason)

Example:

{
  "signup_requests": [
    {
      "request_id": "string",
      "name": "string",
      "email_address": "string",
      "mobile_country_code": "string",
      "mobile_number": "string",
      "status": "string",
      "note": "string",
      "reason": "string"
    }
  ],
  "total": "int32"
}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Sub merchant list

Get the sub merchant list

curl -X GET \
	https://pay.sandbox.bnk.to/v1/platform-merchant/sub-list \
	-H 'Authorization: Bearer USE_YOUR_TOKEN'

HTTP Request

GET https://pay.sandbox.bnk.to/v1/platform-merchant/sub-list

Responses

Response body

Name Type Description
merchant_list []SubMerchant Merchant list is the requested list of sub merchant
total_merchant int32 TotalMerchant is the total number of sub merchant based on the filter (remove the filter to get all active merchant)
total_paid int32 TotalPaid is the total number of paid invoice
total_volume Amount TotalVolume is the total paid invoice volume
Objects
SubMerchant
Name Type Description
id string ID is the ID of sub merchant
name string Name is the name of sub merchant
paid_count int32 PaidCount is the number of paid invoice in the requested time period
volume Amount Volume is the invoice volume in the requested time period
email string Email is the email of sub merchant
mobile_number string MobileNumber is the mobile number of sub merchant
mobile_country_code string MobileCountryCode is the mobile country code of sub merchant
created Timestamp Created date of the sub merchant
Amount
Name Type Description
cur string The Currency Value
amt string The Amount Value
Timestamp
Name Type Description
seconds int64
nanos int32

Example:

{
  "merchant_list": [
    {
      "id": "string",
      "name": "string",
      "paid_count": "int32",
      "volume": {
        "cur": "string",
        "amt": "string"
      },
      "email": "string",
      "mobile_number": "string",
      "mobile_country_code": "string",
      "created": {
        "seconds": "int64",
        "nanos": "int32"
      }
    }
  ],
  "total_merchant": "int32",
  "total_paid": "int32",
  "total_volume": {
    "cur": "string",
    "amt": "string"
  }
}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Unlink a sub merchant

Unlink sub merchant

curl -X PUT \
	https://pay.sandbox.bnk.to/v1/platform-merchant/unlink \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"sub_merchant_id": "string"
	}'

HTTP Request

PUT https://pay.sandbox.bnk.to/v1/platform-merchant/unlink

Body Parameters

Name Type Description
sub_merchant_id string Sub Merchant’s ID

Responses

Response body

Name Type Description

Example:

{}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.

Sign up

Sub merchant sign up

curl -X POST \
	https://pay.sandbox.bnk.to/v1/sub-merchant \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"platform_merchant_id": "string",
		"name": "string",
		"email_address": "string",
		"mobile_number": "string"
	}'

HTTP Request

POST https://pay.sandbox.bnk.to/v1/sub-merchant

Body Parameters

Name Type Description
platform_merchant_id string The platform merchant ID
name string Merchant’s business name
email_address string Merchant’s email
mobile_number string Merchant’s mobile Number

Responses

Response body

Name Type Description
request_id string Request’s ID

Example:

{
  "request_id": "string"
}

Response codes

Status Description
200 Request executed successfully.
404 Returned when the resource is not found.
400 Returned when the request body is malformatted or does not match the expected request.
401 Returned when the request does not contains the user’s credentials.
403 Returned when the user does not have permission to access the resource.
500 Returned when an unexpected error occurred on the server side.