Meta fields
How to use meta fields with your execution context.
Part of Payrails's power comes from its ability to unify the many languages providers speak into one common language. However, this is a huge challenge! So, this document explains how our meta fields work and how we map them to different providers.
What are meta fields?
When using our APIs, some fields are required, and some are optional. We define them according to whether we need them to process your requests or to control our features.
However, when your request includes a call to an external provider, they will also have their own required or optional fields, possibly with different names and formats. Don't worry! Payrails will handle that translation, but we need your help giving us all the information we need to do it in a generic way so that when you add new providers, your requests have minimal to no change.
The place where you send information so Payrails can translate it to provider-specific terminology is what we call meta fields. They can be sent in most of our endpoints in a field called meta
, and have a predefined structure described in our API docs, for example, in the Authorize action.
Importance of Meta Fields
Meta fields are essential for several reasons:
- Enhanced Transaction Management: Meta fields allow merchants to capture specific details about each transaction, facilitating better order management and tracking.
- Improved Risk Assessment: Meta fields provide valuable data for assessing the risk associated with each transaction, enabling fraud prevention measures and authentication processes.
- Customization and Personalization: Meta fields offer flexibility for merchants to customize the payment experience for their customers, enhancing user satisfaction and loyalty.
- Compliance and Reporting: Meta fields help ensure compliance with regulatory requirements by capturing necessary information for reporting and auditing purposes.
Required or optional
Initially, they are all optional because we don't actually need them in Payrails. However, as you add providers to your ecosystem or write rules into your workflows, whatever fields they require become required by Payrails. The same happens if you start using meta fields in your routing rules; we will need them to decide where to process your authorizations, so they will be marked as required.
Then how can you know if they are required? You must check your Meta fields page in your Merchant Portal. We show you whether they are required, and if they are, we tell you who is making them required (e.g., a rule, a provider, etc.). Also, you will find the expected format and some example values.
Even if your meta fields are optional, we recommend sending them anyway for the following reasons:
- they may become required once you include more providers in your routing logic
- sometimes they aren't required, but the performance of your authorizations is lower if they are missing
- your fraud providers will have a better picture to evaluate the risk of your transaction
- your tracking and reporting will be more complete and informative
Categories
Meta fields can belong to various categories, including:
clientContext
: Browser and device information, screen dimensions, language settings, etc.customer
: Personal and contact information, identity verification, etc.risk
: Authentication, fraud prevention, risk scores, etc.order
: Order amount, billing and delivery details, soft descriptor, etc.- For more information about the breakdown of costs, check the order costs guide.
subscription
: Subscription frequency, expiration date, etc.vendor
: Vendor details, address information, etc.tags
: Any extra tag you want to assign to your execution for later reconciliation.
In case you want to add new categories or simply more meta fields to your execution, you can just add them to the meta
JSON object in your requests, and they will be available as context for your executions when you query the Get an execution by ID endpoint.
Updated 4 months ago