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
accountstring6YesOceanpayment account number
terminalstring8-12YesOceanpayment terminal number
signValuestring64YesSecurity signature to validate the request, SHA256 encrypted

Order Status Query

ParameterTypeLengthRequiredDescriptionExample
order_numberstring1-50YesWebsite 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_beginDatestring19YesStart time
  • Format: yyyy-mm-dd HH:mm:ss
order_endDatestring19YesEnd time
  • Format: yyyy-mm-dd HH:mm:ss
pagesstring5NoPagination

Business Orders Query

ParameterTypeLengthRequiredDescriptionExample
order_beginDatestring19YesStart time
  • Format: yyyy-mm-dd HH:mm:ss
order_endDatestring19YesEnd time
  • Format: yyyy-mm-dd HH:mm:ss
pagesstring5NoPagination
countstring3NoNumber of records per page
- Default 10 records
  • 10: 10 records
  • 50: 50 records
  • 100: 100 records
date_typestring3NoDate type
- Default 0
  • 0: Review time
  • 1: Transaction time
  • 2: Exception time

Disputed Orders Query

ParameterTypeLengthRequiredDescriptionExample
order_beginDatestring19YesStart time
  • Format: yyyy-mm-dd HH:mm:ss
order_endDatestring19YesEnd time
  • Format: yyyy-mm-dd HH:mm:ss
notice_typestring0-50NoDisputed type
  • Default: query all
  • disputes-period: Disputes period
  • dispute: Dispute
payment_idstring0-50NoPayment ID, the unique payment number assigned by Oceanpayment
order_numberstring0-50NoMerchant’s order ID

Pre-Authorization

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

Refund Request

ParameterTypeLengthRequiredDescriptionExample
payment_idstring0-50YesPayment ID, the unique payment number assigned by Oceanpayment
refund_numberstring0-50NoMerchant internal refund transaction number
refund_typestring1YesRefund type
  • 1: Full refund
  • 2: Partial refund
refund_amountstring1-10YesRefund amount
refund_descriptionstring1-100YesRefund description
refund_referencestring0-50NoMerchant 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-200NoTracking 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-100YesTracking information website
tracking_handlerstring1-15YesTracking information added by

Customs Submission

ParameterTypeLengthRequiredDescriptionExample
typestring0-500NoSubmission 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-50NoPayment ID, the unique payment number assigned by Oceanpayment
pay_userIdstring0-50NoID card
pay_userNamestring0-50NoName
pricestring1-100YesPrice
total_amountstring1-100YesTotal amount
customsstring1-100YesCustoms code
customs_numberstring1-100YesMerchant customs registration number
customs_namestring1-100YesMerchant customs registration name
sub_order_numberstring0-100NoMerchant sub-order number (required for split orders)
shipping_feestring1-100YesLogistics fee
order_notesstring0-500NoRemark

Health Examination

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

Card Bin Verification

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