Initiate Payment

ONERWAY payment flow consists of four phases - initialization and pre-setup, initiate payment, get transaction result, and transaction completion handling

ONERWAY provides two payment modes. The payment flow consists of four phases:

Phase 1: Initialization & Pre-setup

Step 1: Environment Preparation

All integrations must be tested in the sandbox environment first. Switch to production only after confirming functionality is correct.

EnvironmentDomain
Sandboxhttps://sandbox-api.onerway.com/payout
Productionhttps://api.onerway.com/payout

Step 2: Integration Signature

Before calling any API, you must generate a signature (sign) and use the private key (privateKey) to ensure request security.

For complete signature documentation, refer to: Integration Signature DocumentationTransfer API

Step 3: Confirm Payment Method

Select the appropriate payment method based on business requirements:

  • LOCAL (Local Transfer)
  • SWIFT (International Wire)
  • E_WALLET (E-Wallet)
  • CASH_PICKUP (Cash Pickup)

Available payment methods depend on the target country and currency.

Step 4: Confirm Beneficiary Required Fields

Get required field information based on the following parameters: country, currency, entity type, payment method.

API: Query Beneficiary Required FieldsTransfer API POST /api/v1/acct/queryPaymentFeild

Phase 2: Initiate Payment

Pay via Beneficiary ID

First create a beneficiary to get beneficiaryId, then reference this ID to initiate payment.

Beneficiary Reuse Logic:

ScenarioHandling
Beneficiary existsQuery and reuse existing beneficiaryId
Beneficiary info mismatchCall edit API to update, then reuse
New beneficiaryCall create API to get new beneficiaryId

API: Initiate PaymentTransfer API POST /api/v1/txn/remittance

Pre-submission Checklist:

Check ItemRequirement
Beneficiary statusMust be PASS
Account balanceSufficient balance
Fee modechargeFlag correctly set

Core Request Parameters:

ParameterTypeRequiredDescription
merchantNostringMMerchant ID
beneficiaryIdlongMBeneficiary ID
sourceAmountnumberMPayment amount
sourceCurrencystringMPayment currency
targetAmountnumberMExpected payout amount
targetCurrencystringMPayout currency
requestIdstringMMerchant request unique identifier (prevents duplicate submission)
referencestringNTransaction reference (visible to beneficiary, 0-140 characters)
transactionPurposestringMPayment purpose (enum value 0-5)
chargeFlagstringMY=Full amount arrival / N=Non-full amount arrival
feeBearingstringCOUR / SHA (required for SWIFT)
signstringMRequest signature

M=Mandatory, C=Conditional, N=Optional

Phase 3: Get Transaction Result

Method 1: Payment Callback (Webhook)

When payment status changes (Processing → Success/Failed), the system proactively sends notifications to the callback URL provided by the merchant.

Callback content includes: transaction status (success/failed/processing), error code and description (if applicable).

API: Payment Callback NotificationTransfer API

Method 2: Active Query

MethodAPIPathUse Case
Single QuerySingle Payment QueryTransfer APIPOST /api/v1/txn/queryCallback lost, user inquiry, amount verification
Batch QueryBatch Payment QueryTransfer APIPOST /api/v1/txn/queryListFinancial reconciliation (recommended daily), risk monitoring
Recommended to adopt a "Webhook primary + Query backup" dual-guarantee mechanism.

Phase 4: Transaction Completion

Success: Download electronic payment receipt

API: Query Payment ReceiptTransfer API POST /api/v1/txn/queryVoucher

  • Generated approximately 1 hour after successful transaction
  • Long-term storage, can be downloaded repeatedly
  • Can be used for financial archiving, audit trail, customer notification

Failed: Query failure reason, manually process or re-initiate payment.

Payment Status Flow

StatusDescription
CreatedPayment transaction has been created
Pending ApprovalMerchant has enabled approval workflow, transaction awaiting approver review
RejectedApprover rejected the transaction
Pending ExecutionApproved but execution time not reached, waiting for execution
CancelledCancelled while in pending execution status
ProcessingPayment is being processed
PaidPayment successful, funds have reached the beneficiary
FailedPayment processing failed
ReturnedPayment was returned after success (e.g., returned by receiving bank)