growsurf_refund_transaction
Record refunds, partial refunds, or chargebacks against prior affiliate transactions to reverse or adjust referrer commissions. Use the same transaction identifier from the original sale.
Instructions
Record an amendment (refund, partial refund, or chargeback) against a previously recorded affiliate transaction; reverses or adjusts the referrer's commission. The inverse of growsurf_record_sale. Identify the original transaction with the same identifier you sent when recording it (omit amountRefunded for a full refund). Already-paid commissions are not clawed back (recorded for tax only). Targets campaignId if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | ||
| orderId | No | ||
| chargeId | No | ||
| currency | No | ||
| refundId | No | ||
| invoiceId | No | ||
| paymentId | No | ||
| campaignId | No | Target program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Pass the `id` returned by growsurf_create_campaign to configure or operate a program you just created, without restarting the server. | |
| externalId | No | ||
| description | No | ||
| refundAmount | No | ||
| refundStatus | No | ||
| amendmentType | No | ||
| participantId | No | ||
| transactionId | No | ||
| amountRefunded | No | ||
| paymentIntentId | No | ||
| participantEmail | No |
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. |