OVO is an E-Money payment method by OVO. Customers will need to open OVO app after payment request is created via merchant app.
The steps to integrate with OVO are given below.
- Provide phone number input page for OVO payment method on merchant app/website.
- Send the charge API request to Midtrans.
- Handle notifications.
Send a Charge API request with the details of the transaction such as payment_type, ovo, transaction_details, item_details, and customer_details.
OVO does not support custom expiry, as payments are expected to be completed immediately.
OVO Integration Best Practices
OVO does not support custom transaction expiry settings. All OVO payment requests have a fixed expiry time of 60 seconds.
To ensure a smooth payment experience, we strongly recommend merchants to:
- Clearly inform customers about the 60-second payment window on the checkout page.
- Call Get Transaction Status 10 seconds after the expiry window, this needed to ensure the final transaction state is accurately captured even when there's some lag between OVO x Midtrans x Merchant.
OVO Charge API Request
{
"payment_type": "ovo",
"transaction_details": {
"order_id": "test-order-ovo-001",
"gross_amount": 15000
},
"item_details": [
{
"id": "id1",
"price": 15000,
"quantity": 1,
"name": "Brown sugar boba milk tea"
}
],
"customer_details": {
"first_name": "John",
"last_name": "Brandon",
"email": "[email protected]",
"phone": "081111111111"
},
"ovo": {
"payer_phone_number": "081111111111"
}
}| JSON Attribute | Description | Type | Required |
|---|---|---|---|
| payment_type | Set OVO payment method. Value: ovo | String | Required |
| transaction_details | The details of the specific transaction such as order_id and gross_amount. | Object | Required |
| item_details | Details of the item(s) purchased by the customer. | Object | Optional |
| customer_details | Details of the customer. | Object | Optional |
| ovo | Charge details using OVO. | Object | Required |
OVO Charge Response
For OVO payments, a pending transaction status indicates that the transaction has been successfully created. After the transaction is initiated, Midtrans forwards the payment request to OVO. The customer then completes the payment in the OVO application. Once the payment is successful, Midtrans will send a payment notification to the Merchant’s server.
{
"status_code": "201",
"status_message": "Ovo transaction is created",
"transaction_id": "{{midtrans_transaction_id}}",
"order_id": "{{merchant_order_id}}",
"merchant_id": "{{midtrans_merchant_id}}",
"gross_amount": "30000.00",
"currency": "IDR",
"payment_type": "ovo",
"transaction_time": "2025-11-12 14:26:53",
"transaction_status": "pending",
"fraud_status": "accept",
"expiry_time": "2025-11-12 14:27:58",
"payer_phone_number": "08111111111"
}{
"status_code": "404",
"status_message": "User with requested phone number doesn't exist",
"id": "781ea7c4-3fa3-41a3-a27f-a6ac1efc6c7e"
}| JSON Attribute | Description | Type |
|---|---|---|
| status_code | Status code of transaction charge result. | String |
| status_message | Description of transaction charge result. | String |
| transaction_id | Transaction ID given by Midtrans. | String |
| order_id | Order ID specified by you. | String |
| merchant_id | Midtrans merchant ID | String |
| gross_amount | Total amount of transaction in IDR. | String |
| currency | Currency used for payment | String |
| payment_type | Transaction payment method. | String |
| transaction_time | Timestamp of transaction in ISO 8601 format. Time Zone: GMT+7. | String |
| transaction_status | Status of OVO transaction. Possible values arepending, settlement, expire, deny. | String |
| fraud_status | Midtrans fraud engine rule result. Possible values are accept or denied | String |
| expiry_time | Expiration time of the related transactions. | String |
| payer_phone_number | Customer's phone number that will be used to create payment request to OVO. | String |
| merchant_invoice | Unique identifier for payment provider specific request. | String |
NotePossible error codes are 400, 401, 402, 406, 410