Payments API
Create, list, refresh and cancel hosted payment links and read receivables figures.
Payments lets your workspace collect money from your own customers through a payment provider you have connected (Razorpay). This API creates and tracks hosted payment links. Connecting the provider account itself (its keys) is done in the app, and the keys are never returned by the API.
This is separate from your AxisIQ subscription: here your workspace charges its customers with your provider account.
If the Invoices & Payments app is switched off in Settings › Apps, these routes answer 404 NOT_FOUND.
Endpoints
| Method | Path | Permission | What it does |
|---|---|---|---|
GET |
/orgs/{orgId}/payments/connections |
payments:read |
List connected provider accounts |
GET |
/orgs/{orgId}/payments/links |
payments:read |
List payment links |
POST |
/orgs/{orgId}/payments/links |
payments:collect |
Create a payment link |
GET |
/orgs/{orgId}/payments/links/{linkId} |
payments:read |
Get a link |
POST |
/orgs/{orgId}/payments/links/{linkId}/cancel |
payments:collect |
Cancel an unpaid link |
POST |
/orgs/{orgId}/payments/links/{linkId}/refresh |
payments:collect |
Re-check the status with the provider |
GET |
/orgs/{orgId}/payments/overview |
payments:read |
Receivables and collections summary |
POST |
/orgs/{orgId}/payments/links/{linkId}/refund |
payments:refund |
Refund a paid link, fully or in part |
GET |
/orgs/{orgId}/payments/links/{linkId}/refunds |
payments:read |
A link's refunds |
Connections can also be created, edited, tested and deleted (payments:manage), but that involves provider secrets, so use the app. GET …/connections returns a plain array. GET …/links/{linkId} answers 404 NOT_FOUND for an unknown link.
Connections
{
"id": "0190f300-…",
"provider": "razorpay",
"name": "Main account",
"mode": "live",
"redirect_url": "https://example.com/thanks",
"status": "ok",
"last_checked_at": "2026-10-04T09:00:00Z",
"created_at": "2026-10-01T08:00:00Z"
}
id is the connection_id you pass when creating a link. redirect_url is where a payer is sent after paying, unless a link sets its own. last_error appears when the last check failed. Secrets are never included.
The link object
{
"id": "0190f301-…",
"connection_id": "0190f300-…",
"provider": "razorpay",
"short_url": "https://pay.example.com/AbC123",
"amount": "12500.00",
"currency": "INR",
"status": "created",
"description": "Invoice INV-1001",
"invoice_id": "0190f0aa-…",
"customer_name": "Asha Rao",
"customer_email": "asha@example.com",
"customer_contact": "+919876543210",
"created_at": "2026-10-04T09:30:00Z"
}
status is created (waiting to be paid), paid, cancelled or expired. When it is paid, paid_at and payment_record_id appear. The payment record is an ordinary payments record you can read through the Records API.
short_url is the page you send to the customer.
POST /orgs/{orgId}/payments/links
Permission: payments:collect.
| Field | Type | Required | Notes |
|---|---|---|---|
connection_id |
string | Yes | A connection id |
amount |
string | Yes, unless invoice_id is given |
A positive decimal such as "12500.00" |
currency |
string | No | ISO 4217 code. Default: the invoice's currency, else the workspace default currency |
description |
string | No | Shown to the payer |
invoice_id |
string | No | An invoice record. Fills the amount and currency when you leave them out. You must be able to read that invoice |
redirect_url |
string | No | Where the payer goes afterwards. Overrides the connection's |
customer_name, customer_email, customer_contact |
string | No | Pre-fill the payer's details |
curl -s -X POST https://axisiq.co/api/v1/orgs/$ORG/payments/links \
-H "Authorization: Bearer $AXIS_KEY" -H "Content-Type: application/json" \
-d '{"connection_id": "0190f300-…", "invoice_id": "0190f0aa-…", "customer_email": "asha@example.com"}'
Response 201 with the link object.
Errors
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_ERROR |
Missing or invalid amount, bad connection or invoice id, an invoice that does not exist or that your role cannot read ("invoice not found or not accessible"), a redirect_url that is not an absolute http(s) address |
| 403 | FORBIDDEN |
The role lacks payments:collect |
| 404 | NOT_FOUND |
No such connection, or an invoice the caller cannot read (invoice not found) |
GET /orgs/{orgId}/payments/links
Cursor paging, newest first. limit (default 50, maximum 100) and cursor. The response is an array of link objects; to get the next page pass the id of the last link as cursor.
How a link becomes paid
When the customer pays, your provider notifies AxisIQ and the link turns paid. AxisIQ then creates a payments record. If the link was made for an invoice that Invoices & Payments manages, that payment settles the invoice (its paid and due amounts update).
To receive that notification, open Invoices & Payments › Connections, edit the connection, and paste the webhook address shown there into your provider's dashboard. If a notification is ever missed, call POST …/links/{linkId}/refresh. It re-checks the provider and updates the link, which is safe to repeat.
POST /orgs/{orgId}/payments/links/{linkId}/cancel
Cancels a link that has not been paid. Response 200 with the link.
POST /orgs/{orgId}/payments/links/{linkId}/refund
Permission: payments:refund (separate from payments:collect, because money leaves the account).
| Field | Type | Required | Notes |
|---|---|---|---|
amount |
string | No | A positive decimal. Blank refunds everything still refundable |
reason |
string | No | Up to 500 characters |
Send an Idempotency-Key header with a value of your own (a UUID). Repeating the request with the same key returns the first refund and never refunds twice.
curl -s -X POST https://axisiq.co/api/v1/orgs/$ORG/payments/links/$LINK/refund \
-H "Authorization: Bearer $AXIS_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: 7d3c9f1e-5a2b-4c8d-9e0f-1a2b3c4d5e6f" \
-d '{"amount": "1500.00", "reason": "One item returned"}'
Response 201:
{
"data": {
"id": "0190f310-…",
"link_id": "0190f301-…",
"amount": "1500.00",
"currency": "INR",
"status": "processed",
"reason": "One item returned",
"payment_record_id": "0190f311-…",
"created_by": "0190f0…",
"created_at": "2026-10-14T10:02:00Z",
"processed_at": "2026-10-14T10:02:03Z"
}
}
status is pending (the provider is still processing it), processed or failed (with error). A processed refund adds a payments record with a negative amount, so collections and the linked invoice's amount due are net of it. Refunding more than was paid less earlier refunds is 400 VALIDATION_ERROR; a link that is not paid cannot be refunded. GET …/links carries refunded on each link.
GET /orgs/{orgId}/payments/overview
The app's home figures: open and overdue receivables by currency, aging buckets (current, 1 to 30, 31 to 60, 61 to 90, 90+ days), top debtors, the oldest overdue invoices, payments collected per month and link counts per status. Invoice and payment figures only include what your role may read.
Related
- Accounting
- Records
- In the product: Invoices and payments