Skip to main content

Overview

Integration and tokenization flow for other alternative payments, applicable to payment products such as Klarna and Alipay+.

Before You Start

Notes

Before integration, please review the list of alternative payments that support recurring charges.

How It Works

  1. Set Request Headers:
'Content-Type:application/json',
'account:995149',
'terminal:99514901',
'secureCode:12345678'
  1. Call Oceanpayment to create a QuickPay ID, submitting the required parameters:
cURL -X POST 'https://checkout-s.oceanpayment.com/pg/quickPay/create' \
-d
{
"order": {
"currency": "USD",
"amount": "0.1",
"methods": "{methods}",
"redirectUrl": "http://www.abc.com/result.php",
"notifyUrl": "http://www.abc.com/notice.php",
"remark": "",
"ip": "127.0.0.1",
"description": ""
},
"merchant": {
"referenceId": "test20250116094234"
},
"billing": {
"firstname": "firstName",
"lastname": "lastName",
"email": "test@op.com",
"phone": "13800138000",
"country": "US",
"state": "state",
"city": "city",
"address": "address",
"zip": "518000"
},
"customer": {
"id": "test20250116094234"
},
"device": {
"environment": "",
"osType": ""
}
}

Handling the Response

  1. url: The redirect URL. Merchants must redirect the user’s browser to this URL, where the user completes authorization on the frontend.
  • When url is not empty:A page redirect is required. The user completes authorization on the frontend, and the result of the QuickPay ID creation is returned after authorization (delivered via redirectUrl, using POST by default).
  • When url is empty:The response data directly contains the result of the QuickPay ID creation.
{
"msg": "SUCCESS",
"code": "000",
"data": {
"account": "995149",
"terminal": "99514901",
"order": {
"methods": "Klarna",
"referenceId": "250117093828061010584",
"remark": "",
"description": ""
},
"url": "https://checkout.oceanpayment.com/bank/quickPay/create?opRefId=250117093828061010584",
"merchant": {
"referenceId": "test20250117093730"
}
}
}
  • The merchant redirects the user to the url to complete the creation process.
HTTP/1.2 301 Moved Permanently
Location: {url}
  • Use the redirectUrl parameter to receive the result of the QuickPay ID creation:
Array
(
[code]=> 000
[message] => SUCCESS
[account] => 995290
[terminal] => 99529001
[signature] => F03C3D5154FC2672C5EC05BAD3DDDF0892617CC1517517DCD37E6499AA896D73
[card_number] => 411111***1111
[card_type] => USD
[order_amount] => 0.01
[order_notes] =>
[card_number] =>
[card_type] => null
[card_country] => US
[order_currency] => USD
[order_amount] => 0.01
[order_methods] =>
[order_reference_id] => 250214134817000529042
[order_remark] =>
[merchant_reference_id] => 12345678
[quickpay_id] => 6cdf6ebf-86c9-41ae-aee5-623ce3d48d22
[quickpay_status] => 1
)
  1. View the result of the QuickPay ID creation.
  2. The merchant saves the returned quickpay_id (in UUID format) to initiate quick/recurring payments.

Signature

See Signature and Verification for details on request signing and response validation.

API Reference

👉Explore our to continue your integration.