Skip to main content

Overview

This document describes in detail the common parameters and business parameter Formats, rules, and requirements required when calling all order management API interfaces. Please read it carefully before initiating any requests.

Invocation flow

All API Calls Require

This section covers the common parameters required by all interfaces, usually related to authentication, signatures, and basic billing inFormation.

ParameterTypeLengthRequiredDescriptionExample
accountstring6RequiredOceanpayment account number
terminalstring8-12RequiredOceanpayment terminal number
signValuestring64RequiredSecurity signature to validate the request, SHA256 encrypted

Order Status Query

ParameterTypeLengthRequiredDescriptionExample
order_numberstring1-50RequiredWebsite order number
A maximum of 100 transactions can be queried at a time,
with each transaction separated by a comma (",").

Successful Orders Query

ParameterTypeLengthRequiredDescriptionExample
order_beginDatestring19RequiredStart time
  • Format: yyyy-mm-dd HH:mm:ss
order_endDatestring19RequiredEnd time
  • Format: yyyy-mm-dd HH:mm:ss
pagesstring5OptionalPagination

Business Orders Query

ParameterTypeLengthRequiredDescriptionExample
order_beginDatestring19RequiredStart time
  • Format: yyyy-mm-dd HH:mm:ss
order_endDatestring19RequiredEnd time
  • Format: yyyy-mm-dd HH:mm:ss
pagesstring5OptionalPagination
countstring3OptionalNumber of records per page
- Default 10 records
  • 10: 10 records
  • 50: 50 records
  • 100: 100 records
date_typestring3OptionalDate type
- Default 0
  • 0: Review time
  • 1: Transaction time
  • 2: Exception time

Disputed Orders Query

ParameterTypeLengthRequiredDescriptionExample
order_beginDatestring19RequiredStart time
  • Format: yyyy-mm-dd HH:mm:ss
order_endDatestring19RequiredEnd time
  • Format: yyyy-mm-dd HH:mm:ss
notice_typestring0-50OptionalDisputed type
  • Default: query all
  • disputes-period: Disputes period
  • dispute: Dispute
payment_idstring0-50OptionalPayment ID, the unique payment number assigned by Oceanpayment
order_numberstring0-50OptionalMerchant’s order ID

Pre-Authorization

ParameterTypeLengthRequiredDescriptionExample
payment_idstring1-50RequiredPayment ID, the unique payment number assigned by Oceanpayment
order_amountstring0-50OptionalAuthorization amount
  • If the amount is not provided, it is treated as a full authorization
payment_authTypestring1RequiredAuthorization type
  • 1: Confirm authorization
  • 2: Cancel authorization
  • 3: Reverse (only supported for offline WeChatPay and Alipay scenarios)

Refund Request

ParameterTypeLengthRequiredDescriptionExample
payment_idstring0-50RequiredPayment ID, the unique payment number assigned by Oceanpayment
refund_numberstring0-50OptionalMerchant internal refund transaction number
refund_typestring1RequiredRefund type
  • 1: Full refund
  • 2: Partial refund
refund_amountstring1-10RequiredRefund amount
refund_descriptionstring1-100RequiredRefund description
refund_referencestring0-50OptionalMerchant internal refund reference number

Refund Query

ParameterTypeLengthRequiredDescriptionExample
refund_idstring1-500ConditionsRefund ID, the unique refund number assigned by Oceanpayment
  • Refund request response fields
  • With refund_number pick one of two
refund_numberstring1-50ConditionsMerchant internal refund transaction number
  • With refund_id pick one of two

Tracking Numbers Upload

ParameterTypeLengthRequiredDescriptionExample
payment_idstring1-50ConditionsPayment ID, the unique payment number assigned by Oceanpayment
  • With order_number pick one of two
order_numberstring1-50ConditionsMerchant’s order ID
  • With payment_id pick one of two
tracking_numberstring1-200OptionalTracking number
  • Uploading the same payment_id again will overwrite the previous tracking number
  • If an order has multiple tracking numbers, separate them with a comma (",")
tracking_sitestring1-100RequiredTracking information website
tracking_handlerstring1-15RequiredTracking information added by

Customs Submission

ParameterTypeLengthRequiredDescriptionExample
typestring0-500OptionalSubmission type
Each order can successfully initiate a customs submission request only once. To resend, set type = 2.
  • 1: Customs submission
  • 2: Resubmit (Retry submission)
payment_idstring0-50OptionalPayment ID, the unique payment number assigned by Oceanpayment
pay_userIdstring0-50OptionalID card
pay_userNamestring0-50OptionalName
pricestring1-100RequiredPrice
total_amountstring1-100RequiredTotal amount
customsstring1-100RequiredCustoms code
customs_numberstring1-100RequiredMerchant customs registration number
customs_namestring1-100RequiredMerchant customs registration name
sub_order_numberstring0-100OptionalMerchant sub-order number (required for split orders)
shipping_feestring1-100RequiredLogistics fee
order_notesstring0-500OptionalRemark

Health Examination

ParameterTypeLengthRequiredDescriptionExample
sitestring1-500RequiredThe primary domain name currently used by the website, without https://
keystring0-256OptionalOceanpayment Public Key

Card Bin Verification

ParameterTypeLengthRequiredDescriptionExample
card_binobject-RequiredFirst 6 digits of the card BIN
  • A maximum of 100 card numbers can be queried at a time