Accounting Invoice Payment Requests
Turn an invoice raised in Xero or QuickBooks Online into a RevKeen hosted checkout, without creating a RevKeen invoice. Depends on accounting connectors that are in development.
This API depends on the Xero and QuickBooks Online connectors, which are in development and cannot be installed yet. Every request needs the ID of one of those connections, so the API is not usable until a connector is available.
An accounting invoice payment request lets a customer pay an invoice that lives in your accounting system. You send RevKeen the invoice's details; RevKeen returns a hosted checkout URL for the amount due. RevKeen does not create its own invoice: the invoice in your accounting system stays the record of what is owed.
Create a payment request
POST /v2/integrations/accounting/invoice-payment-requests needs the integrations:write and checkout:write scopes, and an Idempotency-Key header.
curl https://staging-api.revkeen.com/v2/integrations/accounting/invoice-payment-requests \
-H "x-api-key: $REVKEEN_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"provider": "xero",
"connection_id": "<your accounting connection ID>",
"provider_account_id": "<your Xero organisation ID>",
"external_invoice": {
"id": "<the Xero invoice ID>",
"number": "INV-0042",
"due_at": "2026-10-31T00:00:00Z"
},
"external_customer": {
"name": "Harbour Physio Ltd",
"email": "accounts@example.co.uk"
},
"amount_due_minor": 18000,
"currency": "GBP",
"checkout": {
"success_url": "https://example.co.uk/paid",
"cancel_url": "https://example.co.uk/invoice",
"allowed_methods": ["card"]
}
}'| Field | Required | Meaning |
|---|---|---|
provider | Yes | xero or quickbooks_online |
connection_id | Yes | Your RevKeen accounting connection |
provider_account_id | Yes | The organisation or company ID in the accounting system |
external_invoice.id | Yes | The invoice's ID in the accounting system. Number, status, URL and dates are optional |
external_customer | No | The customer's ID, reference, name and email in the accounting system |
amount_due_minor | Yes | The amount to collect, in minor units: 18000 is £180.00 |
currency | Yes | Three-letter currency code |
checkout | No | success_url, cancel_url and allowed_methods (card, direct_debit, in_store) |
The response data includes checkout_url and checkout_expires_at. Send the customer to checkout_url to pay.
A new payment request returns 201. When RevKeen reuses an existing payment request for the invoice, it returns 200 with that request. A request that conflicts with an existing one returns 409.
Check a payment request
curl https://staging-api.revkeen.com/v2/integrations/accounting/invoice-payment-requests/<id> \
-H "x-api-key: $REVKEEN_API_KEY"This needs the integrations:read scope. The response shows the request's status, its sync_status and the checkout details.
TypeScript
The published @revkeen/sdk includes client.accounting.invoicePaymentRequestsCreate() and client.accounting.invoicePaymentRequestsGet(). Create needs an Idempotency-Key, so set it on the client you use for that call, as shown in Payment Intents.
Errors
| Status | Meaning |
|---|---|
400 | The body failed validation, Idempotency-Key is missing, or provider or provider_account_id does not match the connection |
401 | Missing, invalid or revoked API key |
404 | The connection, or the payment request, was not found in your account |
409 | The request conflicts with an existing payment request |
429 | Too many requests |
Related
Owner: david · Reviewed 30 Sep 2026 · Next review 30 Oct 2026