OVO

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.

  1. Provide phone number input page for OVO payment method on merchant app/website.
  2. Send the charge API request to Midtrans.
  3. 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:

  1. Clearly inform customers about the 60-second payment window on the checkout page.
  2. 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 AttributeDescriptionTypeRequired
payment_typeSet OVO payment method. Value: ovoStringRequired
transaction_detailsThe details of the specific transaction such as order_id and gross_amount.ObjectRequired
item_detailsDetails of the item(s) purchased by the customer.ObjectOptional
customer_detailsDetails of the customer.ObjectOptional
ovoCharge details using OVO.ObjectRequired

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 AttributeDescriptionType
status_codeStatus code of transaction charge result.String
status_messageDescription of transaction charge result.String
transaction_idTransaction ID given by Midtrans.String
order_idOrder ID specified by you.String
merchant_idMidtrans merchant IDString
gross_amountTotal amount of transaction in IDR.String
currencyCurrency used for paymentString
payment_typeTransaction payment method.String
transaction_timeTimestamp of transaction in ISO 8601 format. Time Zone: GMT+7.String
transaction_statusStatus of OVO transaction. Possible values are
pending, settlement, expire, deny.
String
fraud_statusMidtrans fraud engine rule result. Possible values are accept or deniedString
expiry_timeExpiration time of the related transactions.String
payer_phone_numberCustomer's phone number that will be used to create payment request to OVO.String
merchant_invoiceUnique identifier for payment provider specific request.String

📘

Note

Possible error codes are 400, 401, 402, 406, 410