NAV Navbar
javascript java swift


OY! Bayar service enables business owners like you to receive payments from customers, either from your Application or independently by sending your Payment URL to your customers.

With quick and easy integration, your business can start accepting payments on Day 1 after registration.

OY! Bayar supports multiple payment methods, including Direct Debit, Credit Cards, and Bank Virtual Accounts.

Quick Integration

To open OY! Bayar webview, use following code from your platform:"", "_blank"); 
Intent intent = new Intent(context, YourWebviewActivity.class);
intent.putExtra("url", "")
let controller = OyWebViewController()
controller.url = ""
let navigationController = UINavigationController(rootViewController: controller)
present(navigationController, animated: true, completion: nil)

Make sure to replace username with your account username, given on the email.

Get Payment URL for your business

Signup for Trial

  1. Register for a unique payment URL here:
  2. You will receive an email containing a unique payment URL for trial version of the checkout page. From here, you can immediately start the integration.

Payment URL for the trial version will have several limitations, including:

You can upgrade to OY! business partner to remove above limitations, by sending reply to the email that you receive. Our team will response your email quickly.

How Does It Work?

Integration flow

  1. Put the logic of opening webview on your app button, so that whenever buyer clicks on "Payment" button, it will open OY! Bayar checkout webview
  2. You implement your own Product details page
  3. You implement your Order System to create transactionId for buyers to checkout their order
  4. Your App/Web opens OY! Bayar Checkout page with additional parameters required
  5. Buyer pays using any of Direct Debit, Credit Cards, or Bank Virtual Accounts.
  6. You receive money on your receiving account and OY! will send Payment status Callback to your end point (note: Only available for non-trial account)

OY! Bayar Webview

Request With Parameters

// note: at most only two of the payment method are false
let params = 'open=true';
params += (txid !== null) ? '&txid='+txid : '';
params += (amount !== null) ? '&amount='+amount : '';
params += (description !== null) ? '&description='+encodeURIComponent(description) : '';
params += (show_contact !== null) ? '&show_contact='+show_contact : '';
params += (show_account !== null) ? '&show_account='+show_account : '';
params += (send_notif !== null) ? '&send_notif='+send_notif : '';
params += (enable_payment_cc !== null) ? '&enable_payment_cc'+enable_payment_cc : '';
params += (enable_payment_va !== null) ? '&enable_payment_va'+enable_payment_va : '';
params += (enable_payment_debit !== null) ? '&enable_payment_debit'+enable_payment_debit : '';"" + params, "_blank"); 

Sample curl command:

curl -X GET -H 'content-type: application/json' -d '{"txid": "partner000001", "amount": 10000, "description": "Mohon dikirim segera", "show_contact": "true", "show_account": "true", "send_notif": "true", "enable_payment_cc": "false", "enable_payment_va": "false", "enable_payment_debit": "true}'

Open this URL as webview to open OY! Bayar Checkout page, optionally with additional parameters.

Open Webview


Query Parameters

Note: Make sure at most only two of the payment method are false

Parameter Default Description
txid not set If set to specific ID, OY! will echo back the transactionID label via the Payment Result Callback (parameter name txid)
amount not set If set to certain amount, will lock the amount of payment that Buyer can pay. Otherwise, Buyer needs to input the amount
description not set If set, description text will be shown the main page of OY! Bayar webview. Otherwise, it will show blank description
show_contact true If set to true, OY! Bayar webview will show Contact Form asking details of the Buyer
show_account true If set to true, OY! Bayar webview will show your bank account number
send_notif true Whether OY! should send payment notification to the Buyer via SMS/Push Notif
enable_payment_cc true Whether OY! should enable payment using Credit Card
enable_payment_va true Whether OY! should enable payment using Bank Virtual Accounts
enable_payment_debit true Whether OY! should enable payment using Direct Debit

Payment Result Callback

The above command returns JSON structured similar like this:

  "txid": "partner000001",
  "oy_txid": "1234567",
  "nominal": 10000,
  "name": "Joko Widodo",
  "phone_number": "+6281111111",
  "note": "Mohon dikirim segera",
  "result": "success",
  "sender_bank": "008",
  "payment_method": "Instant Pay"

Non-trial Account can register specific end point URL (web hook) to receive callback whenever payment occurs.

Callback Parameters

The data on the callback will be sent using JSON format via POST data to your web hook. Check here for example: example

Parameter Type Description
txid String (Optional) TransactionID which partner set on the initial OY! Bayar URL
oy_txid String Internal TransactionID from OY! system
nominal BigDecimal Amount of payment by the Buyer
name String Name of Buyer
phone_number String Phone Number of Buyer
note String (Optional) This is note from the Buyer
result String Payment Status of Buyer. Can be either "success" or "failed" or "processing"
sender_bank String Bank code used by buyer to do payment
payment_method String Define what payment method to be used in transaction (Instant Pay/Manual Pay/Manual Bank Transfer)*
va_number String VA number to be used on payment if using Manual Pay

*Instant Pay = direct-debit or cc; Manual Pay = virtual account; Manual Bank Transfer = pay using manual transfer

Response Codes

Possible status codes on the Payment Result Callback:

Payment Status Type Meaning
success String Payment by Buyer is successful and has been sent to your bank account
failed String Payment by Buyer is failed