Onerway
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

currency
Profit share or reversal currency, as a three-letter ISO 4217 currency code.
Example:
gatewayReference
Condition: Required when profitType is share.
Onerway payment transaction whose proceeds are shared. It is the transactionId returned when the payment was created.
Example:
Constraints
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 profitType is return; the original order is located through profitParentReference and profitGatewayReference instead.
merchantNo
Merchant number submitting this profit share or reversal.
Example:
Constraints
Rule
In the platform model, submit the sub-merchant that collected the payment, matching the merchantNo used when the payment was created.
profitCompleted
Condition: Required when profitType is share.
Whether this request completes profit sharing for the payment. Submit false while further profit shares are still expected.
Example:
Constraints
Rule
Once submitted as true, further profit share requests for the same payment are rejected.
profitGatewayReference
Condition: Required when profitType is return.
Onerway order number of the original profit share being reversed.
Example:
profitParentReference
Condition: Required when profitType is return.
Reference of the original profit share being reversed. For an automatic profit share, this reference is generated by Onerway.
Example:
profitReference
Merchant-side reference for this profit share or reversal.
Example:
Constraints
Rule
Used as the idempotency key. Keep it globally unique across both profit shares and reversals.
profitType
Operation to execute. It determines which reference fields are required.
Example:
Allowed values
share
Initiate a profit share for a completed payment.
return
Reverse a previously submitted profit share.
Profit share or reversal recipients. Submit one entry for each detail.
sign
Request signature string. See Request signing for how to generate it.
urlCallback
Condition: Required when the original payment has no paymentMethodOptions.share.profitShareNotifyUrl.
URL for this API request’s profit share or reversal notification. You can omit it when the original payment already has paymentMethodOptions.share.profitShareNotifyUrl.
Example:

Request example

curl -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

respCode
20000 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.
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": "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.