Refund a recorded payment. If an approval policy matches, responds 202 with { pending_approval: true, approval_instance_id, approval_status_url, message }; poll GET /approvals/:id.
Refund a recorded payment. If an approval policy matches, responds 202 with { pending_approval: true, approval_instance_id, approval_status_url, message }; poll GET /approvals/:id.
POST
https://staging.softsolz.uk/api/v1/services/invoicing/refundsRecent Requests
Log in to see full request historyTimeStatusUser Agent
Make a request to see history.
Headers
AuthorizationstringrequiredBearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.
Idempotency-KeystringOptional idempotency key for safe retries.
Body Params
invoice_idintegerInvoice the payment was applied to.
customer_payment_idintegerPayment to refund (from invoice detail payments[].id).
amountnumber | stringRefund amount in major units (> 0, max 2 decimal places, <= refundable balance; numeric strings accepted).
currencystringDefaults to the payment/invoice currency.
methodstringRefund method (free-text; default "manual").
reasonstring | nullOptional reason.
Response
Response Body
idintegerRefund id.invoice_idintegerInvoice id.customer_payment_idintegerRefunded payment id.amountstringRefund amount, numeric string.statusstringRefund status.Request
import { SoftSolz } from '@softsolz/sdk';
const client = new SoftSolz({ apiKey: process.env.SOFTSOLZ_API_KEY });
const result = await client.invoicing.createRefund({});console.log(result);Credentials
Sent as a Bearer token. Stored only in your browser.
Response · 201
{ "data": { "id": 0, "invoice_id": 0, "customer_payment_id": 0, "amount": "string", "status": "string" }}