Skip to main content

Overview

This document provides a detailed reference for all common and business parameters required when integrating with Oceanpayment APIs. It covers parameter formats, rules, and usage guidelines to ensure smooth API calls. Review these details before making API requests.

Request Flow

Request Parameters

All API Calls Require

Note

These parameters are mandatory for all API calls, usually related to authentication, request signing, and basic billing information.

ParameterTypeLengthRequiredDescriptionExample
accountstring6RequiredOceanpayment account number995149
terminalstring8-12RequiredOceanpayment terminal number99514901
signValuestring64RequiredSecurity signature to validate the request, SHA256 encrypted2f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
keystring64ConditionalOceanpayment public key
  • Embedded-(required for embedded credit card integration)
9c4f2a8d7e1b3c5f6a0d9e2b4c7f1a3d5e6b8c0f2a1d9e3c7b5f4a2d6e8c1f0a3b7d9e2c5f1a6b8d0c3e7f4a2b9c1d6e8f0a3b5c7d9e2f1a6c8b4d0e3f7a9c1b5d6e8f2a3c7b1d9e0f4a6c8b2d3e5f7a9c1d0b4e6f8a2c3d7b9e1f0a5c6d8b2e3f7a9c1d4b6e8f0a2c3d5b7e9f1a4c6d8e0b2f3a5c7d9e1f4a6b8c0d2e3f5a7b9c1d4e6f8a0c2d3b5e7f9a1c4d6e8b0f2a3c5d7e9f1a4b6c8d0e2f3a5b7c9d1e4f6a8b0c2d3e5f7a9
backUrlstring1-500RequiredURL where the synchronous payment result will be returnedhttps://example.com/callback
noticeUrlstring1-500OptionalServer callback URL for asynchronous payment notifications and other updateshttps://example.com/notify
methodsstring1-50RequiredPayment methodCredit Card
order_numberstring1-50RequiredMerchant’s order ID123456789
order_currencystring3RequiredTransaction currency USD
order_amountstring1-10RequiredTransaction amount
  • Up to 2 decimal places (e.g., 1.00)
  • No transaction is needed if amount is 0
1.00

Billing Information

ParameterTypeLengthRequiredDescriptionNotes
billing_firstNamestring1-50RequiredCustomer first name
  • To ensure consistent request signing,
    remove the following characters: leading/trailing spaces, double quotes, <, >, and single quotes.
John
billing_lastNamestring1-50RequiredCustomer last name
  • To ensure consistent request signing,
    remove the following characters: leading/trailing spaces, double quotes, <, >, and single quotes.
Wilson
billing_emailstring1-50RequiredCustomer email
  • To ensure consistent request signing,
    remove the following characters: leading/trailing spaces, double quotes, <, >, and single quotes.
customer@gmail.com
billing_phonestring0-50ConditionalCustomer phone
  • Required for Konbini
13106683312
billing_countrystring1-100RequiredBilling countryUS
billing_statestring1-100RequiredBilling state/province/county NY
billing_citystring0-500OptionalCustomer cityNew York
billing_addressstring0-500OptionalCustomer address350 5th Ave
billing_zipstring0-50OptionalPostal code10024-3941
billing_ipstring0-50ConditionalCustomer IP. 127.0.0.1

Product Information

Information

Product information is required for settlement compliance. All related fields are mandatory.

ParameterTypeLengthRequiredDescriptionExample
productNamestring1-500RequiredProduct name(s)
  • For multiple products, separate them with commas (,)
shoes
productNumstring1-50RequiredProduct quantity
  • For multiple products, separate them with commas (,)
1
productSkustring1-500RequiredSKU
  • For multiple products, separate them with commas (,)
#123
productPricestring1-500RequiredUnit price
  • For multiple products, separate them with commas (,)
1.00

Shipping Information

If shipping information is unavailable, billing info can be reused.

ParameterTypeLengthRequiredDescriptionExample
ship_firstNamestring1-50OptionalShipping first nameJohn
ship_lastNamestring1-50OptionalShipping last nameWilson
ship_emailstring1-50OptionalShipping emailcustomer@gmail.com
ship_phonestring0-50OptionalShipping phone13106683312
ship_countrystring1-100OptionalShipping country codeUS
ship_statestring1-100OptionalShipping state/province codeNY
ship_citystring0-500OptionalShipping cityNew York
ship_addrstring0-500OptionalShipping street address350 5th Ave
ship_zipstring0-50OptionalShipping postal code10024-3941

Business Parameters

Pass parameters according to the integration scenario requirements.

ParameterTypeLengthRequiredDescriptionExample
order_notesstring0-500OptionalMerchant notes, returned as-istest
pagesstring0-50OptionalPayment page terminal
  • 0: Desktop (default)
  • 1: Mobile
0
logoUrlstring0-50OptionalLogo displayed on payment pagehttps://example.com/logo.png
languagestring0-50OptionalPayment page language. If not specified, the language will default to the browser’s language.en_US
cssUrlstring0-50OptionalURL of an online CSS file to override the payment page’s style
  • Must start with https://
  • Overrides the default Oceanpayment payment page styles
  • Only applicable for Hosted Checkout and Embedded integration.
https://example.com/style.css
pay_websitestring0-500OptionalThe merchant's source URL
  • This field is required for SaaS/platform-built stores.
example.com

Additional Parameters (Alternative Payment)

Note

When using local payment methods, some additional parameters are required. Please pay attention to the specific parameter requirements for each payment method.

ParameterTypeLengthRequiredDescription
pay_bankCodestring1-50ConditionalSupported bank code
pay_countryCodestring1-50ConditionalSupported country code
pay_installmentsstring1-50ConditionalNumber of installments
pay_cpfstring1-50ConditionalConsumer CPF, CPF / taxpayer ID
pay_accountNumberstring1-50Conditional
  • Apple Pay & Google Pay – Payment Token returned via direct integration
  • WeChatPay/Alipay POS payments – Merchant-scanned customer authorization code
    • WeChat authorization code format: ^1[0-6][0-9]16$
    • Alipay authorization code format: ^\d24$
  • Customer account number
card_typestring1-50ConditionalPayment card type. It is required for direct integration with Google Pay and Apple Pay.
  • Google Pay enum values: VISA, MASTERCARD, MAESTRO, JCB, ELO, DISCOVER, CHINAUNIONPAY, CARTESBANCAIRES, AMEX
  • Apple Pay value: use paymentMethod.network returned in the Apple Pay Payment Token

Klarna Product Information

Note

When using Klarna, the total order amount must exactly match the sum of the itemized amounts; otherwise, the payment may fail.

ParameterTypeLengthRequiredDescriptionExample
itemListstring1-500RequiredProduct node information
  • JSON format, with a maximum of 25 nodes allowed.
{
  "0": {
    "type": "1",
    "title": "book",
    "sku": "#001",
    "price": "100",
    "quantity": "1",
    "total_amount": "100.00",
    "taxRate": "0.01",
    "taxPrice": "1",
    "image_url": "https://www.example.com/a.jpg",
    "product_url": "https://www.example.com/a.html",
    "remark": ""
  },
  "1": {
    "type": "3",
    "title": "discount",
    "sku": "#002",
    "price": "1",
    "quantity": "1",
    "total_amount": "1",
    "taxRate": "0.01",
    "taxPrice": "0.01",
    "image_url": "",
    "product_url": "",
    "remark": ""
  },
  "2": {
    "type": "4",
    "title": "shipping_fee",
    "sku": "#002",
    "price": "1",
    "quantity": "1",
    "total_amount": "1",
    "taxRate": "0.01",
    "taxPrice": "0.01",
    "image_url": "",
    "product_url": "",
    "remark": ""
  },
  "3": {
    "type": "5",
    "title": "sales_tax",
    "sku": "#002",
    "price": "1",
    "quantity": "1",
    "total_amount": "1",
    "taxRate": "1",
    "taxPrice": "1",
    "image_url": "",
    "product_url": "",
    "remark": ""
  }
}

The total order amount consists of the following components:

  • Product Amount:Unit price × quantity for each product
  • Taxes: Applicable to products, shipping, or the entire order
  • Shipping Fees: Shipping, courier, or delivery charges
  • Discounts: Coupons, promotions, or other discounts

Total Order Amount = Product Amount + Taxes + Shipping Fees − Discounts.

Airline Parameters

info

Airline parameters are only used in airline payment scenarios. They are not required for other transaction types.

ParameterTypeLengthRequiredDescriptionExample
travel_totalTaxes
string0-50Optional
Taxes and Fees
travel_websiteLanguage
string0-50Optional
Website Language
travel_adult
string0-3Optional
Adult number
travel_child
string0-3Optional
Number of children
travel_infant
string0-3Optional
Number of babies
travel_electronicTicket
string1Required
Is it an electronic ticket
  • 1: True
  • 0: False
    travel_agencyCode
    string0-10Optional
    ATA Airport Code
    travel_pnr
    string1-10Required
    PNR
    travel_spnr
    string0-10Optional
    SPNR
    ticket_deliveryMethod
    string1Required
    The way in which the ticket is delivered. The following lowercase values are accepted
    • pick_up: The ticket is picked up in person.
    • email: The ticket is sent by email.
    • post: The ticket is sent by post.
    • phone: The ticket is sent to a phone number.
      +travel_customerInfoJson
      object-Required
      Passenger node information (JSON format)

      QuickPay

      Create Quickpay ID

      Note

      When using the subscription scenario to create a Quickpay ID, the customer_id field is required.

      ParameterTypeLengthRequiredDescriptionExample
      customer_idstring1-50RequiredUser ID
      • A unique value used by the merchant to distinguish different users
      NO123456

      Initiate Payment

      Note

      When initiating a debit in subscription scenarios or quickpay, the quickpay_id field is required.

      ParameterTypeLengthRequiredDescriptionExample
      quickpay_idstring1–200RequiredA unique Quickpay ID generated by Oceanpayment
      • Format: UUID
      c6db7a28-7639-4d24-b7c5-6cd222c3e0fc

      Response Parameters

      Browser Synchronous Response:

      • Each payment is returned via POST to the backUrl provided in the transaction request.
      • The default return method is POST, but it can be changed to GET if needed.
      ParameterTypeDescriptionExample
      response_typestringCallback type
      • 0: browser return
      • 1: server async notification
      0
      accountstringOceanpayment account number995149
      terminalstringOceanpayment terminal number99514901
      signValuestringSecurity signature to validate the request, SHA256 encryptedA3F1C9D4E8B27F6A5C0D1E9F4B6A7C8D2E3F1A9B5C6D7E8F0A1B2C3D4E5F678
      methodsstringPayment methodCredit Card
      order_numberstringMerchant order ID123456789
      order_currencystringCurrencyUSD
      order_amountstringAmount1.00
      order_notesstringNotestest
      card_numberstringCard number411111***1111
      card_typestringCard typeVisa
      payment_countrystringCustomer IP countryUS
      payment_idstringOceanpayment payment ID26154125951032147852122
      payment_statusstringTransaction status
      • -1: Pending (preauth)
      • 0: Failed
      • 1: Success
      1
      payment_authTypestringTransaction type
      • 0: Sale
      • 1: PreAuth non-3D
      • 2: 3D non-PreAuth
      • 3: 3D PreAuth
      0
      payment_detailsstringPayment details for display on result page
      • The website can process this and display it to the consumer on the payment result page.
      80000:Transaction Approved
      payment_solutionsstringSuggested solution if payment fails
      • The website can process this and display it to the consumer on the payment result page.
      payment_riskstringFailed risk rules (format: rule=score;...)
      pay_barCodestringOrder print code
      payment_bankInfostringParameters for Invoking the Bank SDK

      Asynchronous Notifications

      Refer to the full list of Oceanpayment asynchronous notification parameters.