deletePaymentInstruction
Remove a specific x402 payment instruction from the Pinata MCP server by providing its unique identifier to manage payment records.
Instructions
Delete an x402 payment instruction
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The unique identifier of the payment instruction to delete |
Implementation Reference
- src/index.ts:1195-1231 (handler)The complete implementation of the deletePaymentInstruction tool - registers the tool with its schema and defines the handler that makes a DELETE request to Pinata's x402 payment instructions API
server.tool( "deletePaymentInstruction", "Delete an x402 payment instruction", { id: z .string() .describe("The unique identifier of the payment instruction to delete"), }, async ({ id }) => { try { const url = `https://api.pinata.cloud/v3/x402/payment_instructions/${id}`; const response = await fetch(url, { method: "DELETE", headers: getHeaders(), }); if (!response.ok) { throw new Error( `Failed to delete payment instruction: ${response.status} ${response.statusText}` ); } const data = await response.json(); return { content: [ { type: "text", text: `✅ Payment instruction deleted successfully\n\n${JSON.stringify(data, null, 2)}`, }, ], }; } catch (error) { return errorResponse(error); } } );