Skip to content
Developer Docs

Create PagaFactu flow

POST
/pagafactu/v1/flows/pagafactu

Creates a flow optimized for invoice collection, automatically generating the operation and the payment URL. Designed for ERP use cases where the collection is tied to an invoice.

Returns synchronously in the same response the payment URL to send to the customer and — when invoice.generateDocument is true — a base64-encoded PDF with a QR code.

Must be sent as multipart/form-data with a payload part containing the JSON body. To attach your own invoice PDF, add a second multipart part whose name matches operations[].invoice.id; Zertiban appends a PagaFactu page with the QR to the end of that document. Maximum PDF size: 8 MB.

Once the customer opens the returned URL, picks their bank and authorizes the SEPA transfer via PSD2 SCA, the operation transitions through OPENED to COMPLETED and a webhook is delivered to the registered endpoint. Reconcile using the externalId you provided.

Authorizations

OAuth2

OAuth2 security scheme

clientCredentials Flow
Token URL"/api/v2/auth/token"
Scopes:
  • "zertiban-api"Access to the API

Parameters

Header Parameters

x-tenant-id*

UUID of the business (businessUuid) under which the flow is
created. Required on every call; identifies the tenant whose
configuration, beneficiary accounts and webhook subscriptions
apply to the request.

Type
string
Required
Format
"uuid"

Request Body

multipart/form-data
object
object

Optional invoice PDF to attach to the operation. The
multipart part name (here invoice-file) must exactly
match the operations[].invoice.id value in the
payload. When attached and invoice.generateDocument
is true, Zertiban appends a PagaFactu page with the QR
to the last page of the supplied PDF. Maximum size: 8 MB.
If invoice.generateDocument is false the file is
silently ignored and no document is returned.

Format"binary"

Responses

PagaFactu flow created. The response includes the flow UUID, the
created operation with its payment URL and, when requested, the
generated PDF as a base64 string.

application/json
JSON
{
  
"uuid": "28ffd216-5ee8-4e99-b1a9-511961e9c655",
  
"createdAt": "2025-09-10T10:00:00Z",
  
"operations": [
  
  
{
  
  
  
"uuid": "b7aa09fe-5678-1234-90ab-cdef98765432",
  
  
  
"url": "https://nc-api-sandbox.zertiban.com/link-validator/v1/links/eyJhbGciO...",
  
  
  
"document": "iVBORw0KGgoAA...."
  
  
}
  
]
}

Playground

Authorization
Headers
Body

Samples