POST
Create or reverse profit share
Use this endpoint to share the proceeds of a completed payment, or to reverse an existing profit share. The
profitType value determines which operation runs.Request
gatewayReferenceCondition: Required when
Onerway payment transaction whose proceeds are shared. It is the profitType is share.transactionId returned when the payment was created.Example:
replace_with_transaction_idConstraints
- Rule
- The payment must have been created with
paymentMethodOptions.share.profitShare=true; otherwise it is not eligible for profit sharing. - Rule
- Do not submit it when
profitTypeisreturn; the original order is located throughprofitParentReferenceandprofitGatewayReferenceinstead.
merchantNoMerchant number submitting this profit share or reversal.
Example:
replace_with_merchant_noConstraints
- Rule
- In the platform model, submit the sub-merchant that collected the payment, matching the
merchantNoused when the payment was created.
profitCompletedCondition: Required when
Whether this request completes profit sharing for the payment. Submit profitType is share.false while further profit shares are still expected.Example:
falseConstraints
- Rule
- Once submitted as
true, further profit share requests for the same payment are rejected.
profitGatewayReferenceCondition: Required when
Onerway order number of the original profit share being reversed.profitType is return.Example:
replace_with_original_profit_gateway_referenceprofitParentReferenceCondition: Required when
Reference of the original profit share being reversed. For an automatic profit share, this reference is generated by Onerway.profitType is return.Example:
replace_with_original_profit_referenceprofitReferenceMerchant-side reference for this profit share or reversal.
Example:
example_profit_share_referenceConstraints
- Rule
- Used as the idempotency key. Keep it globally unique across both profit shares and reversals.
profitTypeOperation to execute. It determines which reference fields are required.
Example:
shareAllowed values
share- Initiate a profit share for a completed payment.
return- Reverse a previously submitted profit share.
receivers{ profitDetailReference, type, ... }Profit share or reversal recipients. Submit one entry for each detail.
signRequest signature string. See Request signing for how to generate it.
urlCallbackCondition: Required when the original payment has no
URL for this API request’s profit share or reversal notification. You can omit it when the original payment already has paymentMethodOptions.share.profitShareNotifyUrl.paymentMethodOptions.share.profitShareNotifyUrl.Example:
replace_with_callback_urlcurl -X POST 'https://sandbox-acq.onerway.com/profit/share' \
-H 'Content-Type: application/json' \
--data-raw '{
"currency": "USD",
"gatewayReference": "replace_with_transaction_id",
"merchantNo": "replace_with_merchant_no",
"profitCompleted": false,
"profitReference": "example_profit_share_reference",
"profitType": "share",
"receivers": "[{\"profitDetailReference\":\"example_profit_share_detail_reference\",\"type\":\"1\",\"account\":\"replace_with_receiver_merchant_no\",\"amount\":\"80.00\",\"description\":\"Seller settlement\"}]",
"sign": "replace_with_calculated_signature",
"urlCallback": "https://developers.onerway.com/example-profit-callback"
}'Response
respCode20000 means the request was accepted. The final result should be confirmed through the asynchronous notification or Query profit share. 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": "processing",
"currency": "USD",
"receivers": "[{\"profitDetailReference\":\"example_profit_share_detail_reference\",\"profitDetailGatewayReference\":\"replace_with_profit_detail_gateway_reference\",\"type\":\"1\",\"amount\":\"80.00\",\"result\":\"pending\",\"failReason\":null,\"createdAt\":\"2026-06-22 10:00:00\",\"finishedAt\":null}]",
"sign": "replace_with_sha256_signature"
}
}No error responses are documented for this endpoint.