I’m looking for field descriptions in the API reference guide, for instance on the Create a charge page Create a charge | Coinbase Cloud. I see a list of fields, but I can’t find the descriptions. I’m looking for the following:
- General description of the field and its purpose
- Maximum length (and what happens in case your string has a longer length, will it give an error or will it be truncated)
- Optional or required
- Possible values (like ‘fixed_price’ in the
- Example code of a filled in request
But I don’t know where to find it.
Thank you for your interest in Coinbase Commerce API.
We understand that you want to know the description and possible values of BODY PARAMS such as pricing_type, currency, etc when using Create a Charge endpoint. For a detailed description for the possible values of each parameter of Create a Charge endpoint, we have enumerated our responses below.
With regard to your statement “Maximum length (and what happens in case your string has a longer length, will it give an error or will it be truncated).” Can you please provide more explanation on this? This would give us a better understanding of your concern.
Once you send us the information requested above, we’ll work to quickly address your concern.
Great! Thank you so much! That clarifies a lot.
About the maximum length of the strings. For example, let’s say the maximum value for the
name field is 34 characters, what happens if I enter a string longer than 34 characters? Will it give an error? Or will it shorten the string to 34 characters, and cut off the end part?
And the main question being, what are the maximum length values of the fields?
Thank you for reaching back to us. We are glad that we’ve clarified your concern. Regarding your questions about the maximum characters of the fields, you may see each fields below with their corresponding maximum characters:
name - has
100 maximum characters
description - has
200 maximum characters
pricing_type - this field is excluded as it only has 2 values:
local_price - each parameter in this object has different maximum characters
amount - local price amount must be less than or equal to
currency - this field is also excluded as local price currency must be a valid currency
ISO code only
metadata - the fields under this object are unlike other fields because there is no specific maximum characters. However, values on these parameters must be at most
2048 serialized types
redirect_url - has
3000 maximum characters
cancel_url - has
3000 maximum characters
For your question about what will happen if you enter longer than the stated maximum characters, calling the Create a Charge endpoint will result in error depending on which field has exceeded the maximum characters limit.
We hope this answers your questions. Thank you and have a great day!
Perfect! That answers all my questions. Thank you so much for the extensive answers! It would be great if these details could be incorporated into the guide.
We’re happy to help. Thank you for sharing your insights. We are pleased to inform you that Coinbase is working on updating the documentation and we’ve logged this as feedback and have our internal teams look into this. While Coinbase can’t provide a specific timeline, rest assured that we are constantly working to build products our customers will love.
Thank you for your utmost support to Coinbase!