Create payment consent
Creates a JSR payment consent for an AUTHORISED enrollment. The
response is 201 Created with consentId and FIDO2 assertion options
under fidoSignOptions — pass them to navigator.credentials.get() before
calling Authorise payment.
The exported OpenAPI nests creditor oddly; send a normal payment.creditor
object with Pix fields as in other Lina Pay payment
docs. Optional payment.schedule supports scheduled Pix (e.g. single
future date).
For Tap on Pix (NFC), after decoding the qr query parameter from the
pix://… URI into the Pix Copia e Cola string, send isNFC: true and
qrCode with that decoded payload on this request. See
Tap on Pix (NFC).
/api/v1/jsr/consentsCreate payment and FIDO sign options
Creates a JSR consent and returns FIDO2 assertion options for the payer gesture.
Cabeçalhos
2 campossubTenantId●Subtenant identifier.
x-client-ip●End-user client IP.
Corpo da requisição
7 camposenrollmentId●Authorised enrollment id.
organisationId●Organisation id from participants.
authorisationServerId●Authorisation server id from participants.
isNFCSet to true for Tap on Pix (NFC) — proximity-initiated payment after reading the pix:// URI.
qrCodePix Copia e Cola string (decoded EMV BR Code from the Tap to Pix URI `qr` parameter). Required when using Tap on Pix (`isNFC` true).
fidoSignOptions●FIDO context for signing — rp and platform.
rpRelying Party id (CN of transport certificate).
platform●ANDROID | IOS | BROWSER | CROSS_PLATFORM
payment●Payment payload (instant or scheduled). Required fields match OpenAPI payment.required.
detailsHuman-readable description.
externalId●redirectUri●Callback URI pattern for your product (policy may mirror redirect flows).
cpfCnpjPayer document digits.
value●creditor●name●personType●cpfCnpj●accountNumber●accountIssuer●accountIspb●accountType●debitoraccountNumber●accountIssuer●accountIspb●accountType●scheduleOptional — omit for instant Pix. Populate exactly one nested branch (`single`, `daily`, `weekly`, `monthly`, or `custom`). Same rules as Scheduled & recurring Pix: first settlement at least D+1, up to 60 installments, last installment within two years of consent creation.
singleOne payment on a fixed calendar date (ISO date string).
date●Settlement date (`YYYY-MM-DD`).
dailyRecurring every calendar day from startDate for `quantity` installments.
startDate●First settlement date (`YYYY-MM-DD`).
quantity●Number of installments.
weeklyRecurring weekly on a fixed weekday.
dayOfWeek●Weekday constant (for example `QUARTA_FEIRA` in the API contract).
startDate●Anchor date (`YYYY-MM-DD`).
quantity●Number of installments.
monthlyRecurring monthly on a fixed day-of-month.
dayOfMonth●Calendar day (1–28/29/30/31 as applicable).
startDate●First month anchor (`YYYY-MM-DD`).
quantity●Number of installments.
customExplicit list of settlement dates.
dates●ISO date strings for each settlement.
additionalInformation●Human-readable note describing the custom pattern.
txIdOptional transaction ids.
businessCnpjOptional business CNPJ digits.
curl --request POST \
--url 'https://embedded-payment-manager.hml.linaob.com.br/api/v1/jsr/consents' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <SEU_TOKEN>' \
--header 'subTenantId: subtenant_abc123' \
--header 'x-client-ip: 198.21.104.1' \
--data '{
"enrollmentId": "enr_abc123",
"organisationId": "74e929d9-33b6-4d85-8ba7-c146c867a817",
"authorisationServerId": "c8f0bf49-4744-4933-8960-7add6e590841",
"isNFC": true,
"qrCode": "00020126580014br.gov.bcb.pix0136…",
"fidoSignOptions": {
"rp": "*.lina.com.br",
"platform": "BROWSER"
},
"payment": {
"details": "Invoice 123",
"externalId": "ext-123",
"redirectUri": "https://your-app.example.com/payments/done",
"cpfCnpj": "12345678901",
"value": 1500.5,
"creditor": {
"name": "Merchant SA",
"personType": "PESSOA_JURIDICA",
"cpfCnpj": "12345678000195",
"accountNumber": "1234567890",
"accountIssuer": "0001",
"accountIspb": "12345678",
"accountType": "CACC"
},
"debitor": {
"accountNumber": "9876543210",
"accountIssuer": "0001",
"accountIspb": "87654321",
"accountType": "CACC"
},
"schedule": {
"single": {
"date": "2024-09-01"
},
"daily": {
"startDate": "2024-09-01",
"quantity": 5
},
"weekly": {
"dayOfWeek": "QUARTA_FEIRA",
"startDate": "2024-09-01",
"quantity": 12
},
"monthly": {
"dayOfMonth": 10,
"startDate": "2024-09-01",
"quantity": 6
},
"custom": {
"dates": [
"2024-08-23",
"2024-09-26"
],
"additionalInformation": "Every Thursday and Sunday for six months"
}
},
"txId": [
"tx-ref-1"
],
"businessCnpj": "12345678000195"
}
}'Response
- dataobjectrequired
- idstringrequired
Payment request id — use as paymentRequestId when authorising.
- consentIdstringrequired
Consent id for authorise payment.
- fidoSignOptionsobjectrequired
Assertion options for navigator.credentials.get.
- messagestring
Response message.
- typestring
Envelope type.
- statusCodeinteger· nullable
HTTP status in envelope.
{
"data": {
"id": "pay_req_xyz",
"consentId": "consent_xyz",
"fidoSignOptions": {
"challenge": "challengeBase64url",
"timeout": 60000,
"rpId": "pay.example.com",
"allowCredentials": [
{
"id": "credId",
"type": "public-key"
}
],
"userVerification": "required"
}
},
"message": "Created",
"type": "success",
"statusCode": 201
}Next steps
- Authorise payment — submit risk signals and FIDO assertion to settle the Pix.