# Profit share result webhook

> Receive profit share and reversal result notifications with the overall state and per-recipient details.

```yaml
openapi: 3.1.0
info:
  title: Profit share result webhook
  version: 1.0.0
  description: Receive profit share and reversal result notifications with the
    overall state and per-recipient details.
webhooks:
  profit.share.result:
    post:
      summary: Profit share result webhook
      description: Receive profit share and reversal result notifications with the
        overall state and per-recipient details.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                profitType:
                  type: string
                  description: Whether this notification reports a profit share or a reversal.
                  enum:
                    - share
                    - return
                  x-enum-descriptions:
                    share: The notification reports a profit share.
                    return: The notification reports a profit share reversal.
                  x-onerway-signature-participation: included
                profitReference:
                  type: string
                  description: Reference for the profit share or reversal. For operations
                    initiated through the API, this is the reference supplied by
                    the merchant. For automatic profit shares and reversals,
                    Onerway generates it. Use `relatedTxnId` and
                    `relatedMerchantTxnId` to associate the result with the
                    original payment.
                  x-onerway-signature-participation: included
                profitGatewayReference:
                  type: string
                  description: Onerway order number of the profit share or reversal.
                  x-onerway-signature-participation: included
                state:
                  type: string
                  description: Overall processing state of the order. Do not treat `completed` as
                    every detail having succeeded; check `receivers[].result`
                    individually.
                  enum:
                    - processing
                    - completed
                  x-enum-descriptions:
                    processing: The profit share order is still being processed.
                    completed: The profit share order finished processing. Check each detail result
                      separately.
                  x-onerway-signature-participation: included
                currency:
                  type: string
                  description: Settlement currency of the profit share or reversal.
                  x-onerway-signature-participation: included
                relatedTxnId:
                  type:
                    - string
                    - "null"
                  description: Transaction ID of the original payment. A reversal still references
                    the original payment, not the profit share order.
                  x-onerway-value:
                    nullable: true
                  x-onerway-signature-participation: included
                relatedMerchantTxnId:
                  type:
                    - string
                    - "null"
                  description: Merchant order number of the original payment.
                  x-onerway-value:
                    nullable: true
                  x-onerway-signature-participation: included
                receivers:
                  type: string
                  description: Per-recipient processing results.
                  contentMediaType: application/json
                  contentSchema:
                    type: array
                    items:
                      type: object
                      properties:
                        profitDetailReference:
                          type: string
                          description: Merchant-side reference submitted for this detail.
                        profitDetailGatewayReference:
                          type: string
                          description: Onerway detail number for this detail.
                        type:
                          type:
                            - string
                            - "null"
                          description: Fund purpose of this detail.
                          enum:
                            - "1"
                            - "2"
                            - "3"
                            - "4"
                            - "5"
                            - "6"
                            - "7"
                            - "99"
                            - null
                          x-enum-descriptions:
                            "1": "Merchant settlement: the order settlement amount allocated to the actual
                              seller, sub-merchant, or service provider."
                            "2": "Platform service fee: commission, technical service fees, and software
                              service fees earned by the platform."
                            "3": "Partner commission: commission paid to channel, agency, or distribution
                              partners."
                            "4": "Payment processing fee: acquiring fees, transaction processing fees, and
                              payment channel costs."
                            "5": "Tax: VAT, GST, or other tax amounts that must be collected separately."
                            "6": "Logistics and fulfillment fee: logistics, delivery, warehousing, and
                              fulfillment costs."
                            "7": "Marketing subsidy: discounts, subsidies, campaign costs, or marketing
                              spend borne by one party."
                            "99": "Other: any other profit share purpose agreed between Onerway and the
                              merchant."
                          x-onerway-value:
                            nullable: true
                            when:
                              en: Returns `null` when the fund purpose is not recorded.
                              zh: 未记录资金用途时返回 `null`。
                        amount:
                          type: string
                          description: Processed profit share or reversal amount.
                          x-onerway-constraints:
                            - kind: rule
                              text: Amount values use decimal strings. Avoid binary floating-point arithmetic
                                for money.
                        result:
                          type: string
                          description: Processing result of this detail.
                          enum:
                            - pending
                            - success
                            - failed
                          x-enum-descriptions:
                            pending: The detail is still being processed.
                            success: The detail was processed successfully.
                            failed: The detail failed. Check `failReason`.
                        failReason:
                          type:
                            - string
                            - "null"
                          description: Failure reason for this detail.
                          x-onerway-constraints:
                            - kind: rule
                              text: Human-readable troubleshooting text with no fixed value set. Branch on
                                `result` rather than matching this string.
                          x-onerway-value:
                            nullable: true
                            when:
                              en: Returned only when `result` is `failed`; otherwise `null`.
                              zh: 仅当 `result` 为 `failed` 时返回；其余情况为 `null`。
                        createdAt:
                          type: string
                          description: Detail creation time.
                          x-onerway-constraints:
                            - kind: rule
                              text: Formatted as `yyyy-MM-dd HH:mm:ss`. Do not parse it as a Unix timestamp.
                        finishedAt:
                          type:
                            - string
                            - "null"
                          description: Detail completion time.
                          x-onerway-constraints:
                            - kind: rule
                              text: Formatted as `yyyy-MM-dd HH:mm:ss`. Do not parse it as a Unix timestamp.
                          x-onerway-value:
                            nullable: true
                            when:
                              en: Returns `null` while `result` is `pending`.
                              zh: "`result` 为 `pending` 时返回 `null`。"
                  x-onerway-format: json_string
                  x-onerway-signature-participation: included
                sign:
                  type: string
                  description: Verify the profit share or reversal notification against this
                    signature using your `SECRET`. See [Webhook signature
                    verification](/payments/get-started/request-signing#webhook-signature-verification).
                  x-onerway-constraints:
                    - kind: rule
                      text: Exclude `sign` itself from the canonical string when verifying this
                        webhook.
                  x-onerway-signature-participation: signature-field
            examples:
              profit_share_completed:
                summary: Profit share completed
                value:
                  profitType: share
                  profitReference: example_profit_share_reference
                  profitGatewayReference: replace_with_profit_gateway_reference
                  state: completed
                  currency: USD
                  relatedTxnId: "9007199254740993"
                  relatedMerchantTxnId: example_payment_order
                  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"}]'
                  sign: replace_with_sha256_signature
              profit_share_reversal_completed:
                summary: Profit share reversal completed
                value:
                  profitType: return
                  profitReference: example_profit_reversal_reference
                  profitGatewayReference: replace_with_profit_reversal_gateway_reference
                  state: completed
                  currency: USD
                  relatedTxnId: "9007199254740993"
                  relatedMerchantTxnId: example_payment_order
                  receivers: '[{"profitDetailReference":"example_profit_reversal_detail_reference","profitDetailGatewayReference":"replace_with_profit_reversal_detail_gateway_reference","type":"1","amount":"80.00","result":"success","failReason":null,"createdAt":"2026-06-22
                    11:00:00","finishedAt":"2026-06-22 11:00:08"}]'
                  sign: replace_with_sha256_signature
      responses:
        "200":
          description: Return HTTP 200 after the profit share webhook is received and
            accepted. No response body is required.
```
