Accounting Integrations

Create an accounting-led invoice payment request

Claims or reuses an ExternalAccountingInvoicePaymentRequest and mints a provider-neutral checkout session. Does not create a RevKeen invoice. Requires Idempotency-Key.

POST/integrations/accounting/invoice-payment-requests

Claims or reuses an ExternalAccountingInvoicePaymentRequest and mints a provider-neutral checkout session. Does not create a RevKeen invoice. Requires Idempotency-Key.


Related endpoints

  • GET /integrations/accounting/invoice-payment-requests/{id} — Get an accounting-led invoice payment request

Common errors

  • 400 invalid_request — malformed payload or failed validation.
  • 404 resource_missing — the referenced resource does not exist or is not visible to your key.
  • 409 conflict — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.

Idempotency

Pass an Idempotency-Key header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see the idempotency guide.

x-api-key<token>

Your RevKeen merchant API key. Create and manage keys in Dashboard → Settings → Developer. Use rk_sandbox_* for staging/test and rk_live_* for production. The same key may be sent as Authorization: Bearer <key> if that suits your HTTP client better. A missing, invalid, expired, or revoked key returns 401 with a WWW-Authenticate: Bearer challenge; a valid key without the required scope returns 403.

In: header

Header Parameters

Idempotency-Key*string

Required stable key for this logical payment request. Reuse the same key only with an identical request.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Create an accounting-led invoice payment request and mint/reuse a checkout session.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

Stuck on an error response? Ask the RevKeen assistant to explain it.
curl -X POST "https://api.revkeen.com/v2/integrations/accounting/invoice-payment-requests" \
  -H "x-api-key: $REVKEEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "quickbooks_online",
    "connection_id": "11111111-1111-4111-8111-111111111111",
    "provider_account_id": "practicehub",
    "external_invoice": {
      "id": "rk_example_id"
    },
    "amount_due_minor": 1000,
    "currency": "USD"
  }'

Synthetic documentation data, validated against the response schema; not a live API result.

{  "data": {    "id": "2b3c4d5e-6f7a-4685-ac93-0e1f2a3b4c56",    "object": "accounting_invoice_payment_request",    "merchant_id": "8f14e45f-ceea-4e7a-9b4b-7c3f1a2d5e60",    "provider": "xero",    "connection_id": "1a2b3c4d-5e6f-4674-9b82-9d0e1f2a3b45",    "provider_account_id": "example-tenant-0001",    "external_invoice_id": "example-invoice-0001",    "external_invoice_number": "ACC-1001",    "external_invoice_status": "AUTHORISED",    "external_invoice_url": "https://example.com/accounting/invoices/ACC-1001",    "external_invoice_issued_at": "2026-04-20T09:00:00.000Z",    "external_invoice_due_at": "2026-05-20T09:00:00.000Z",    "external_invoice_updated_at": "2026-04-20T09:00:00.000Z",    "external_customer_id": "example-contact-0001",    "external_customer_reference": "CRM-10482",    "external_customer_name": "Analytical Engines Ltd",    "external_customer_email": "accounts@example.com",    "amount_due_minor": 12000,    "total_amount_minor": 12000,    "amount_paid_minor": 0,    "currency": "GBP",    "checkout_session_id": "3c4d5e6f-7a8b-4696-8da4-1f2a3b4c5d67",    "checkout_url": "https://example.com/checkout/3c4d5e6f-7a8b-4696-8da4-1f2a3b4c5d67",    "checkout_expires_at": "2026-04-21T09:00:00.000Z",    "checkout_success_url": "https://example.com/invoices/paid",    "checkout_cancel_url": "https://example.com/invoices/cancelled",    "checkout_allowed_methods": [      "card"    ],    "status": "checkout_created",    "sync_status": "not_started",    "idempotency_key": "acc-1001-payment-request",    "payload_fingerprint": "3f2a9c7e1b4d8a60",    "created_at": "2026-04-20T09:00:05.000Z",    "updated_at": "2026-04-20T09:00:06.000Z"  },  "requestId": "00000000-0000-4000-8000-000000000001"}