Get PayPal account details for transaction payments
Transactions now return PayPal account details for PayPal payment attempts, including email address and billing agreement reference.
What's new?
We added a new paypal object to payments[].method_details against a transaction entity. It returns the email address and billing agreement reference for customers who pay using PayPal.
Information about the payment method used for a payment attempt.
Information about the PayPal account used to pay. null unless type is paypal.
How it works
Transactions have an array of payments, which returns an object for each payment attempt for a transaction.
Previously, method_details included a card object with information about the card used to pay, but there was no equivalent for PayPal. We added a paypal object to method_details, so now you can get the email address associated with the customer's PayPal account (email) and the billing agreement reference for a payment (reference).
The reference field is the PayPal billing agreement identifier. It's only populated for subscription payments where a billing agreement was created between the customer and PayPal. For one-off PayPal payments, reference is null.
This is especially useful for billing information screens and payment change workflows, where you could show a customer information about their existing PayPal payment method.
Summary of changes
Fields
This is a summary of the new fields in the Paddle API:
| Entity | Field | Change |
|---|---|---|
transaction | payments[].method_details.paypal | New field |
transaction | payments[].method_details.paypal.email | New field |
transaction | payments[].method_details.paypal.reference | New field |
Next steps
This change is available in version 1 of the Paddle API.
It's a non-breaking change, meaning it doesn't impact existing integrations. The new paypal field is null for non-PayPal transactions.
You can list transactions or get a transaction using the API to see the new field.