Skip to main content

Overview

Oceanpayment uses a server-to-server (S2S) asynchronous notification (Webhook) mechanism to proactively push payment results to the merchant's specified endpoint.

Webhook

A webhook provides a reliable, real-time way to update order status. Merchants must properly receive and handle these notifications to ensure the final consistency of order statuses.

const express = require('express');
const bodyParser = require('body-parser');
const xml2js = require('xml2js');

const app = express();
const PORT = 8080;

app.use(bodyParser.text({
type:'application/xml'
}));

app.post('/payment/notify', async(req, res) => {
const xml = req.body;
});

Notification Types

Oceanpayment supports multiple types of webhook notifications to meet different business scenarios:

📢

Payment Notifications

Real-time updates on payment status changes, such as successful or failed transactions.

View

🧾

Business Orders

Notifications sent when an order encounters exceptional situations, such as refunds or chargebacks.

View

🛃

Customs Reporting

Notifications triggered by exceptional order situations, such as refunds or chargebacks, for customs reporting purposes.

View

🔔

OPCard

Configure and manage OPCard notification events.

View