Skip to content

Webhook

In Riversoft® STCP DirectLink, Webhook is document exchange with partners over HTTP/HTTPS. Each side of the exchange has a role:

ComponentWho starts the connectionFunction
Webhook connectorRiversoft STCP DirectLink (outbound connection)Sends the user’s documents to the partner’s HTTP/HTTPS endpoint.
Webhook DirectLink serviceThe partner (inbound connection)Receives the documents the partner sends to Riversoft STCP DirectLink.

In Webhook, each connection carries documents in a single direction. For the partner to send documents too, they connect to the Webhook DirectLink service.

Outbound connections (Webhook connector)

    flowchart LR
    subgraph DL[Riversoft STCP DirectLink]
      SA["saida directory"]
      C[Webhook connector]
    end
    SA --> C
    C -->|document and headers| P[Partner endpoint]
  

Riversoft STCP DirectLink delivers to the partner’s endpoint, in an HTTP/HTTPS request, each document available in the user’s mailbox (saida directory), by schedule or when the operator starts the connection in the Riversoft Console Portal. The partner’s response is recorded in the transfer log.

FeatureDescription
EndpointURL of the partner that receives the documents.
IdentificationSender and recipient identifiers of the exchange, set in the user registration.
AuthenticationNone, Basic or Bearer, as required by the partner, with the credentials protected in the registration.
Signature and encryptionSignature with the Riversoft STCP DirectLink certificate and key and encryption with the partner’s certificate, with the agreed algorithm.
Custom headersFixed headers set in the user registration and per-file headers, sent in the file metadata.
TLSPartner certificate validation, custom CA and client certificate (mTLS).
NetworkThe connection can go through a proxy and through a specific local address.
TimeoutMaximum time of each send.

The Webhook connector only sends documents: it does not list, download or remove files at the partner.

Inbound connections (Webhook DirectLink service)

    flowchart LR
    subgraph DL[Riversoft STCP DirectLink]
      S[Webhook DirectLink service]
      EN["entrada directory"]
    end
    Q[Partner system] -->|document and authentication| S
    S --> EN
  

The partner sends documents to the Webhook DirectLink service endpoint. Each request is authenticated, associated with a user and written to the entrada directory of their mailbox.

AuthenticationValidation
NoneOnly for controlled environments.
BasicRiversoft STCP DirectLink user and password.
BearerOnly an impersonation token registered for the user; the token sub must match the partner identification.

Besides the credential, the recipient given in the request (X-To header) must match the identification registered for the partner. The service accepts TLS with configurable minimum and maximum versions and client certificate authentication (mTLS).

The Webhook DirectLink service is registered in the instance network services, in the Riversoft Console Portal: address, port, TLS and the public service address.

What to agree with the partner

ItemDescription
AddressesPartner endpoint URL and public Webhook DirectLink service URL.
IdentificationsSender and recipient identifiers in both directions.
AuthenticationBasic or Bearer, in both directions.
CertificatesSigning and encryption certificates, when used, and the algorithms.
HeadersHeaders the partner expects to receive.

Security

  • Publish the Webhook DirectLink service over HTTPS only and, whenever possible, require mTLS from the partner.
  • Prefer Bearer with an impersonation token or Basic to no authentication; keep the credentials in a secrets vault.
  • Use signature and encryption when the partner supports them.
  • Keep partner certificate validation enabled in the connector.