Pular para o conteúdo

Create a consent

Opens a payment consent for the end user. The response carries a redirectUrl that the user must visit to authenticate at the account holder and approve the payment. The institution is identified by the organisationId and authorisationServerId returned by Get registered participants.

POST/api/v1/open-integration/consents

Create a consent

Opens a payment consent and returns the redirectUrl the end user must visit to authenticate at the account holder.

Auth: Bearer Token

Corpo da requisição

3 campos
organisationId
bodystring

OrganisationId of the selected institution (from Get registered participants).

authorisationServerId
bodystring

AuthorisationServerId of the selected institution.

payment
bodyobject

Payment details.

details
bodystring

Human-readable description of the payment.

document
bodystring

Payment document identifier.

externalId
bodystring

Your own identifier for the payment. Useful for cross-referencing and for lookups via `GET /payments/external/{externalId}`.

redirectUri
bodystring

URL the end user is redirected to once the payment flow completes at the account holder. You are responsible for keeping it available.

cpfCnpj
bodystring

Payer CPF or CNPJ (digits only).

value
bodynumber

Payment amount in BRL. Use decimals (for example, `1500.5`).

creditor
bodyobject

Creditor (receiver) details.

name
bodystring

Creditor name.

personType
bodystring

Creditor person type. One of `PESSOA_NATURAL`, `PESSOA_JURIDICA`.

cpfCnpj
bodystring

Creditor CPF or CNPJ (digits only).

accountNumber
bodystring

Creditor account number.

accountIssuer
bodystring

Creditor account branch code.

accountIspb
bodystring

Creditor ISPB (8 digits).

accountType
bodystring

Creditor account type. One of `CACC` (checking), `SVGS` (savings), `TRAN` (payments).

debitor
bodyobject

Debtor (payer) account details. Optional — if omitted, the account holder asks the end user.

accountNumber
bodystring

Debtor account number.

accountIssuer
bodystring

Debtor account branch code.

accountIspb
bodystring

Debtor ISPB (8 digits).

accountType
bodystring

Debtor account type. One of `CACC`, `SVGS`, `TRAN`.

txId
bodyarray<string>

Transaction identifiers attached to the payment.

businessCnpj
bodystring

Business CNPJ (digits only). Optional — stored without punctuation when provided.

curl --request POST \
  --url 'https://embedded-payment-manager.hml.linaob.com.br/api/v1/open-integration/consents' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <SEU_TOKEN>' \
  --data '{
  "organisationId": "c8f0bf49-4744-4933-8960-7add6e590841",
  "authorisationServerId": "c8f0bf49-4744-4933-8960-7add6e590841",
  "payment": {
    "details": "Payment for services",
    "document": "document123",
    "externalId": "ext123",
    "redirectUri": "https://your-app.example.com/payments/callback",
    "cpfCnpj": "12345678901234",
    "value": 1500.5,
    "creditor": {
      "name": "John Doe",
      "personType": "PESSOA_NATURAL",
      "cpfCnpj": "12345678901234",
      "accountNumber": "1234567890",
      "accountIssuer": "0001",
      "accountIspb": "12345678",
      "accountType": "CACC"
    },
    "debitor": {
      "accountNumber": "1234567890",
      "accountIssuer": "0001",
      "accountIspb": "12345678",
      "accountType": "CACC"
    },
    "txId": [
      "ext123",
      "ext1234"
    ],
    "businessCnpj": "12345678000195"
  }
}'

Response

200Consent created successfully.
Response body
object
  • dataobjectrequired

    Consent creation result.

    • idstringrequired

      ID of the newly created payment request. Use it as the `paymentRequestId` when calling `GET /payments/requests/{paymentRequestId}`.

    • redirectUrlstringrequired

      URL to redirect the end user so they can authenticate at the account holder and approve the consent.

  • messagestring

    Response message.

  • typestring

    Response type. One of `error`, `warning`, `info`, `success`.

  • statusCodeinteger· nullable

    HTTP status code carried inside the envelope.

200 · Consent created successfully.
{
  "data": {
    "id": "payment123",
    "redirectUrl": "https://bank.example.com/auth?consent=abc123"
  },
  "message": "Consent created successfully.",
  "type": "success",
  "statusCode": 200
}

Next steps