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
gatewayReferenceCondition: Provide at least one of
For profitReference, gatewayReference, profitGatewayReference, relatedTxnId, or relatedMerchantTxnId.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:
replace_with_transaction_idmerchantNoMerchant number submitting this query.
Example:
replace_with_merchant_noConstraints
- 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
merchantNoin that request.
profitGatewayReferenceCondition: Provide at least one of
Onerway order number returned when the profit share or reversal was submitted.profitReference, gatewayReference, profitGatewayReference, relatedTxnId, or relatedMerchantTxnId.Example:
replace_with_profit_gateway_referenceprofitReferenceCondition: Provide at least one of
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.profitReference, gatewayReference, profitGatewayReference, relatedTxnId, or relatedMerchantTxnId.Example:
example_profit_share_referencerelatedTxnIdCondition: Provide at least one of
Transaction ID of the original payment, for both profit shares and reversals.profitReference, gatewayReference, profitGatewayReference, relatedTxnId, or relatedMerchantTxnId.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.
relatedMerchantTxnIdCondition: Provide at least one of
Merchant order number of the original payment, for both profit shares and reversals.profitReference, gatewayReference, profitGatewayReference, relatedTxnId, or relatedMerchantTxnId.Constraints
- Consistency
- When multiple query identifiers are provided, they are applied together as filters.
profitTypeType of order to query: a profit share or a reversal.
Example:
shareAllowed values
share- Query a profit share.
return- Query a profit share reversal.
signRequest signature string. See Request signing for how to generate it.
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
respCode20000 means the query was processed successfully. Other values are error codes. See Response codes.respMsgHuman-readable message for the response code.
data{ profitType, profitReference, ... }Profit share or reversal result.
{
"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.