RAPIDPAY / INTEGRATIONS

Invoicing API to bring RapidPay into your business

Automate invoice creation and connect RapidPay to your applications through our API.

API v1 depends on your environment and keys. This page contains a quickstart; it does not grant a plan or production tax submission.

RAPIDPAY / API V1HTTP · JSON
POST /api/v1/invoices
Authorization: Bearer rp_v1_...
Idempotency-Key: order-001
Content-Type: application/json

201 Created / 202 Accepted
GET /api/v1/invoice-operations/{operationId}
GET /api/v1/invoices/{invoiceId}/pdf

Your app sends data. RapidPay issues the invoice.

An authenticated REST request creates an invoice for the issuer who owns the key. Then check the operation and download the PDF with the same application identity.

1 / Your own key

Create a revocable key under Issuer → API keys. Keep it as a server secret, never in public JavaScript.

2 / Safe request

Bearer identifies your app; Content-Type says JSON. Idempotency-Key is a unique reference per invoice so a retry does not issue another.

3 / Checkable result

201 means a completed local operation with VERI*FACTU off. 202 means a pending TEST operation, not AEAT acceptance. Check statusUrl before using pdfUrl.

The essentials for your workflow.

Ordinary invoice: existing customer (companyId) or full inline buyer. Simplified invoice: no full buyer; EUR 3,000 gross limit.

EUR needs no exchange object. Other currencies require a matching bank account and exchange.mode: ecb (latest observation by issueDate) or custom with a validated rate.

A real request, with no real keys.

Before sending: issuer profile, active EUR account, key with invoices:create and an API v1 environment. Replace the domain, fake key, sample data and date; the base URL varies by environment.

Method and headers

POST https://YOUR_API_ORIGIN/api/v1/invoices
Authorization: Bearer rp_v1_EXAMPLE_NOT_A_REAL_KEY
Idempotency-Key: demo-20261022-001
Content-Type: application/json

Ordinary invoice

{
  "invoiceKind": "ordinary",
  "issueDate": "2026-10-22",
  "currency": "EUR",
  "recipientEmail": "delivery@example.test",
  "invoiceDescription": "Servicio para el proyecto Álamo.\nFase 1",
  "buyer": {
    "legalName": "Empresa de ejemplo S.L.",
    "taxId": "00000000T",
    "email": "facturacion@example.test",
    "addressLine1": "Calle Ejemplo 1",
    "postalCode": "28001",
    "city": "Madrid",
    "community": "Madrid",
    "country": "ES"
  },
  "paymentMethod": "bank_transfer",
  "lines": [
    {
      "description": "Servicio de ejemplo",
      "quantity": 1,
      "unitNetCents": 10000,
      "discountRate": 0,
      "taxRate": 21,
      "taxOperation": "S1"
    }
  ]
}

Simplified invoice

{
  "invoiceKind": "simplified",
  "issueDate": "2026-10-22",
  "currency": "EUR",
  "simplifiedCustomerReference": "Counter sale 001",
  "recipientEmail": "delivery@example.test",
  "paymentMethod": "card",
  "lines": [
    {
      "description": "Service example",
      "quantity": 1,
      "unitNetCents": 1000,
      "discountRate": 0,
      "taxRate": 21,
      "taxOperation": "S1"
    }
  ]
}

Omit buyer and due date; EUR 3,000 gross maximum. Optional recipientEmail works for both invoice kinds: it overrides buyer email for delivery only, without changing the PDF. If omitted, buyer email is used; for simplified invoices, a reference consisting entirely of one valid email also works for compatibility.

invoiceDescription is an optional plain-text field for ordinary F1 and replacement F3 invoices, not rectificative or simplified invoices. It is stored and immutable after issue, and appears in the PDF. It allows 150 Unicode code points and 5 entered lines after CRLF-to-LF and NFC normalization. Automatic PDF wrapping does not count as an entered line. Over-limit values return 422.

Same key and same body return the same invoice. Change the body with that key and you get 409. Use a new idempotency key (8–128 URL-safe characters) for a new invoice.

201 includes invoice.pdfUrl after local completion. For 202, GET statusUrl with the same application identity and invoices:read scope; only a final status includes invoice.pdfUrl. Download the PDF with Bearer too. There is no v1 webhook.

Your first API request in a few steps.

Install Bruno, a free, open-source API client for Mac and Windows.

  1. Create a collection and add a request POST {{baseUrl}}/api/v1/invoices.
  2. Save the key as a secret variable in your local environment. In Auth, select Bearer and use the variable. {{apiKey}}
  3. In Headers, add a unique key and the JSON content type. Idempotency-Key · Content-Type: application/json
  4. In Body → JSON, paste an example. Click Send to see the response. Use a new idempotency key whenever you change the request.