Skip to main content

Overview​

This document describes how to integrate FPS with Oceanpayment via a server-to-server connection, including payment parameter submission, transaction processing, and result delivery.

Flowchart​

Request​

The merchant’s server submits the required parameters via direct integration.

cURL -X POST 'https://test-secure.oceanpayment.com/gateway/directservice/pay'
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'account=995149' \
-d 'terminal=99514901' \
-d 'signValue=6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b' \
-d 'backUrl=https://www.abc.com/back.php' \
-d 'noticeUrl=https://www.abc.com/notice.php' \
-d 'order_number=NO12345678' \
-d 'order_currency=HKD' \
-d 'order_amount=0.01' \
-d 'methods=FPS' \
-d 'order_notes=' \
-d 'billing_firstName=test' \
-d 'billing_lastName=test' \
-d 'billing_email=test@gmail.com' \
-d 'billing_phone=13800138000' \
-d 'billing_country=HK' \
-d 'billing_state=HK' \
-d 'billing_city=Washington D.C.' \
-d 'billing_address=705A big Road' \
-d 'billing_zip=529012' \
-d 'billing_ip=127.0.0.1' \
-d 'productNum=1' \
-d 'productName=Red Dress' \
-d 'productSku=#001' \
-d 'productPrice=0.01' \

Response​

  1. See the full list of response parameters.
<?xml version="1.0" encoding="UTF-8"?>
<response>
<notice_type>transaction</notice_type>
<push_dateTime>2026-11-12 07:25:57</push_dateTime>
<account>995149</account>
<terminal>99514901</terminal>
<signValue>41FE077BA389DB90DEF5EEC70AB2C401D7027D6940F1203700FBAE3CB116BB42</signValue>
<methods>FPS</methods>
<order_number>NO12345678</order_number>
<card_country></card_country>
<order_currency>HKD</order_currency>
<order_amount>0.01</order_amount>
<order_notes></order_notes>
<card_number></card_number>
<card_type></card_type>
<payment_country>HK</payment_country>
<payment_id>231219095247018026021</payment_id>
<payment_authType>0</payment_authType>
<payment_status>-1</payment_status>
<payment_details>80700:Transaction was not finished</payment_details>
<payment_solutions></payment_solutions>
<payment_risk></payment_risk>
<payment_amount></payment_amount>
<payment_exchangeRate></payment_exchangeRate>
<pay_barCode>261586412521R05BU564</pay_barCode>
<pay_userId></pay_userId>
<payment_transactionNetworkId></payment_transactionNetworkId>
<payment_transactionLinkId></payment_transactionLinkId>
</response>
  1. Order status: When payment_status = -1, the order is pending. The merchant should retrieve the FPS QR code parameter pay_barCode and generate a QR code on the payment page for the user to scan and pay.
  2. FPS QR code generation example
  • Use the frontend qrcode package to generate the QR code.
npm install qrcode
  • Pass the complete pay_barCode value directly to the QR code generator. After generating the QR code, scan it with an FPS app to verify it.
const fpsCode = '261586412521R05BU564';

QRCode.toCanvas(document.getElementById('fps-qrcode'), fpsCode, {
width: 200,
errorCorrectionLevel: 'M',
});
  • Add the following to the page:
<canvas id="fps-qrcode"></canvas>

Payment Status​

See Payment Status for details.

Asynchronous Notification​

You also need to receive the transaction’s asynchronous notification via noticeUrl.

Signature​

See Signature Generation and Verification for details.