Skip to main content
Glama

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
NameRequiredDescriptionDefault
idYes
amountNo
reasonNo
refundPlatformFeeNo

Implementation Reference

  • 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);
      },
  • 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(),
    });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bkawk/ryft-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server