paymentSessions.refund
Process refunds for Ryft payment sessions by specifying session ID, amount, reason, and fee handling options to reverse transactions.
Instructions
Refund a Ryft payment session.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| amount | No | ||
| reason | No | ||
| refundPlatformFee | No |
Implementation Reference
- src/tools/payment-sessions.ts:109-117 (handler)The handler for 'paymentSessions.refund' which takes the ID and optional body parameters, validates them, and performs a POST request to the Ryft API.
registerTool( 'paymentSessions.refund', 'Refund a Ryft payment session.', refundSchema.shape, async (args) => { const parsed = refundSchema.parse(args); const { id, ...body } = parsed; return client.post(`/payment-sessions/${id}/refunds`, body); }, - src/tools/payment-sessions.ts:25-30 (schema)The Zod schema definition for the arguments accepted by 'paymentSessions.refund'.
const refundSchema = z.object({ id: z.string().min(1), amount: z.number().int().positive().optional(), reason: z.string().min(1).optional(), refundPlatformFee: z.boolean().optional(), });