how can I search transactions for the last 4 digits of a credit card number?
This is going to be a multiple API table look up to link the Card back to the Invoices.
You will need to use the XML-RPC API to achieve this, as there is no way to this via the REST API.
You will need to use the “DataService.query” API function to achieve querying the tables.
You can search the “Last4” field via “CreditCard” Table, but keep a note of the “Id” field.
Next, you need to query the “CCharge” table via the Credit Card Id field “CCId”, but keep a note of the “PaymentId” field.
Next, you need to query the “Payment” table via the Payment Id field “Id”. You can then use the “InvoiceId” field for the referring Invoice.
The Invoice table can be found here.
Does that help?