Enruta

Docs · Platforms

PSP metadata

LiveUpdated

Platforms and Sellers. Written for PSPs, acquirers, orchestrators, dispute services and agent platforms that act for many customers and merchants that receive agent orders.

Every PSP has a free-form slot for your own data, and none has a field for an agent, a mandate or a policy. psp-metadata says where Enruta’s labels go in one PSP’s objects and returns the values for one record, so an agent order can be recognized in the PSP’s dashboard, its reports and its dispute tools.

GET/v0/records/{id}/psp-metadata?psp=stripe

psp is one of stripe, adyen, checkout_com, braintree, paypal, worldpay, gr4vy, spreedly or shopify. The answer names where the fields live, when they can be written, the PSP’s limits and its documentation, and gives the fields filled in for this record.

// the Stripe fields for the $24.98 order of 2026-09-10
{
  "enruta_agent_id": "agt_procurement_02",
  "enruta_mandate_ref": "mnd_01M2512M8FQ7ZK4T1V9W3N6BXC",
  "enruta_policy_version": "4",
  "enruta_record_id": "rec_01M25129GZMJXTNQ47TMZRDGHN",
  "enruta_protocol": "ucp",
  "enruta_agent_platform": "claude"
}

The labels

LabelMeaning
agent_idThe agent that paid
mandate_refThe mandate
policy_versionThe policy version the payment was decided under
record_idThe buyer’s Evidence Record
protocolThe checkout protocol, such as ucp
agent_platformThe host the agent ran in

Where each PSP keeps them

PSPWhereWrittenKeys
StripePaymentIntent.metadataAny timeenruta_agent_id, enruta_mandate_ref, enruta_policy_version, enruta_record_id, enruta_protocol, enruta_agent_platform
Adyenmetadata on the /payments requestIn the payment request onlyAdyen’s agent fields agentProtocol, agentSessionId (the mandate) and agentPlatform, plus enrutaAgentId, enrutaMandateRef, enrutaPolicyVersion, enrutaRecordId; values up to 80 characters
Checkout.commetadata on the payment requestIn the payment request onlyThe six enruta_… keys
BraintreeTransaction custom fields, defined in the Control Panel firstAfter the payment tooThe six enruta_… keys
PayPalOrders v2 purchase_units[].custom_idBefore captureOne field of up to 127 characters: enr1|<record_id>|<mandate_ref>|<agent_id>|<policy_version>
WorldpayThe metadata of an Access Worldpay agentic sessionIn the payment request onlyThe six enruta_… keys
Gr4vyTransaction metadataAfter the payment tooThe six enruta_… keys
Spreedlytransaction_metadataIn the transaction onlyThe six enruta_… keys
ShopifyOrder metafields in the namespace enrutaAny timeenruta.agent_id, enruta.mandate_ref, enruta.policy_version, enruta.record_id, enruta.protocol, enruta.agent_platform

Who writes them

  • After the payment exists. Stripe, Braintree, PayPal (before capture) and Gr4vy accept the fields later. With a PSP connection to Stripe, Braintree or PayPal, Enruta writes them once an agent order is recognized with the PSP’s payment reference: report the payment as psp_payment on POST /v0/sellers/orders, and the answer’s psp_write_back says what was written.
  • Only when the payment is created. Adyen, Checkout.com and Worldpay take the fields only in the payment request, so the code that creates the payment adds them, and Enruta links the PSP’s payment reference to the agent order instead of writing afterwards. Spreedly’s transaction metadata is also set when the transaction is created. @enruta/accept exports pspMetadata(psp, labels), which renders the fields at the edge from the labels the middleware already read.