Skip to content

Missing documentation for field length limits in API schema #158

@jrajamaki

Description

@jrajamaki

While integrating with the Paytrail API using the official PHP library, I encountered the following error response after making a request:

{
    "status": "error",
    "message": "Request payload schema validation failed. Validate request against the provided schema.", 
    "meta": [
        "instance.customer.firstName does not meet maximum length of 50",
        "instance.customer.lastName does not meet maximum length of 50",
        "instance.customer.phone does not meet maximum length of 30"
    ]
}

There is no mention of these maximum field lengths in the official Paytrail API documentation. Furthermore, the PHP library does not perform validation for these field lengths, so the error is only revealed after the request is sent to the API.

Please update the API documentation to clearly specify the maximum allowed lengths and validation rules for all fields. Furthermore, consider adding validation to the official libraries to ensure standardized approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions