Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the length and type of PayPal's transaction ID (txn_id)?

Tags:

paypal

I want to store PayPal transaction IDs. What is the length and type I need to set on that field in the database? Currently, I set varchar(128). Is that sufficient?

like image 416
jason Avatar asked Sep 25 '11 01:09

jason


1 Answers

In the transaction search API it suggests the maximum length of a transaction ID is 19 single bytes. The transaction id is alphanumeric so a varchar(19) would be fine.

Personally I'd go for varchar(20) just in case they max out on transaction ids and need to add an extra digit :)

like image 119
Clive Avatar answered Oct 13 '22 07:10

Clive