How it works
On a recurring schedule, Paylead exports the transactions accumulated since the previous run into a secure file, then notifies your endpoint. You verify the notification, download the file, and decrypt it.Key points
- Each report covers the period since the previous generation: a daily schedule delivers the previous day’s transactions, a monthly schedule delivers roughly the last 30 days. The exact window is the
periodfield in the Webhook payload. - By default it is generated once a day at 09:00, Europe/Paris time (UTC+1, or UTC+2 during daylight saving time). The trigger time and the frequency are both configurable.
- The file is encrypted with your PGP public key (asymmetric encryption), so only you can decrypt it.
- The Webhook can be signed with
HMAC-SHA256(optional, strongly recommended) so you can verify its authenticity. - The download URL is single-use and expires after 24 hours.
Before you start, you need:
- An HTTPS endpoint that can receive Webhooks (
POSTrequests with a JSON body). - The ability to generate a PGP key pair and decrypt PGP files.
The Webhook
Method and endpoint
Paylead sends an HTTPPOST request to the Webhook URL you provide.
Payload
The request body is a JSON object.string
Event type. Always
sales_report.string
Pre-signed URL used to download the report file.
string
Type of the delivered file. Always
application/pgp-encrypted.string
Type of the file once decrypted. Always
text/csv.array
List of the CSV column names, in order.
object
Period covered by the report.
string
Expiration timestamp of the pre-signed URL.
Authentication with HMAC
Signing Webhooks withHMAC-SHA256 is optional.
When signing is enabled, each request carries a signature of the request body in the following header:
Retry policy
Any2xx response is treated as a successful delivery. On failure, Paylead retries the request up to 8 times with exponential backoff (1 minute to 1 hour) for the status codes below. All other error codes are not retried.
Report file format
The delivered file is a PGP-encrypted CSV. Each row is one commissioned transaction, with the Brand, the Cashback strategy, the Campaign, and the resulting merchant cost. Once decrypted, it contains the following columns.Set up the integration
Setup is a one-time exchange: you send Paylead an encryption key and an endpoint, Paylead sends you a signing secret, and you implement the verification and decryption steps. The delivery schedule (trigger time) and frequency are agreed with Paylead during setup; the defaults are once a day at 09:00 Europe/Paris.What you provide to Paylead
What Paylead provides
Checklist
To send to Paylead:- PGP public key (ASCII-armored
.asc, Ed25519 or RSA-4096, capability[E], validity 1 year or more). - Webhook endpoint URL (HTTPS).
- If HMAC signing is enabled (recommended): verify the signature in the
X-paylead-signature-256header. - Respond with an HTTP
2xxcode on correct receipt. - Decrypt the PGP files with your private key.