BPI
The Bank of the Philippine Islands is a universal bank in the Philippines. It is the first bank in both the Philippines and Southeast Asia . It is the fourth largest bank in terms of assets, the second largest bank in terms of market capitalization , and one of the most profitable banks in the Philippines.
Features
Processing currencies | PHP |
---|---|
Settlement currencies | GBP,USD,EUR,HKD |
Minimum transaction amount | 1 PHP |
Maximum transaction amount | No Transaction Limit |
Refunds | ✅ |
Partial Refunds | ✅ |
Multiple partial refund | ❌ |
Chargeback | ❌ |
Integration Method
Payment method enumeration values: bpi
There is integration method for BPI
- Direct API
- Checkout
Direct API
How to integration
For direct API integration, you can create a PaymentIntent and get url in only one step. The following is the demo of creating payment intent:
Create a PaymentIntent
A PaymentIntent is an object that represents your intent to collect payment from your customer and tracks the lifecycle of the payment process. Create a PaymentIntent on your server and specify the amount to collect and a supported currency. If you have an existing Payment Intents integration, add bpi
to the list of payment method types.
Request Create a PaymentIntent
{
"amount":200,
"currency":"PHP",
"confirm":true,
"payment_method_options":{
"bpi":{
"terminal_type":"WEB"
}
},
"payment_method_data" : {
"type":"bpi"
},
"return_url":"https://wooshpay.com"
}
Response
{
"id": "pi_1760510659914629120",
"object": "payment_intent",
"created": 1708573425000,
"livemode": false,
"currency": "PHP",
"amount": 200,
"status": "requires_action",
"client_secret": "pi_1760510659914629120_secret_tGWOOrEjkw78eVmbVdloC5ue",
"next_action": {
"type": "bpi_handle_redirect",
"bpi_handle_redirect": {
"url": "https://XXXXXXXXXXXXXXX"
}
},
"payment_method_types": [
"bpi"
],
"confirmation_method": "automatic",
"payment_method_options": {
"bpi": {
"terminal_type": "WEB"
}
},
"return_url": "https://wooshpay.com",
"payment_method": "pm_1760510659805577216",
"capture_method": "automatic"
}
Checkout
Payment flow
- Customer selects BPI from the list of payment methods available and clicks on the Pay botton
- Customers will be redirected to BPI login page
- The Customers completes payment within BPI
- Payment succeeds and the client is redirected back to the page you designated
Create a Session
Request
{
"cancel_url": "www.wooshpay.com",
"mode": "payment",
"success_url": "https://wooshpay.com/",
"payment_method_types": [
"bpi"
],
"line_items": [
{
"price_data": {
"currency": "PHP",
"unit_amount": 20000,
"nickname": "apple",
"product_data": {
"name": "apple",
"description": "very delicious",
"url": "www.wooshpay.com"
},
"billing_scheme": "testscheme",
"lookup_key": "test_lookup_key"
},
"quantity": 1
}
]
}
Response
{
"id": "cs_1760509695786745856",
"object": "checkout.session",
"created": 1708573195000,
"livemode": false,
"currency": "PHP",
"customer": "",
"mode": "payment",
"status": "open",
"url": "https://checkouttest.wooshpay.com/pay/cs_test_1760509695786745856?key=cGtfdGVzdF9OVEUyTmpnMU1EZ3dORFV6T1RZNE1EYzJPREF4T205T2EzcGpOMDQzVTJkWVdFODRWVmhHWm1GNGNUaHZUVEUyT0RZMk16Z3lPVFl6TWpV",
"cancel_url": "www.wooshpay.com",
"line_items": {
"object": "list",
"data": [
{
"id": "li_1760509696038404096",
"object": "item",
"currency": "PHP",
"description": "apple",
"price": {
"id": "price_1760509696063569920",
"object": "price",
"created": 1708573195000,
"livemode": false,
"active": false,
"currency": "PHP",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"nickname": "apple",
"product": {
"id": "prod_1760509696109707264",
"object": "product",
"created": 1708573195000,
"livemode": false,
"active": false,
"description": "very delicious",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"name": "apple",
"url": "www.wooshpay.com",
"updated": 1708573195000
},
"type": "one_time",
"unit_amount": 20000,
"billing_scheme": "per_unit",
"lookup_key": "test_lookup_key"
},
"quantity": 1,
"amount_subtotal": 20000,
"amount_total": 20000
}
]
},
"payment_intent": "pi_1760509699062497280",
"payment_method_types": [
"bpi"
],
"payment_status": "unpaid",
"success_url": "https://wooshpay.com/",
"amount_subtotal": 20000,
"amount_total": 20000,
"billing_address_collection": "auto",
"expires_at": 1708659594825,
"payment_link": "",
"client_secret": "pi_1760509699062497280_secret_Te6RNLDlf7EwAR14EARVxUSU",
"customer_creation": "if_required"
}
Next step
You can add more features to your integration as needed
Webhook
Listen to events on your WooshPay account so your integration can automatically trigger reactions. Create a webhook that mainly focuses on enabled_events and url.
Refund
Create a refund to repay funds to your customer. You can also perform partial refunds, but not every payment method supports them. A partial refund is when you refund only part of the original transaction amount.