Onerway
API Reference

Enums

Enum values, meanings and applicable scenarios for V3 APIs.

Small fixed enums are also shown beside endpoint fields. This page explains enum values and their scope; dynamic availability follows merchant configuration and endpoint responses.

Response enums

The table lists common response enum values. See each endpoint's error responses for additional errors.

Enum valueMeaning
20000Request processed successfully. Acceptance of a payment does not mean the funds have arrived.
40004Request parameter validation failed. Check the parameters using the error information in respMsg and error.

Currency enums

Use alphabetic currency enum values, such as FJD, in currency fields. Numeric identifiers are provided for reference. Amount decimal places indicate the standard minor units of a currency; request amounts do not need to be padded to that number of decimal places. Follow the amount constraints on each endpoint. Currency availability depends on merchant enablement.

CNH represents offshore renminbi and has no separate ISO 4217 numeric identifier.

Country/region enums

Country/region enum values are listed below. Check available payment methods for the payment options available to you.

entityType Entity types

ValueMeaning
INDIVIDUALIndividual
BUSINESSBusiness

paymentMethod Payment methods

ValueMeaning
BANK_TRANSFERBank transfer
SWIFTSWIFT transfer
E_WALLETE-wallet
CASH_PICKUPCash pickup

These enum values do not imply that every method is enabled for your merchant. Use the current response from available payment methods.

walletProvider walletFormat Wallet providers and account formats

For an e-wallet, select a walletProvider and walletFormat combination below and supply the account in walletIdentifier. Supply the two fields together. When querying beneficiary field rules, both fields are required when paymentMethod is E_WALLET.

Preserve the exact case and spaces shown. A listed combination is not necessarily enabled for every merchant. Availability depends on the merchant, destination country or region, currency and payment configuration.

The walletFormat value WALLET ID contains one space. Use the value exactly as shown.

chargeBearer Platform fee bearers

ValueMeaning
DEBTPayer bears the platform fee
CREDBeneficiary bears the platform fee

Use sourceAmount for chargeBearer=CRED and targetAmount for DEBT; the selected amount must be greater than 0. This field is separate from swiftFeeType.

swiftFeeType SWIFT fee options

ValueMeaning
OURPayer bears the SWIFT fees
SHAFees are shared

accountType Bank account types

ValueMeaning
CHECKINGChecking account
SAVINGSavings account
ORDINARYOrdinary account

transactionPurpose Transaction purposes

ValueDescription
TRANSFER_TO_OWN_ACCOUNTTransfer to own account
LOAN_OR_CREDIT_REPAYMENTLoan or credit repayment
FREIGHT_CHARGESFreight charges
PROFESSIONAL_OR_BUSINESS_SERVICESProfessional or business services
OTHEROther

transactionStatus Payment statuses

ValueMeaning
ACreated
PProcessing
SSuccessful
FFailed
RETURNEDReturned

beneficiaryStatus Beneficiary statuses

ValueMeaning
passApproved
unnecessaryNo review required
disableDisabled
deletedDeleted

The list status filter can combine values according to the endpoint rules; omission or blank input defaults to pass,unnecessary. Successful deletion returns only deleted.

Field rules

required Requiredness

Corresponds to fields[].required and indicates whether the field is required.

ValueMeaning
MANDATORYRequired
OPTIONALOptional; provide the field when a requiredness condition in another rule applies.

type Field types

Corresponds to fields[].type and describes the data type of the field value.

ValueMeaning
STRINGString
DATEDate

ruleType Validation rule types

Corresponds to fields[].rules[].ruleType. A field can have multiple rules, each with its own params.

ValueDescriptionParameters
REQUIREDChecks whether the field is supplied.No dedicated parameters.
LENGTH_RANGELimits the length of the field value.min, max
NUMBER_RANGELimits the numeric value.min, max
REGEXChecks the value against a regular expression.pattern
AMOUNT_RANGELimits the amount.min, max
TIME_RANGEChecks a date or time range; this endpoint returns absolute boundaries.startTime, endTime
CONDITIONA composite rule. All child rules must pass when it applies.rules
UNKNOWNAn unrecognized rule type; use the beneficiary validation endpoint to check the result.As returned.

params Rule parameters

ParameterDescription
minInclusive lower bound for length, numeric value or amount.
maxInclusive upper bound for length, numeric value or amount.
patternThe regular expression to match.
startTimeInclusive absolute start time, in Beijing time (UTC+8).
endTimeInclusive absolute end time, in Beijing time (UTC+8).
rulesChild rules, each containing its own ruleType and params.

Read the parameters actually returned. A rule does not need to contain every parameter above.

OPTIONAL does not waive conditional rules. The params structure depends on ruleType; composite rules may nest recursively.

Reading the rules

Use the field rules query to prepare beneficiary information. Follow the returned field paths, requiredness, candidate values and rules, then call Validate beneficiary. Use its result to determine whether the information satisfies the full validation requirements.

For TIME_RANGE, startTime and endTime define an absolute time range with inclusive boundaries, in Beijing time (UTC+8). Do not infer relative date restrictions, such as age limits, from these two values alone.

CONDITION Composite rule example

This is one rule from fields[].rules[], not a complete response. When the composite rule applies, the value must have a maximum length of 64. The value illustrates the format and is not an actual country or payment method configuration. Each nested rule has its own ruleType and params; all must pass when the rule applies.

In the complete response, condition is a sibling of fields and describes query criteria such as country, currency and payment method. It is not the trigger for the composite rule. Rule objects currently do not expose trigger expressions, so this fragment does not describe every applicability condition. See Query beneficiary field rules for the complete response structure.

{
  "ruleType": "CONDITION",
  "params": {
    "rules": [
      {
        "ruleType": "LENGTH_RANGE",
        "params": {
          "max": 64
        }
      }
    ]
  }
}