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?
Asked
Active
Viewed 9,770 times
7
-
possible duplicate of [PayPal IPN unique identifier](http://stackoverflow.com/questions/9240235/paypal-ipn-unique-identifier) – T.Todua Apr 08 '14 at 13:02
2 Answers
10
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 :)

Clive
- 36,918
- 8
- 87
- 113
-
The link you provided no-longer works (January 2017) and now redirects to PayPal's documentation homepage. – Dai Jan 14 '17 at 08:31
-
@Dai Actually almost every link for PayPal out there in the Internet now is corrupted and directs to the documentation home page. They should support the old links if they have to do a change in the documents urls – Accountant م Oct 30 '17 at 15:54
-1
parent_txn_id In the case of a refund, reversal, or canceled reversal, this variable contains the txn_id of the original transaction, while txn_id contains a new ID for the new transaction. Length: 19 characters Type: String

Abdolnabi Zameni
- 36
- 1
- 4