Skip to main content

Documentation

Metadata

Contains custom data defined by the client, in the format of a JSON object.

The metadata object is associated with a parent object, such as a customer or product object, and is created when the parent object is created or updated.

You can use the metadata for storing any additional data you might need for the specific transaction. For example:

  • Transaction ID.

  • Identifying information for different tax rates.

  • Environmental constraints, for goods that are sensitive to water, heat, cold or magnets - in storage or transit.

  • Warranty registration numbers.

  • A history of the customer's purchases of the same item.

  • The customer's search strings on the merchant's site.

  • Inventory management.

  • Expiration dates of food items or batteries.

  • Identifying products as seasonal.

  • Identity of a set that the product belongs to.

  • Legal export restrictions.

  • Name or ID of supplier.

The metadata must be in the form of a JSON object. Inside the object, string, number, Boolean, object, and array JSON data types are supported. The client has full responsibility for the metadata, including validation, consistency, data integrity and updating. Rapyd does not use the metadata for any purpose.

"metadata": {
    "string": "preferred",
    "number": 1234567890,
    "Boolean": true,
    "object": {
        "string": "person"
    },
    "array_of_objects": [
	{
            "name": "John Doe"
        }, 
	{
            "type": "customer"
        }
    ],
    "array_of_strings": ["color", "size"]
}
Metadata Errors

The following errors are relevant to client-defined metadata:

  • ERROR_METADATA_IS_NOT_OBJECT_TYPE

    The request attempted an operation on metadata, but the metadata was not an object. The request was rejected. Corrective action: For the ‘metadata’ field, use a JSON object.