Overview
Capture records, at the moment they happen, the signals that back a sale: the terms acceptance at checkout, the device used for the purchase, access to the product, delivery confirmation, use of the service.
There are two channels for the same thing, and you can use both together:
| Channel | Who calls | Authentication |
|---|---|---|
| Browser | the snippet in your checkout, or your own code | publishable token in the URL |
| Server | your backend | Basic Auth, same as the other APIs |
Flow in short
Section titled “Flow in short”- You enable the capture SDK in the dashboard and receive the merchant’s publishable token
- Install the snippet in the checkout, or call the endpoint directly
- For each relevant fact, send an event with the order’s
order_ref - Rapid correlates the event with the transaction and stores the record
- If that transaction becomes a dispute, the records go into the defense
How the event becomes evidence
Section titled “How the event becomes evidence”The event is not attached to anything when it arrives. It goes into a queue and only becomes evidence when it matches a real transaction of the merchant that owns the token, through the order_ref field.
This has a practical consequence worth understanding: a leaked token produces noise, never data. Whoever has your publishable token can send events, but they die in the queue if they do not match a real order of yours.
So:
- sending an event before the transaction exists is normal, correlation happens later, within a window of about 68 hours
order_refmust be the same identifier you use in the transaction (external_id)- the success response is
202 Accepted, not201: Rapid accepted the event, processing is asynchronous - a wrong
order_refdoes not return an error. The event is accepted and silently discarded later
Difference between capture and evidence
Section titled “Difference between capture and evidence”| Capture | Evidence | |
|---|---|---|
| When to use | at the moment of the fact, without knowing whether it becomes a dispute | when you already have the transaction at Rapid |
| Reference | order_ref (your identifier) | transaction_id or transaction_ref |
| Transaction must exist | no | yes, otherwise 404 |
| Payload fields | closed list | free format, 32 KB cap |
| Response | 202, asynchronous | 201, already stored |
Authentication
Section titled “Authentication”- Browser: the token goes in the URL (
/capture/{token}/events). It is publishable and can stay in the HTML. - Server: Basic Auth with
client_id:client_secret. See Authentication.
The capture token is generated in the dashboard, under Settings › Integrations, when you enable the merchant’s capture SDK.
Endpoints
Section titled “Endpoints”| Endpoint | Channel | What it does |
|---|---|---|
POST /capture/{token}/events | browser | Sends an event from the checkout |
POST /capture/events | server | Sends an event from your backend |
GET /capture/{token}/config | browser | Configuration the snippet reads when it loads |