Onerway
POST

Query profit share

Use this endpoint to retrieve the result of a profit share or reversal, check the overall state, and confirm the outcome of each recipient detail.

Request

gatewayReference
Condition: Provide at least one of profitReference, gatewayReference, profitGatewayReference, relatedTxnId, or relatedMerchantTxnId.
For share, the transactionId of the original SALE payment. For return, the Onerway order number of the profit share being reversed. Use relatedTxnId to query a reversal by its original payment.
Example:
merchantNo
Merchant number submitting this query.
Example:
Constraints
Rule
Accepts a string or a JSON number. A string is recommended to preserve the full identifier without numeric precision loss.
Rule
For platform integrations, use the merchant number of the sub-merchant that received the original payment. For a profit share initiated through the API, this must match the merchantNo in that request.
profitGatewayReference
Condition: Provide at least one of profitReference, gatewayReference, profitGatewayReference, relatedTxnId, or relatedMerchantTxnId.
Onerway order number returned when the profit share or reversal was submitted.
Example:
profitReference
Condition: Provide at least one of profitReference, gatewayReference, profitGatewayReference, relatedTxnId, or relatedMerchantTxnId.
Reference of the profit share or reversal. For operations initiated through the API, use the reference supplied by the merchant in that request. For automatic profit shares and reversals, Onerway generates the reference.
Example:
relatedTxnId
Condition: Provide at least one of profitReference, gatewayReference, profitGatewayReference, relatedTxnId, or relatedMerchantTxnId.
Transaction ID of the original payment, for both profit shares and reversals.
Constraints
Rule
Accepts a string or a JSON number. A string is recommended to preserve the full identifier without numeric precision loss.
Consistency
When multiple query identifiers are provided, they are applied together as filters.
relatedMerchantTxnId
Condition: Provide at least one of profitReference, gatewayReference, profitGatewayReference, relatedTxnId, or relatedMerchantTxnId.
Merchant order number of the original payment, for both profit shares and reversals.
Constraints
Consistency
When multiple query identifiers are provided, they are applied together as filters.
profitType
Type of order to query: a profit share or a reversal.
Example:
Allowed values
share
Query a profit share.
return
Query a profit share reversal.
sign
Request signature string. See Request signing for how to generate it.

Request example

curl -X POST 'https://sandbox-acq.onerway.com/profit/query' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "gatewayReference": "replace_with_transaction_id",
  "merchantNo": "replace_with_merchant_no",
  "profitGatewayReference": "replace_with_profit_gateway_reference",
  "profitReference": "example_profit_share_reference",
  "profitType": "share",
  "sign": "replace_with_calculated_signature"
}'

Response

respCode
20000 means the query was processed successfully. Other values are error codes. See Response codes.
respMsg
Human-readable message for the response code.
Profit share or reversal result.

Response example

{
  "respCode": "20000",
  "respMsg": "Success",
  "data": {
    "profitType": "share",
    "profitReference": "example_profit_share_reference",
    "profitGatewayReference": "replace_with_profit_gateway_reference",
    "state": "completed",
    "currency": "USD",
    "relatedTxnId": "9007199254740993",
    "relatedMerchantTxnId": "example_payment_order",
    "sign": "replace_with_response_signature",
    "receivers": "[{\"profitDetailReference\":\"example_profit_share_detail_reference\",\"profitDetailGatewayReference\":\"replace_with_profit_detail_gateway_reference\",\"type\":\"1\",\"amount\":\"80.00\",\"result\":\"success\",\"failReason\":null,\"createdAt\":\"2026-06-22 10:00:00\",\"finishedAt\":\"2026-06-22 10:00:08\"}]"
  }
}
No error responses are documented for this endpoint.