Create payment consent
Creates a JSR payment consent for an AUTHORISED enrollment. The
response is 201 Created with id (the payment request id — use it as
paymentRequestId when authorising), consentId, and FIDO2 assertion
options under fidoSignOptions — pass them to navigator.credentials.get()
before calling Authorise payment.
The request body is just { enrollmentId, payment } — the institution
(organisationId / authorisationServerId) and the FIDO relying-party
context are already resolved from the enrollment, so they are not sent again
here.
/api/v1/jsr/consentsCreate payment and FIDO sign options
Creates a JSR consent and returns FIDO2 assertion options for the payer gesture.
Headers
2 camposx-client-ip●End-user client IP.
subTenantIdSub-tenant ID when required by the authenticated user context.
Request body
2 camposenrollmentId●Authorised enrollment id used to sign the payment consent.
payment●Payment payload.
detailsHuman-readable description.
externalIdYour correlation id.
redirectUri●Redirect URI for this payment.
cpfCnpj●Debtor CPF/CNPJ.
valuePayment value. Must not be provided when qrCode already has a value — the value is extracted from the QR Code in that case.
creditorCreditor details. Must not be provided when qrCode is provided, since the creditor is resolved from the QR Code.
name●personType●cpfCnpj●accountNumber●accountIssuer●accountPixKey●accountIspb●accountType●txIdTransaction identification(s). Must not be provided when qrCode is provided, since txId is extracted from the QR Code.
businessCnpjCompany CNPJ (optional); stored without punctuation.
qrCodePix QR Code (static or dynamic), or the raw Tap on Pix pix:// NFC URL — both are parsed internally. When provided with a value, creditor, txId and value must not be provided. When provided without a value, creditor and txId must not be provided (value may be provided).
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 'x-client-ip: 198.21.104.1' \
--header 'subTenantId: subtenant_abc123' \
--data '{
"enrollmentId": "enr_abc123",
"payment": {
"details": "Payment for services",
"externalId": "ext123",
"redirectUri": "http://example.com/redirect",
"cpfCnpj": "12345678901234",
"value": 1500.5,
"creditor": {
"name": "John Doe",
"personType": "PESSOA_NATURAL",
"cpfCnpj": "12345678901234",
"accountNumber": "1234567890",
"accountIssuer": "0001",
"accountPixKey": "email@example.com",
"accountIspb": "12345678",
"accountType": "CACC"
},
"txId": [
"ext123",
"ext1234"
],
"businessCnpj": "12345678000195",
"qrCode": "00020126580014BR.GOV.BCB.PIX0136123e4567-e12b-12d1-a456-426655440000520400005303986540512.005802BR5901N6001C62210517testePagamento1236304DB67"
}
}'Response
- dataobjectrequired
- consentIdstringrequired
Consent id.
- idstringrequired
Payment request id — use as paymentRequestId when authorising.
- fidoSignOptionsobjectrequired
Assertion options for navigator.credentials.get.
- messagestring
Response message.
- typestring
Envelope type.
- statusCodeinteger· nullable
HTTP status in envelope.
{
"data": {
"consentId": "consent_xyz",
"id": "pay_req_xyz",
"fidoSignOptions": {
"challenge": "challengeBase64url",
"timeout": 60000,
"rpId": "pay.example.com",
"allowCredentials": [
{
"id": "credId",
"type": "public-key"
}
],
"userVerification": "required",
"extensions": {}
}
},
"message": "",
"type": "success",
"statusCode": null
}Next steps
- Authorise payment — submit the enrollment and payment request id to settle the Pix.