POST with a JSON body to the webhook address Mestry gave it. Each order is signed with the signing secret you copy from Mestry. Nothing is injected into your checkout and no script runs in the buyer’s browser.
You need a Mestry account and a Mestry workspace first. You log in to Mestry during the connection, and the signing secret is copied from the Mestry dashboard.
How to configure
1
Open the Mestry app
In the PagAmerican dashboard, go to Integrations and find the Mestry card. Click Install integration the first time, or Manage if you have connected it before.
2
Connect your Mestry account
The Connect Mestry page lists what will be shared. Click Connect with Mestry. You are redirected to Mestry, where you log in, choose the workspace to connect and authorize PagAmerican. Mestry then sends you back to the PagAmerican dashboard, which now shows Mestry connected, the Mestry workspace and the date under Connected on.
3
Save the signing secret
Copy the webhook signing secret from your Mestry dashboard. Back in PagAmerican, paste it into the Delivery signature card and click Save. The badge changes from Not configured to Configured.The connection does not deliver this secret. Until you save it, no sale is sent to Mestry.
4
Create an item
Under Items, click New item. Fill in Item name (an internal label, so you can tell your items apart). Events sent shows the events the item sends. There is nothing to choose there.
5
Choose the product scope and save
Under Product Scope, pick All products, Specific products, or Specific offers from a product, then click Create item. The item starts active.
Events sent
Each purchase is its own event. When a buyer accepts an upsell, Mestry receives a second
order.paid for the same order, with its own payment id and its own revenue. An order bump is not a separate event: it is part of the purchase it was added to.
For now, Mestry receives paid orders only. Refunds and chargebacks are not sent, so a refunded order stays counted as revenue in Mestry.
What Mestry receives
One paid purchase is onePOST. This is the body:
Every delivery carries an
X-Mestry-Signature header, an HMAC-SHA256 of the body computed with your signing secret. Mestry checks it to confirm the sale came from your account.
Click id and ad platform
Mestry attributes a sale throughmestry_cid, the click id Mestry adds to the link that brings the buyer to your checkout. The platform reads it from the checkout link and sends it back as data.tracking.click_id. If the link loses the parameter on the way, for example through a redirect that drops the query string, the sale reaches Mestry with click_id set to null and can only be matched by its UTMs.
data.tracking.ad.platform tells Mestry which ad network the click came from. The platform decides it from the checkout link:
An ad network click id wins over
utm_source. When neither identifies a network, the ad key is left out.
Vendor and affiliate copies
When a purchase came through an affiliate, the platform sends it twice: once to the vendor’s Mestry connection and once to the affiliate’s. Each copy carries its ownaccount.role and its own account_revenue. Neither side sees the other’s figure.
When the affiliate is paid a fixed commission (CPA), customer.email and customer.phone arrive as REDACTED on the affiliate’s copy. The vendor’s copy, and the copy of an affiliate on revenue share, carry them unchanged.
Troubleshooting
Click View Logs on the Mestry card to open the delivery logs, with one row per attempt: Sent At, Event, Status, Code, and Details.Nothing arrives and there is no log row
Nothing arrives and there is no log row
A row is written only when a delivery is actually attempted. When the platform decides not to send, nothing is attempted, so there is no row and no error message. An empty log is the diagnostic, not a sign that the platform is broken.The platform skips the delivery silently when:
- the signing secret was never saved: the Delivery signature card shows Not configured
- Mestry is disconnected
- there is no item, or every item is inactive
- the purchase falls outside the Product Scope of every active item
- the purchase belongs to the other role: a vendor’s connection does not receive the purchases you made as an affiliate, and an affiliate’s does not receive the purchases of products you sell
The log row says Failed
The log row says Failed
Read the Code column:
- a
4xx: Mestry refused the delivery. Check that the signing secret saved in PagAmerican is the one in your Mestry dashboard, and paste it again with Replace secret if you are unsure. If your Mestry access was revoked, click Reconnect. 429or a5xx: Mestry was unavailable. The platform tries again right away, after 1 and 3 seconds, before recording the delivery as failed.- no code, with a timeout in Details: Mestry did not answer within 10 seconds. A timeout is not retried.
Sales arrive but are not attributed to a click
Sales arrive but are not attributed to a click
click_id only ever contains what the checkout link carried. If the buyer reached the checkout through a link without mestry_cid, the sale arrives with click_id set to null. Check that your Mestry links keep the parameter all the way to the checkout. Fix the links, not the integration.The connection page shows an error after Mestry
The connection page shows an error after Mestry
If you cancel on Mestry’s authorization page, or take too long, you come back with an error message and the connection is not made. Click Connect with Mestry and complete the authorization again.
FAQ
Can I send some products to Mestry and not others? Yes. Create items only for the products or offers you want to send. A sale outside every item’s scope is not sent. What happens when I deactivate or remove an item? Sales covered only by that item stop being sent immediately. Sales still covered by another active item keep going. Nothing is queued, and turning an item back on does not backfill the sales made while it was off. What happens when I disconnect? The platform stops sending your sales to Mestry and revokes the access you granted. You can connect again at any time with Connect with Mestry. Can I change the signing secret later? Yes. Paste the new secret into the Delivery signature card and click Replace secret. The change applies to the next sale. Do I have to change my checkout links? No. The integration reads the parameters the checkout already captures. For Mestry to attribute a sale to a click, the link that brings the buyer to the checkout has to carrymestry_cid.
Need help?
Our team can help you set up your integration: support@pagamerican.com