Record Affiliate Refund or Chargeback
growsurf_refund_transactionRecord a refund, partial refund, or chargeback for a previously recorded GrowSurf affiliate transaction. Adjust the referrer's commission without processing a payment provider refund.
Instructions
Record a refund, partial refund, or chargeback for a previously recorded affiliate transaction in GrowSurf and reverse or adjust the referrer's commission. This records the amendment without sending a refund through the payment provider. Requires the same transaction identifier as the original sale. Omitted amountRefunded means a full refund. Already-paid commissions are not clawed back and are recorded for tax only. Targets campaignId if supplied, otherwise GROWSURF_CAMPAIGN_ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | ||
| orderId | No | ||
| chargeId | No | ||
| currency | No | ||
| refundId | No | Stable per-refund identifier. Required when canceling a refund or changing the refunded total after a cancellation. Reuse the original refund's identifier for its cancellation. An amendment without enough refund identity returns `409` without applying the cancellation. Newly observed higher cumulative refunds and incomplete coverage are retained for reconciliation. | |
| testMode | No | Original payment mode: `true` for test or `false` for live. Requires `paymentProvider`. | |
| invoiceId | No | ||
| paymentId | No | ||
| campaignId | No | Target program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server. | |
| externalId | No | ||
| description | No | ||
| refundAmount | No | Positive amount for this individual refund, no greater than the sale amount, in the sale currency's minor unit. Send it with `refundId` on each original refund to support cancellations and out-of-order amendments. The amount for a given `refundId` cannot change. A cancellation can omit it when the original amount is already recorded. Incomplete refund history returns `409` without applying the cancellation. Newly observed higher cumulative refunds and incomplete coverage are retained for reconciliation. | |
| refundStatus | No | ||
| amendmentType | No | ||
| participantId | No | ||
| transactionId | No | ||
| amountRefunded | No | ||
| paymentIntentId | No | ||
| paymentProvider | No | Connected provider for the original payment. Requires its `transactionId` and `testMode`. This amends GrowSurf records without sending a refund through the provider. | |
| participantEmail | No | ||
| refundHistoryComplete | No | Set true only after reconciling and recording every original refundId and refundAmount, including refunds later canceled. This confirmation resolves previously incomplete history. Omit during ordinary delivery. Replaying an old confirmation cannot resolve a later gap; confirm a newly reconciled refund or complete provider list. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deleted | No | Pending commissions deleted by the amendment. | |
| matched | No | Commissions found for the provided identifiers. | |
| message | No | Human-readable result message. | |
| success | No | `true` when the amendment was processed; `false` when no matching transaction was found. | |
| adjusted | No | Commissions partially adjusted. | |
| notFound | No | Present and `true` when no commission matched the provided identifiers. | |
| reversed | No | Commissions reversed (set to zero amount). | |
| amendmentType | No | Amendment type that was processed. | |
| matchingCommissionIds | No | Commission ids that matched the submitted identifiers. |