I wish to retrieve the payment receipt details, specifically
The name, email, item and amount paid ,with card type and any details like the item name
What is the easiest way to retrieve the receipt info.
I wish to use the details to populate a custom pdf receipt created as a fillable pdf form
I am a newbie.
Payments were collected by debit and credit cards only.
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
To retrieve payment details, you can use the RetrievePayment endpoint of the Payments API. This will return a Payment object that includes details such as the amount paid, the payment method (card type), and the customer’s name and email if they were provided during the transaction.
For item details, you would need to use the Orders API. Each payment is associated with an Order, which contains line items for the products or services purchased. You can use the RetrieveOrder endpoint with the order ID from the Payment object to get the details of the items purchased.
Please note that the Payments API does not provide direct access to the receipt information. However, the information you need to generate a custom receipt can be obtained from the Payment and Order objects.