curl --request PATCH \
--url https://app.orgo.space/api/v1/invoices/{id}/refund \
--header 'Api-Token: <api-key>' \
--header 'Content-Type: application/merge-patch+json' \
--data '{}'import requests
url = "https://app.orgo.space/api/v1/invoices/{id}/refund"
payload = {}
headers = {
"Api-Token": "<api-key>",
"Content-Type": "application/merge-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Api-Token': '<api-key>', 'Content-Type': 'application/merge-patch+json'},
body: JSON.stringify({})
};
fetch('https://app.orgo.space/api/v1/invoices/{id}/refund', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.orgo.space/api/v1/invoices/{id}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Api-Token: <api-key>",
"Content-Type: application/merge-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.orgo.space/api/v1/invoices/{id}/refund"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Api-Token", "<api-key>")
req.Header.Add("Content-Type", "application/merge-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.orgo.space/api/v1/invoices/{id}/refund")
.header("Api-Token", "<api-key>")
.header("Content-Type", "application/merge-patch+json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.orgo.space/api/v1/invoices/{id}/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Api-Token"] = '<api-key>'
request["Content-Type"] = 'application/merge-patch+json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"id": 42,
"invoiceNumber": 42,
"seriesNumber": "string",
"user": {
"id": 42,
"firstName": "James",
"lastName": "Patterson",
"email": "james.patterson@example.com",
"fullName": "James Patterson",
"companyIdentifier": "US-123456789",
"companyName": "Civic Collective LLC",
"companyAddress": "123 Beacon Street, Boston, MA 02108",
"companyRegNo": "DE-HRB-12345"
},
"contact": {
"id": 42,
"name": "Boston Chapter",
"email": "james.patterson@example.com",
"companyIdentifier": "US-123456789",
"companyName": "Civic Collective LLC",
"companyAddress": "123 Beacon Street, Boston, MA 02108",
"customFieldValues": [
"/api/v1/custom_field_values/1"
],
"professionOrganisationRole": "Civic Collective",
"companyRegNo": "DE-HRB-12345",
"status": "/api/v1/profile_statuses/1",
"lastStatusUpdate": "2026-01-15T10:30:00+00:00",
"fullName": "James Patterson",
"firstName": "James",
"lastName": "Patterson"
},
"company": {
"uuid": "01938d8e-9c4f-7c2a-b8e1-3f7a9b8c4f12",
"name": "Boston Chapter",
"legalName": "Boston Chapter"
},
"amount": 50,
"invoicedFor": "string",
"type": "MEMBER",
"body": "<p>Hello {{firstName}},</p><p>You're invited.</p>",
"status": "ACTIVE",
"internalNotes": "Joined via the Boston outreach drive on 2026-01-10.",
"dateCreated": "2026-01-15T10:30:00+00:00",
"dateUpdated": "2026-01-15T10:30:00+00:00",
"invoiceDate": "2026-01-15T10:30:00+00:00",
"dateRefunded": "2026-01-15T10:30:00+00:00",
"refundedBy": {
"id": 42,
"firstName": "James",
"lastName": "Patterson",
"email": "james.patterson@example.com",
"fullName": "James Patterson",
"companyIdentifier": "US-123456789",
"companyName": "Civic Collective LLC",
"companyAddress": "123 Beacon Street, Boston, MA 02108",
"companyRegNo": "DE-HRB-12345"
},
"membershipStartDate": "2026-01-15T10:30:00+00:00",
"membershipEndDate": "2026-01-15T10:30:00+00:00",
"isMembership": true,
"membershipProductPrice": "/api/v1/product_prices/1",
"series": "string",
"invoiceDueDate": "2026-01-15T10:30:00+00:00",
"quantity": 42,
"taxValue": 42,
"taxName": "Boston Chapter",
"memo": "string",
"footer": "string",
"vatExemptionNote": "Joined via Boston outreach drive.",
"customFields": [
"string"
],
"billingName": "Boston Chapter",
"billingAddress": "123 Beacon Street, Boston, MA 02108",
"billingRegistrationNumber": "string",
"billingVatNumber": "US123456789",
"billingEmail": "james.patterson@example.com",
"billingPhone": "+1 415 555 0142",
"billingPhoneCountry": "+1 415 555 0142",
"items": [
{
"id": 42,
"description": "Quarterly chapter meeting open to all members.",
"descriptionNote": "Joined via Boston outreach drive.",
"quantity": 42,
"unitPrice": 50,
"vatRate": 0.1,
"vatExempt": true,
"lineNet": 12.5,
"lineVatAmount": 50,
"lineTotal": 50
}
],
"unitPrice": 50,
"subtotal": 50,
"taxAmount": 50,
"totalWithTax": 50,
"vatBreakdown": [
"string"
],
"amountPaid": 50,
"balanceDue": 12.5
}Refund a paid invoice
Marks a paid invoice as refunded (record-keeping only; no payment gateway call). Sets status to refunded, records refundedBy and dateRefunded, and unwinds linked side-effects: ProductPayment becomes refunded; event registration EventAttends are canceled and ticket capacity is released; user fee validity is recomputed from remaining paid payments; company membership is rolled back from history. Adds a REFUNDED badge to the invoice HTML. Does not send email. Requires ADMIN_TENANT permission.
curl --request PATCH \
--url https://app.orgo.space/api/v1/invoices/{id}/refund \
--header 'Api-Token: <api-key>' \
--header 'Content-Type: application/merge-patch+json' \
--data '{}'import requests
url = "https://app.orgo.space/api/v1/invoices/{id}/refund"
payload = {}
headers = {
"Api-Token": "<api-key>",
"Content-Type": "application/merge-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Api-Token': '<api-key>', 'Content-Type': 'application/merge-patch+json'},
body: JSON.stringify({})
};
fetch('https://app.orgo.space/api/v1/invoices/{id}/refund', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.orgo.space/api/v1/invoices/{id}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Api-Token: <api-key>",
"Content-Type: application/merge-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.orgo.space/api/v1/invoices/{id}/refund"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Api-Token", "<api-key>")
req.Header.Add("Content-Type", "application/merge-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.orgo.space/api/v1/invoices/{id}/refund")
.header("Api-Token", "<api-key>")
.header("Content-Type", "application/merge-patch+json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.orgo.space/api/v1/invoices/{id}/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Api-Token"] = '<api-key>'
request["Content-Type"] = 'application/merge-patch+json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"id": 42,
"invoiceNumber": 42,
"seriesNumber": "string",
"user": {
"id": 42,
"firstName": "James",
"lastName": "Patterson",
"email": "james.patterson@example.com",
"fullName": "James Patterson",
"companyIdentifier": "US-123456789",
"companyName": "Civic Collective LLC",
"companyAddress": "123 Beacon Street, Boston, MA 02108",
"companyRegNo": "DE-HRB-12345"
},
"contact": {
"id": 42,
"name": "Boston Chapter",
"email": "james.patterson@example.com",
"companyIdentifier": "US-123456789",
"companyName": "Civic Collective LLC",
"companyAddress": "123 Beacon Street, Boston, MA 02108",
"customFieldValues": [
"/api/v1/custom_field_values/1"
],
"professionOrganisationRole": "Civic Collective",
"companyRegNo": "DE-HRB-12345",
"status": "/api/v1/profile_statuses/1",
"lastStatusUpdate": "2026-01-15T10:30:00+00:00",
"fullName": "James Patterson",
"firstName": "James",
"lastName": "Patterson"
},
"company": {
"uuid": "01938d8e-9c4f-7c2a-b8e1-3f7a9b8c4f12",
"name": "Boston Chapter",
"legalName": "Boston Chapter"
},
"amount": 50,
"invoicedFor": "string",
"type": "MEMBER",
"body": "<p>Hello {{firstName}},</p><p>You're invited.</p>",
"status": "ACTIVE",
"internalNotes": "Joined via the Boston outreach drive on 2026-01-10.",
"dateCreated": "2026-01-15T10:30:00+00:00",
"dateUpdated": "2026-01-15T10:30:00+00:00",
"invoiceDate": "2026-01-15T10:30:00+00:00",
"dateRefunded": "2026-01-15T10:30:00+00:00",
"refundedBy": {
"id": 42,
"firstName": "James",
"lastName": "Patterson",
"email": "james.patterson@example.com",
"fullName": "James Patterson",
"companyIdentifier": "US-123456789",
"companyName": "Civic Collective LLC",
"companyAddress": "123 Beacon Street, Boston, MA 02108",
"companyRegNo": "DE-HRB-12345"
},
"membershipStartDate": "2026-01-15T10:30:00+00:00",
"membershipEndDate": "2026-01-15T10:30:00+00:00",
"isMembership": true,
"membershipProductPrice": "/api/v1/product_prices/1",
"series": "string",
"invoiceDueDate": "2026-01-15T10:30:00+00:00",
"quantity": 42,
"taxValue": 42,
"taxName": "Boston Chapter",
"memo": "string",
"footer": "string",
"vatExemptionNote": "Joined via Boston outreach drive.",
"customFields": [
"string"
],
"billingName": "Boston Chapter",
"billingAddress": "123 Beacon Street, Boston, MA 02108",
"billingRegistrationNumber": "string",
"billingVatNumber": "US123456789",
"billingEmail": "james.patterson@example.com",
"billingPhone": "+1 415 555 0142",
"billingPhoneCountry": "+1 415 555 0142",
"items": [
{
"id": 42,
"description": "Quarterly chapter meeting open to all members.",
"descriptionNote": "Joined via Boston outreach drive.",
"quantity": 42,
"unitPrice": 50,
"vatRate": 0.1,
"vatExempt": true,
"lineNet": 12.5,
"lineVatAmount": 50,
"lineTotal": 50
}
],
"unitPrice": 50,
"subtotal": 50,
"taxAmount": 50,
"totalWithTax": 50,
"vatBreakdown": [
"string"
],
"amountPaid": 50,
"balanceDue": 12.5
}Authorizations
Server-to-server authentication. Generate a token in the admin UI at
Settings → Developers → API Access. Send the raw token in the
Api-Token header — there is no Bearer prefix.
Tokens can be marked read-only at creation time, in which case the API
rejects any non-GET request with 403 Forbidden.
Body
The updated Invoice resource
The body is of type object.
Response
Invoice resource updated

