Error Messages: /tokenize
Every request to POST /v1/tokenize that returns HTTP 400, with the error key and the message for each case.
This page lists the requests to POST /v1/tokenize that return HTTP 400, with the error key and the message for each case. The endpoint is documented on /tokenize. The conventions for these tables and the errors that several endpoints share are on Error Messages by Endpoint.
All 400 responses use Format A. Body field names on this endpoint are snake_case, for example payment_method and credit_card. The error keys keep the PascalCase names that the API returns. The mid query parameter is optional; when it is omitted, the card is tokenized without a merchant association.
| Trigger | Error key | Message |
|---|---|---|
| Empty body | "" | A non-empty request body is required. |
payment_method missing | PaymentMethod | The PaymentMethod field is required. |
payment_method.credit_card.number missing or empty | PaymentMethod.CreditCard.Number | The Number field is required. |
payment_method.credit_card.month missing or empty | PaymentMethod.CreditCard.Month | The Month field is required. |
payment_method.credit_card.year missing or empty | PaymentMethod.CreditCard.Year | The Year field is required. |
mid query parameter is not a GUID | mid | The value '<value>' is not valid for mid. |
| Sandbox only: card number is not a supported test card | number | Only test Credit Cards are allowed in test environments. please visit: https://docs.flexfactor.io/docs/testing-cards for a list of test card numbers. |
metadata has more than 25 entries | PaymentMethod.Metadata | Metadata cannot contain more than 25 key-value pairs |
metadata key is null or empty | PaymentMethod.Metadata | Metadata keys cannot be null or empty |
metadata key longer than 50 characters | PaymentMethod.Metadata | Metadata key '<key>' exceeds the maximum length of 50 characters |
metadata value longer than 500 characters | PaymentMethod.Metadata | Metadata value for key '<key>' exceeds the maximum length of 500 characters |
metadata value is an object or array | PaymentMethod.Metadata | Metadata value for key '<key>' cannot contain compounding data types (objects or arrays) |
- A
midthat is a well-formed GUID but does not match a merchant returns500with the messageFailed tokenizing a record, not400. - A
payment_methodwithoutcredit_card, and amonthoryearthat is not a number, also return500with the messageFailed tokenizing a record, not400.
Updated about 17 hours ago
Did this page help you?

