Skip to content

↑↓ navigate ↵ open Ctrl↵ new tab esc close

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:

ChannelWho callsAuthentication
Browserthe snippet in your checkout, or your own codepublishable token in the URL
Serveryour backendBasic Auth, same as the other APIs
  1. You enable the capture SDK in the dashboard and receive the merchant’s publishable token
  2. Install the snippet in the checkout, or call the endpoint directly
  3. For each relevant fact, send an event with the order’s order_ref
  4. Rapid correlates the event with the transaction and stores the record
  5. If that transaction becomes a dispute, the records go into the defense

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_ref must be the same identifier you use in the transaction (external_id)
  • the success response is 202 Accepted, not 201: Rapid accepted the event, processing is asynchronous
  • a wrong order_ref does not return an error. The event is accepted and silently discarded later
CaptureEvidence
When to useat the moment of the fact, without knowing whether it becomes a disputewhen you already have the transaction at Rapid
Referenceorder_ref (your identifier)transaction_id or transaction_ref
Transaction must existnoyes, otherwise 404
Payload fieldsclosed listfree format, 32 KB cap
Response202, asynchronous201, already stored
  • 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.

EndpointChannelWhat it does
POST /capture/{token}/eventsbrowserSends an event from the checkout
POST /capture/eventsserverSends an event from your backend
GET /capture/{token}/configbrowserConfiguration the snippet reads when it loads