INTEGRATION
ACCOUNTS
TRANSACTION ASSURANCE
CHARGES
REPORTING
DISPUTES & FRAUD
FILE SUBSCRIPTIONS
Distributing Reports
This guide entails comprehensive information on report distributions, why they are relevant to your workflow, and how to create and manage them using our step-by-step guides. If you have specific questions about our infrastructure, please contact your account manager or reach us at support@silverflow.com.
The Silverflow API allows users to automatically send generated reports to specific destinations by creating a distribution object. This distribution object can be attached to a report schedule to trigger delivery as soon as the report is finalized. Currently, Silverflow supports report delivery via Email, SFTP, and Amazon S3.
Report distribution eliminates the need for users to manually log into the Acquirer Portal or call the API to download reports. By fully automating the delivery process, you ensure that reports reliably reach the correct internal systems (via SFTP and Amazon S3) or specific stakeholders (via Email) exactly when they are ready, saving time and streamlining your reconciliation and operations workflows.
To set up automatic distribution for your reports, follow the step-by-step guide below. For SFTP and Amazon S3, there is an additional section below with more details.
To create a distribution object, the user should use the
POST /v1/distributionsendpoint. Here, a distributiontypeshould be included (see list above). Depending on the distribution delivery type, the user should then provide where the reports should be delivered to in thetargetsfield. Optionally, the user can provide areferencefor internal purposes. An example request is the following:The response from that request will include the distributionKey, that should then be used when creating a report schedule on our
POST /v1/reportSchedulesendpoint.The response from the request above will look like the following:
To retrieve the distribution object(s), the user may call the
GET /v1/distributionsendpoint to list all distribution objects or theGET /v1/distributions/{distributionKey}endpoint using thekeyof the distribution object.To update an existing distribution configuration, one should use
PATCH /v1/distributions/{distributionKey}. This is useful to update email addresses or to change the reference without having to create a new distribution object and report schedule.To archive a distribution object, the user may call
DELETE /v1/distributions/{distributionKey}which will change its status toarchived.
Silverflow authenticates to your SFTP server using the SSH protocol. To facilitate this, users should add Silverflow's public SSH key to your SFTP server's authorized keys (see our keys below). Silverflow will sign all files sent through the SFTP connection with our private SSH key. This ensures secure and authenticated file transfers.
After adding the public key to your SFTP server, you can create a SFTP distribution configuration with a POST request to
/distributionsto set-up the SFTP distribution object with the following body:
Parameter details:
type: Must besftptargets.host: Your SFTP server hostname (without sftp:// prefix)targets.username: SSH username for authenticationtargets.dirPath: Directory path where files should be storedreference: Your unique reference for this distribution configuration
After receiving a successful 201 response, you'll get a
distributionKeyin the response. Use this key when creating report schedules. Every report generated by the report schedule configuration will be automatically distributed to the SFTP folder and directory path.Clients get notified by succesful and failed SFTP file deliveries by subscribing to our
com.silverflow.distributionsevent source. Please read more on event subscriptions here.
SSH Keys for SFTP per environment
Environment | Region | Public ssh-rsa key |
|---|---|---|
Sandbox | All |
|
Production | Europe |
|
Production | United States |
|
Before creating an Amazon S3 distribution, complete the following steps in your AWS account.
Create (or designate) a Amazon S3 bucket to receive Silverflow report files. The bucket should be used exclusively for Silverflow deliveries. Silverflow cannot accept responsibility for modifying or overwriting files that were not placed by Silverflow, or for the contents of any file if other parties have write access to the same bucket.
Create an IAM role in your AWS account that grants
s3:PutObjectaccess to the target bucket. This role must not grant read access to Silverflow. Silverflow's internal threat controls rely on data access monitoring that does not extend to remote locations. The role's permission policy may look like the following:The IAM role must include a trust policy that allows Silverflow to assume it. The trust policy uses an External ID to prevent the confused deputy problem. Choose a unique, secret External ID and share it only with Silverflow when creating the distribution object:
Once the IAM role and trust policy are in place, create an S3 distribution configuration with a POST request to:
type: Must be
s3.targets.bucketName: The name of your S3 bucket.
targets.accountId: The 12-digit AWS account ID that owns the bucket. For security, Silverflow validates bucket ownership before every upload.
targets.directory: The prefix (subdirectory) inside the bucket where files will be delivered (e.g.
reports/daily).targets.roleArn: The ARN of the IAM role you created earlier.
targets.externalId: The External ID configured in the trust policy.
reference: An optional label for your own reference.
After receiving a successful 201 response, you will get a
distributionKeyin the response. Use this key when creating report schedules via the POST request to/v1/reportSchedulesendpoint. Every report generated by the schedule will be automatically delivered to the configured S3 bucket and directory.
Important considerations
Bucket ownership validation: Silverflow validates that the bucket is still owned by the configured AWS account before every upload. If a bucket is deleted and recreated by a different account, deliveries will fail.
At-least-once delivery: A file may be delivered more than once with the same file key. Your integration should handle duplicate deliveries gracefully (e.g. by overwriting or deduplicating based on the file name).
Write-only access: The IAM role must grant only
s3:PutObject. Do not grant read, list, or delete permissions to Silverflow.Event notifications: Clients are notified of successful and failed S3 file deliveries by subscribing to the
com.silverflow.distributionsevent source. Please read more on event subscriptions here.