💳 Payment Use Cases
Examples of how to use the Enthuse API to get information on your Payments
This page will cover some common examples of using the Enthuse API when pulling back data related to Payments.
A Payment represents a transaction of either type payment or refund, this payment could be a donation, entry fee, merchandise purchase etc.
Refunds can also be found through the Payments endpoints which will come through as a negative value and transaction_type will be 'refund'.
The payment_transaction_guid or payment_guid is the unique ID for that payment and can be linked to other data types such as registrations.
Example of details for Payments can be retrieved from the following endpoints:
Returns a list of payments /payments
Retrieves an existing payment /payments/{payment_guid}
An example of the Payments response can be seen below.
{
"status": 200,
"paymentList": [
{
"payment_transaction_guid": "00000000-0000-0000-0000-000000000000",
"charity_account_guid": "00000000-0000-0000-0000-000000000000",
"company_account_guid": null,
"shared_campaign_guid": "00000000-0000-0000-0000-000000000000",
"registrations_event_id": 12345,
"registrations_order_id": 12345,
"fundraise_event_page_id": 12345,
"fundraise_checkout_id": null,
"fundraise_payment_id": null,
"payment_method_reference": "ch_2MOfvS6OMZXeloA6036OMgGE",
"payment_system": "Stripe",
"first_name": "FirstName",
"last_name": "LastName",
"transaction_type": "Payment",
"product_type": "EventRegistration",
"payment_date": "2023-01-10 11:23:46",
"fundraise_page_or_team_page_ids": [
1234
],
"payment_type": "Ticket",
"currency": "GBP",
"platform_fee": 1.49,
"gift_aid_fee": 0,
"service_fee": 1.1,
"payment_provider_fee": 0,
"amount_without_fees": 8.51,
"amount_with_fees": 10,
"gift_aid_amount": 0,
"donor_fee_covered_amount": 0,
"fee_model": "PayAsYouGo",
"is_submitted_to_hmrc_status": false,
"fundraise_schedule_id": 0,
"parent_payment_transaction_guid": null,
"title": null,
"house_name": null,
"address_line_1": "Address",
"address_line_2": "",
"town": "Town",
"post_code": "SW1A 1AA",
"country_code": "GB",
"supporter_id": 12345,
"is_guest": false,
"is_anonymous": false,
"donation_message": null,
"email": "[email protected]",
"checkoutReferenceCode": null,
"purchaseInformation": null
},
{
"payment_transaction_guid": "00000000-0000-0000-0000-000000000000",
....
❓How can I find details on the fundraising page a payment was made to?
The field 'fundraise_page_or_team_page_ids' which can be found within the response body of a payment, will contain all fundraising pages linked to the payment.
- If the payment was made to a personal fundraising page then this will be populated with the personal fundraising page ID
- If the payment was made to a team fundraising page then this will be populated with the team fundraising page ID
- If the payment was made to a personal fundraising page that is part of a team then this will be populated with the personal fundraising page ID and the team fundraising page ID
You are able to call either the /personalFundraisingPage/{pfId} or /teamFundraisingPage/{pfId} endpoints, using the IDs found in the 'fundraise_page_or_team_page_ids' array as the 'pfId'.
❓How can I find more details on the supporter that made a payment?
The field 'supporter_id' which can be found within the response body of a payment, will be the Id of the supporter linked to the payment.
You are able to call /supporter/{supporter_id} endpoint, using the 'supporter_id', the response will contain the supporter linked to the payment.
❓How can I find the registration linked to a payment?
The fields 'first_name' and 'last_name' which can be found within the response body of a payment, will be the name of the supporter linked to the payment.
You are able to call /registrations endpoint, using the 'search' query parameter, the response will contain the registrant linked to the payment.
❓How can I find the schedule associated to a payment?
The field 'fundraise_schedule_id' which can be found within the response body of a payment, will be the 'schedule_id' of the schedule linked to the payment.
You are able to call /schedules/{schedule_id} endpoint, using the 'fundraise_schedule_id', the response will contain the schedule linked to the payment.
❓How can I find the event linked to a payment?
The field 'fundraise_event_page_id' which can be found within the response body of a payment, will be the 'event_page_id' of the event linked to the payment.
You are able to call /eventFundraisingPage/{event_page_id} endpoint, using the 'fundraise_event_page_id', the response will contain the event page linked to the payment.
❓How can I see my refunds?
You are able to call the /payments endpoint, ensuring to enter 'REFUND' in the 'type' query parameter, this will filter all results to only be refunds
Updated about 2 months ago