Pular para o conteúdo

Create optimized automatic payment

Creates the Open Finance data consent and the Sweeping recurring consent in a single call, so the payer authenticates only once at the account holder. This is the entry point of the Linked journey (Smart Pix).

On 201 Created, persist data.id (poll Get payment request with it as {automaticPaymentsRequestId}), data.dataConsentId (use it on Get data consent), and data.flowId for observability — then redirect the payer to data.redirectUrl.

Only recurringConfiguration.sweeping is accepted here. Sending automatic, or omitting sweeping, returns 400 with errorCode X003-3. If any step after the data consent fails, that consent is automatically rejected before the error is returned.

POST/api/v1/linked-journey/automatic-payments

Create optimized automatic payment

Creates the data consent and the Sweeping recurring consent in one call and returns redirectUrl and dataConsentId.

Auth: Bearer Token

Headers

2 campos
subTenantId
headerstring

Target sub-tenant when the caller is a tenant or admin.

User-Agent
headerstring

User-Agent of the payer device, forwarded to the account holder when the consent is created.

Request body

6 campos
organisationId
bodystring

Organisation id from Get registered participants (max 36 characters).

authorisationServerId
bodystring

Authorisation server id from Get registered participants (max 36 characters).

platform
bodystring

Platform used by the logged user.

redirectUri
bodystring

Redirect URI used after the consent is authorised.

requestExpiresAt
bodystring · date-time

Expiry of the payment request. Must be in the future and at most one hour ahead of now (RFC 3339, UTC).

recurringConsent
bodyobject

Recurring consent payload. Only `recurringConfiguration.sweeping` is accepted in this journey.

loggedUser
bodyobject

Logged payer identity at the initiator.

document
bodyobject

Logged user document. `identification` is mandatory — it feeds the data consent created at Data Link.

identification
bodystring

Official document number, digits only, without dots or dashes.

rel
bodystring

Document type.

businessEntity
bodyobject

Legal entity logged at the initiator. Required when the logged user is a `CNPJ` — this CNPJ is also used in the Data Link data consent.

document
bodyobject
identification
bodystring

Legal entity document, digits only.

rel
bodystring
redirectUri
bodystring

Your HTTPS callback after the holder completes the consent (allow-listed domain).

creditors
bodyarray<object>

Receiving parties of the recurring arrangement.

personType
bodystring

Which kind of party the creditor data refers to.

cpfCnpj
bodystring

Creditor CPF (11 digits) or CNPJ (14 digits) according to `personType`. Digits only.

name
bodystring

Full name (individual) or corporate name (legal entity) of the receiving account holder.

expirationDateTime
bodystring · date-time

When the consent stops being valid (RFC 3339, UTC).

additionalInformation
bodystring

Additional information entered by the payer in the consent (max 140 characters).

debtorAccount
bodyobject

Payer source account. Include it when the initiator already collected this data; otherwise the account holder collects it.

ispb
bodystring

ISPB of the SPI participant, digits only.

issuer
bodystring

Branch code of the issuing institution, without the check digit.

number
bodystring

Payer transactional account number including the check digit when present. Alphanumeric values must be converted to 0.

accountType
bodystring

Account type used for the payment: `CACC` current account, `SLRY` salary account, `SVGS` savings account, `TRAN` prepaid payment account.

recurringConfiguration
bodyobject

Recurrence product configuration. **Only `sweeping` is accepted in this journey** — sending `automatic` returns 400 `X003-3`.

sweeping
bodyobject

Recurrence configuration for automatic transfers between accounts owned by the same holder.

totalAllowedAmount
bodystring

Maximum cumulative amount for all transactions using this consent. Above it, the holder must deny the transaction. Two decimal places.

transactionLimit
bodystring

Maximum amount of each transaction under this consent. Above it, the holder must reject the payment.

periodicLimits
bodyobject

Transactional limits per period defined by the payer. When a period object is sent, at least one of `quantityLimit` or `transactionLimit` must be filled.

day
bodyobject

Daily bucket limits.

quantityLimit
bodynumber

Maximum number of transactions allowed in the period.

transactionLimit
bodystring

Maximum amount transacted in the period, with two decimal places.

week
bodyobject

Weekly bucket limits.

quantityLimit
bodynumber
transactionLimit
bodystring
month
bodyobject

Monthly bucket limits.

quantityLimit
bodynumber
transactionLimit
bodystring
year
bodyobject

Yearly bucket limits.

quantityLimit
bodynumber
transactionLimit
bodystring
startDateTime
bodystring · date-time

When the consent becomes valid (RFC 3339, UTC). If omitted, the holder fills it with the same value as `creationDateTime`.

curl --request POST \
  --url 'https://embedded-payment-manager.hml.linaob.com.br/api/v1/linked-journey/automatic-payments' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <SEU_TOKEN>' \
  --header 'subTenantId: 1f2b6a1c-6a3e-4b1a-9f0e-6f0b1a2c3d4e' \
  --header 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X)' \
  --data '{
  "organisationId": "74e929d9-33b6-4d85-8ba7-c146c867a817",
  "authorisationServerId": "c8f0bf49-4744-4933-8960-7add6e590841",
  "platform": "APP",
  "redirectUri": "https://app.example.com.br/callback",
  "requestExpiresAt": "2026-09-15T18:00:00Z",
  "recurringConsent": {
    "loggedUser": {
      "document": {
        "identification": "76109277673",
        "rel": "CPF"
      }
    },
    "businessEntity": {
      "document": {
        "identification": "40156018000100",
        "rel": "CNPJ"
      }
    },
    "redirectUri": "https://app.example.com.br/callback",
    "creditors": [
      {
        "personType": "PESSOA_JURIDICA",
        "cpfCnpj": "40156018000100",
        "name": "Lina Open X Pagamentos"
      }
    ],
    "expirationDateTime": "2027-09-15T08:30:00Z",
    "additionalInformation": "Automatic top-up recurrence",
    "debtorAccount": {
      "ispb": "12345678",
      "issuer": "1774",
      "number": "1234567890",
      "accountType": "CACC"
    },
    "recurringConfiguration": {
      "sweeping": {
        "totalAllowedAmount": "50000.00",
        "transactionLimit": "1000.00",
        "periodicLimits": {
          "day": {
            "quantityLimit": 5,
            "transactionLimit": "2000.00"
          },
          "week": {
            "quantityLimit": 20,
            "transactionLimit": "10000.00"
          },
          "month": {
            "quantityLimit": 40,
            "transactionLimit": "20000.00"
          },
          "year": {
            "quantityLimit": 400,
            "transactionLimit": "200000.00"
          }
        },
        "startDateTime": "2026-09-16T08:30:00Z"
      }
    }
  }
}'

Response

201Sweeping consent created successfully in the optimized journey.
Response body
object
  • dataobjectrequired
    • idstring

      Identifier of the recurring consent / payment just created — use it as `{automaticPaymentsRequestId}` on Get payment request.

    • redirectUrlstring

      URL where the payer authorises the consents at the account holder.

    • dataConsentIdstring· nullable

      Data consent created at Data Link in this journey — use it on Get data consent.

    • flowIdstring· nullable

      Flow correlation identifier, used for observability in Datadog.

  • messagestring

    Response message.

  • typestring

    Envelope type (for example `success`).

  • statusCodeinteger· nullable

    HTTP status code.

201 · Sweeping consent created successfully in the optimized journey.
{
  "type": "success",
  "message": "Recurring consent created successfully",
  "data": {
    "id": "6f0f4e3a-5d2b-4f3a-9a1e-2c1b7d0a8f11",
    "redirectUrl": "https://auth.holder.example.com.br/auth?request=eyJhbGciOi...",
    "dataConsentId": "urn:raidiambank:consent:460338f5-1fa6-4434-92dd-be47be181d18",
    "flowId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
}

Next steps