BE Merchants. Transactions (1.6.1)
Download OpenAPI specification:Download
BillEase Merchants. Transactions API
Documentation: https://docs.billease.ph/
1.6.1 - Update Get installments plans
method
Get transaction status
Get transaction status
Authorizations:
path Parameters
id required | string Transaction ID |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "created": "2018-02-10T19:30:25.000+08:00",
- "current_time": "2018-02-10T19:32:25.000+08:00",
- "status": "PND",
- "order_id": "xys-12",
- "message": "Any message from BillEase system"
}
Update transaction
Update transaction information
Authorizations:
path Parameters
id required | string Transaction ID |
Request Body schema: application/json
Update transaction
order_id required | string Order ID |
status | any Enum: "OK" "CAN" Order status:
|
message | string Message from the merchant. System will show this message on the BillEase checkout page |
Responses
Request samples
- Payload
{- "order_id": "order-123",
- "status": "OK"
}
Response samples
- 200
- 400
- 401
- 500
{- "message": "OK"
}
Create transaction
- Start transaction
- Forward customer to the BillEase checkout page
Authorizations:
Request Body schema: application/json
Information about Transaction
shop_code required | string Shop UUID code |
amount required | number Transaction amount |
currency required | string Currency. 'PHP' - default currency |
required | Array of objects (Root Type for trxItems) Items |
Array of objects (Root Type for trxSellers) Sellers | |
required | object (Root Type for trxCustomer) Customer |
callbackapi_url | string Merchant callback API. Required if |
checkout_type required | any Enum: "standard" "quick" "qr" Checkout type |
order_id required | string Order ID |
url_redirect required | string URL on the merchant's site for redirecting after transaction finish |
dp_type | string Enum: "cs" "be" "me" Type of down payment:
|
callback_url_token | string If this is first transaction from the client he can save the BillEase account data in the merchant's system for further payments. BillEase will send the customer's token to this callback API |
installment_plan_id | string ID of the preferable installment plan |
is_async | boolean Is transaction async? means we will wait for merchant callback. Defaults to |
expires_at | string <date-time> Custom transaction expiration date/time |
failed_url_redirect | string URL to redirect to when transaction is cancelled/rejected |
Responses
Request samples
- Payload
{- "shop_code": "D5103E13-3EEC-44C3-A1B3-AE02592C4C43",
- "amount": 20000,
- "currency": "PHP",
- "checkout_type": "standard",
- "items": [
- {
- "code": "SKU123e4567",
- "item": "iPhone Xs",
- "price": 10000,
- "quantity": 1,
- "currency": "PHP",
- "category": "mobile",
- "seller_code": "ALPHABET123",
- "item_type": "item"
}, - {
- "code": "SKU123e4568",
- "item": "MacBook Pro",
- "price": 10000,
- "quantity": 1,
- "currency": "PHP",
- "category": "mobile",
- "seller_code": "ALPHABET123",
- "item_type": "item"
}
], - "sellers": [
- {
- "code": "ALPHABET123",
- "seller_name": "Alphabet inc.",
- "phone": "+639054196316",
- "country": "PH",
- "province": "NRC",
- "city": "Manila",
- "barangay": "Makati",
- "street": "Paseo de Roxas 104",
- "address": "Address in one line"
}
], - "customer": {
- "full_name": "Vitalii Sharavara",
- "phone": "+639054194316",
- "internal_user_id": "12345",
- "adr_billing": {
- "addr_type": "billing",
- "country": "PHP",
- "province": "NCR",
- "city": "Manila",
- "barangay": "Makati",
- "street": "Paseo de Roxas 104",
- "address": "Address in one line"
}, - "adr_shipping": {
- "addr_type": "shipping",
- "country": "PHP",
- "province": "NCR",
- "city": "Manila",
- "barangay": "Makati",
- "street": "Paseo de Roxas 104",
- "address": "Address in one line"
}
}, - "order_id": "ORDER-23"
}
Response samples
- 200
- 400
- 401
- 500
{- "trxid": "123e4567-e89b-12d3-a456-426655440000",
- "status": "PND",
- "created": "2018-02-10T19:30:25.000+08:00",
- "ttl": 360
}
Response samples
- 200
- 401
- 500
{- "amount": 0,
- "currency": "string",
- "items": [
- {
- "id": 1,
- "code": "SKU123e4567",
- "item": "iPhone Xs",
- "price": 10000,
- "quantity": 1,
- "currency": "PHP",
- "category": "mobile",
- "seller_code": "ALPHABET123",
- "item_type": "item"
}
], - "sellers": [
- {
- "code": "ALPHABET123",
- "seller_name": "Alphabet inc.",
- "phone": "+639054196316",
- "country": "PH",
- "province": "NRC",
- "city": "Manila",
- "barangay": "Makati",
- "street": "Paseo de Roxas 104",
- "address": "Address in one line"
}
], - "customer": {
- "full_name": "Vitalii Sharavara",
- "phone": "+639054194316",
- "internal_user_id": "12345",
- "adr_billing": {
- "addr_type": "billing",
- "country": "PHP",
- "province": "NCR",
- "city": "Manila",
- "barangay": "Makati",
- "street": "Paseo de Roxas 104",
- "address": "Address in one line"
}, - "adr_shipping": {
- "addr_type": "shipping",
- "country": "PHP",
- "province": "NCR",
- "city": "Manila",
- "barangay": "Makati",
- "street": "Paseo de Roxas 104",
- "address": "Address in one line"
}
}, - "callbackapi_url": "string",
- "checkout_type": "standard",
- "order_id": "string",
- "url_redirect": "string",
- "installment_paln_id": "string",
- "down_payment": {
- "amount": 1000.53,
- "dp_type": "cash"
}, - "callback_url_token": "string",
- "created": "2019-08-24T14:15:22Z",
- "other_amounts": {
- "loan_amount": 8000.55,
- "cashout_amount": 2000.3,
- "net_proceeds_amount": 6930.35,
- "refund_amount": 1000.2,
- "merchant_fee_amount": 70
}, - "merchant_code": "string",
- "shop_code": "string",
- "is_async": true
}
Refund items
This operation refunds one or more items from the transaction
Authorizations:
path Parameters
id required | string Transaction ID |
Request Body schema: application/json
Refund Items
items | Array of integers non-empty unique Array of ids |
reason_refund | string Refund reason |
amount | number Amount to be refunded |
Responses
Request samples
- Payload
{- "items": [
- 44,
- 11
], - "reason_refund": "Defective products"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "refund_id": "57237c50-fac8-43ab-ace3-c3f045c04716",
- "refund_time": "2022-01-14 15:58:51+0800",
- "status": "pending"
}
Get Transaction history
This method returns history by statuses
Authorizations:
path Parameters
id required | string Transaction code |
Responses
Response samples
- 200
- 401
- 500
[- {
- "created": "2019-08-06 15:30:43+0800",
- "status": "PND"
}, - {
- "created": "2019-09-26 15:21:27+0800",
- "status": "CAN"
}
]
Get Transactions
Authorizations:
query Parameters
status | string Transaction status; allows multiple statuses: comma separated
|
shop | string Shop code |
checkout_type | string Enum: "standard" "short" "fast" "qr" Checkout type |
date_from | string <date> Get transaction range: from date |
date_to | string <date> Get transaction range: to date |
order_by | string Enum: "created" "status" "shop_code" "merchant_code" "checkout_type" "code" "order_id" "amount" Order results by, add a prefix "-" for DESCENDING order |
Responses
Response samples
- 200
- 401
- 500
{- "pages": {
- "count": 75,
- "previous": 4,
- "current": 5,
- "next": 6
}, - "result": [
- {
- "amount": 0,
- "currency": "string",
- "items": [
- {
- "id": 1,
- "code": "SKU123e4567",
- "item": "iPhone Xs",
- "price": 10000,
- "quantity": 1,
- "currency": "PHP",
- "category": "mobile",
- "seller_code": "ALPHABET123",
- "item_type": "item"
}
], - "sellers": [
- {
- "code": "ALPHABET123",
- "seller_name": "Alphabet inc.",
- "phone": "+639054196316",
- "country": "PH",
- "province": "NRC",
- "city": "Manila",
- "barangay": "Makati",
- "street": "Paseo de Roxas 104",
- "address": "Address in one line"
}
], - "customer": {
- "full_name": "Vitalii Sharavara",
- "phone": "+639054194316",
- "internal_user_id": "12345",
- "adr_billing": {
- "addr_type": "billing",
- "country": "PHP",
- "province": "NCR",
- "city": "Manila",
- "barangay": "Makati",
- "street": "Paseo de Roxas 104",
- "address": "Address in one line"
}, - "adr_shipping": {
- "addr_type": "shipping",
- "country": "PHP",
- "province": "NCR",
- "city": "Manila",
- "barangay": "Makati",
- "street": "Paseo de Roxas 104",
- "address": "Address in one line"
}
}, - "callbackapi_url": "string",
- "checkout_type": "standard",
- "order_id": "string",
- "url_redirect": "string",
- "installment_paln_id": "string",
- "down_payment": {
- "amount": 1000.53,
- "dp_type": "cash"
}, - "callback_url_token": "string",
- "created": "2019-08-24T14:15:22Z",
- "other_amounts": {
- "loan_amount": 8000.55,
- "cashout_amount": 2000.3,
- "net_proceeds_amount": 6930.35,
- "refund_amount": 1000.2,
- "merchant_fee_amount": 70
}, - "merchant_code": "string",
- "shop_code": "string",
- "is_async": true
}
]
}
Get account info
Get information about customer's BillEase account
Authorizations:
path Parameters
token_id required | string Customer's token ID |
Request Body schema: application/json
Token
token required | string Token |
Responses
Request samples
- Payload
{- "token": "dsjhkfksjhdf3298shkjdfh38924ybsdfjk"
}
Response samples
- 200
- 400
- 401
- 500
{- "status": "active",
- "limit": 70001.31,
- "currency": "PHP",
- "message": "some message from BillEase"
}
Deactivate connection
Deactivate the connection with customer's Billiease account
Authorizations:
path Parameters
token_id required | string Customer's token ID |
Request Body schema: application/json
Token
token required | string Token |
Responses
Request samples
- Payload
{- "token": "dsjhkfksjhdf3298shkjdfh38924ybsdfjk"
}
Response samples
- 200
- 400
- 401
- 500
{- "message": "Deactivated"
}
Get installment plans
Get available options for the installment
Authorizations:
Request Body schema: application/json
Installment request
amount required | number <double> Total items amount |
currency | string Currency.
|
Array of objects (Root Type for instItem) Items | |
allow_downpayment | boolean Include donpayment options or not.
|
Responses
Request samples
- Payload
{- "amount": 4000,
- "items": [
- {
- "id": "xyz",
- "name": "iPhone",
- "price": 4000,
- "type": "mobile",
- "quantity": 1,
- "seller_id": "ABBY"
}
], - "allow_downpayment": false
}
Response samples
- 200
- 400
- 401
- 500
{- "id": 1,
- "name": "Fast and Easy (3 month)",
- "description": "Super easy installment. Buy now pay later",
- "currency": "PHP",
- "amount": 4000,
- "down_payments": [
- 0
], - "tenures": [
- 1,
- 2,
- 3
], - "installments": [
- [
- 4220,
- 2200,
- 1513
]
], - "loan_amount": [
- [
- 4220,
- 4400,
- 4539
]
]
}
Get CSV report
Authorizations:
query Parameters
status | string Transaction status |
shop | string Shop code |
checkout_type | Array of strings Checkout type |
date_from | string <date> Get transaction range: from date |
date_to | string <date> Get transaction range: to date |
Responses
Response samples
- 200
- 401
- 500
""
Get transaction statistics
Authorizations:
query Parameters
date_from required | string <date> Get transaction range: from date |
date_to required | string <date> Get transaction range: to date |
Responses
Response samples
- 200
- 401
- 500
[- {
- "date": "2018-01-17",
- "transactions": 39
}, - {
- "date": "2018-01-18",
- "transactions": 8
}
]
Get detailed transaction statistics
Authorizations:
query Parameters
date_from | string <date> Get transaction range: from date |
date_to | string <date> Get transaction range: to date |
Responses
Response samples
- 200
- 401
- 500
[- {
- "date": "2018-01-17",
- "APR": 42,
- "CAN": 36,
- "EXP": 63,
- "HOL": 3,
- "PND": 79,
- "REJ": 27
}, - {
- "date": "2018-01-17",
- "APR": 65,
- "CAN": 4,
- "EXP": 88,
- "HOL": 26,
- "PND": 92,
- "REJ": 48
}
]