trigger_refund
Issues a refund to an active customer, reduces their refundable balance, and validates the amount and reason before processing.
Instructions
Issues a refund to an active customer and reduces their refundable balance. The amount must be greater than 0, at most 1,000,000, have at most 2 decimal places, and not exceed the refundable balance. The reason must be 10 to 500 characters after trimming.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | ||
| reason | Yes | ||
| customer_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | ||
| reason | Yes | ||
| status | Yes | ||
| currency | Yes | ||
| refundId | Yes | ||
| customerId | Yes | ||
| processedAt | Yes | ||
| remainingRefundableBalance | Yes |