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.
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 API key (powered by Unkey). Get it from Dashboard > Settings > API Keys. Use rk_sandbox_* for test mode and rk_live_* for production.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
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": "00000000-0000-0000-0000-000000000000",
"provider_account_id": "string",
"external_invoice": {
"id": "string",
"number": null,
"status": null,
"url": null,
"issued_at": null,
"due_at": null,
"updated_at": null
},
"external_customer": null,
"amount_due_minor": 0,
"total_amount_minor": null,
"amount_paid_minor": null,
"currency": "string",
"checkout": null,
"payload_fingerprint": null,
"provider_metadata": null,
"safe_provider_invoice_snapshot": null
}'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"object": "accounting_invoice_payment_request",
"merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",
"provider": "string",
"connection_id": "d3547de1-d1f2-4344-b4c2-17169b7526f9",
"provider_account_id": "string",
"external_invoice_id": "string",
"external_invoice_number": "string",
"external_invoice_status": "string",
"external_invoice_url": "string",
"external_invoice_issued_at": "string",
"external_invoice_due_at": "string",
"external_invoice_updated_at": "string",
"external_customer_id": "string",
"external_customer_reference": "string",
"external_customer_name": "string",
"external_customer_email": "string",
"amount_due_minor": 0,
"total_amount_minor": 0,
"amount_paid_minor": 0,
"currency": "string",
"checkout_session_id": "119f7182-f55f-49cd-a2a6-13462e02671c",
"checkout_url": "string",
"checkout_expires_at": "string",
"checkout_success_url": "string",
"checkout_cancel_url": "string",
"checkout_allowed_methods": [
"string"
],
"status": "string",
"sync_status": "string",
"idempotency_key": "string",
"payload_fingerprint": "string",
"created_at": "string",
"updated_at": "string"
},
"requestId": "string"
}{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"object": "accounting_invoice_payment_request",
"merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",
"provider": "string",
"connection_id": "d3547de1-d1f2-4344-b4c2-17169b7526f9",
"provider_account_id": "string",
"external_invoice_id": "string",
"external_invoice_number": "string",
"external_invoice_status": "string",
"external_invoice_url": "string",
"external_invoice_issued_at": "string",
"external_invoice_due_at": "string",
"external_invoice_updated_at": "string",
"external_customer_id": "string",
"external_customer_reference": "string",
"external_customer_name": "string",
"external_customer_email": "string",
"amount_due_minor": 0,
"total_amount_minor": 0,
"amount_paid_minor": 0,
"currency": "string",
"checkout_session_id": "119f7182-f55f-49cd-a2a6-13462e02671c",
"checkout_url": "string",
"checkout_expires_at": "string",
"checkout_success_url": "string",
"checkout_cancel_url": "string",
"checkout_allowed_methods": [
"string"
],
"status": "string",
"sync_status": "string",
"idempotency_key": "string",
"payload_fingerprint": "string",
"created_at": "string",
"updated_at": "string"
},
"requestId": "string"
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}