Usage Guide: Automatically Record (or delete) a Payment made outside YouLi via Zapier or API endpoint addmanualpayment
Payments received in other platforms still need to be recorded, you can do this via the UI using Manual Payments, or use this API to do it automatically.
Available Plans: GROW and above
No booking fee incurred for payments taken externally and recorded using this endpoint.
For this endpoint, "invitee" refers to the traveler registered on the trip. You can get the inviteeId from registration webhooks or the getinvitee endpoint.
https://youlivetotravel.github.io/youli-doco/
This endpoint can be accessed either directly via the API or through Zapier.
Record Manual Payment, Refund or Credit
You can do this via the UI from Manage Payments, or use this endpoint directly or via Zapier to record a payment made outside YouLi.
WARNING: You should only apply payments to invitees that are registered ("RegistrationStatus": 1), adding a payment when they have a different status may not result in the correct Trip Page Invoice.
If necessary, update the invitee to be registered via addregistration first
POST /api/trippayment/addmanualpayment
tripId- Optional, but recommended for a more reliable integration.
-
- If provided and the invitee is not on that trip, fails with error:
- The person specified by the inviteeId is not on tripId XXXXXXX. Please check your data and try again
- If provided and the invitee is not on that trip, fails with error:
inviteeId- Lookup via email using
getInviteebefore calling this endpoint - Required unless referenceCode is provided.
- Zapier: Required
- If this invitee does not exist, the request fails with the error:
- The person specified by the inviteeId does not exist. Please check your data and try again
- Lookup via email using
referenceCode- This is a unique code per invitee per trip that is shown on their invoice so they can provide this when making the payment - making it easier to match back using this endpoint. This can be more accurate than using an email to lookup the inviteeId since people don't always use the same email for payments as they do for trip registrations.
- Ignored if inviteeID is provided
- Otherwise, required String
- MaxLength: 10
- Zapier: Optional
type- Required
- Zapier: Required
payment- Creates a manual payment record
- Must be positive, otherwise fails with error:
- payments must be a positive amount
credit- Creates a credit record
- Must be positive, otherwise fails with error:
- Credits must be a positive amount
refund- Creates a refund record
- Must be negative, otherwise fails with error:
- Refund payments must be a negative amount
label- Optional String, default to “Manual Payment”
- HTML not supported
- Maxlength: 100
- Optional String, default to “Manual Payment”
dateTimePaidUTC- Optional date, default to time at the time of the call
- Zapier: Optional
currency- Required, must be 3 character ISO currency code
- Zapier: Required, String
- Must match the Trip Currency, otherwise fails with error:
- Trip Currency is XXX, convert to that currency and record payment again
paymentAmount- Required
- Zapier: Required, number with decimals
- Can be positive, negative, or zero. Validation depends on the selected type:
- payment must be positive
- credit must be positive
- refund must be negative
- Recommend avoiding commas in the amount or testing to be sure interpretation of the comma is correct
installmentName- Optional - if not specified, allocate dynamically based on what's outstanding
- Zapier: Optional, string
- If installment specified, and the amount is more than the outstanding owing on that installment, the remainder will allocate dynamically across the other installments.
- Fails if name matches more than one or doesn’t match at all
ApplyTo- Optional
- Zapier: optional
- Values:
onlythisperson(default if paying separately)- Apply the payment only to the specified invitee.
invitationgroup(default if paying together)- Apply the payment across the invitation group.
reservation(only available if Reservations are enabled)
- Apply the payment across the reservation.
appendNoteToPlannerNote- If provided, appends at the end of the Planner Note with ‘<br/>’ before it
- Optional string to append to Planner Note
- Zapier: Optional, string, can be HTML
- HTML cleaning applied to remove scripts
ExternalPaymentGatewayChargeId- Optional, string
- Stores a gateway charge id from an external payment gateway
IsThirdPartyContributionPayment- Optional, boolean
- Defaults to false
- Ignored unless Multi-party payments enabled for the owner of the trip.
- If set to true marks the payment as a third-party contribution
Response JSON
The full response matches the existing getInvitee response schema and includes the updated payment list.
NOTE: By recording a manual payment, if the invitee was previously REGISTERED ("RegistrationStatus": 1) but NOT BOOKED, the payment will change their booking status in the Trip CRM, depending on their remaining balance, to either:
-
BOOKED & OWING
- BOOKED & FULLY PAID
They will also appear in the Global Bookings Report and in any Affiliate commission report if they came from an affiliate source.
For example:
{
"Results":
[
{
"Id": "dbc0945e-43fe-e611-82bb-985fd335920c",
"FullName": "Example Invitee",
"FirstName": "Example",
"LastName": "Invitee",
"Email": "example@example.com",
"PhoneNumber": "44443333",
"BillToFirstName": "Example",
"BillToLastName": "Invitee",
"BillToStreetLine1": "100 Some Street",
"BillToStreetLine2": null,
"BillToCity": "Melbourne",
"BillToCountry": "Australia",
"BillToState": "Victoria",
"BillToPostCode": "3000",
"AvatarURL": "https://ylt-images.imgix.net/app/invitees-icon@2x.png?fit=crop&crop=faces&h=150&w=150",
"MiniBio": "Bio sample",
"RegistrationStatus": 1,
"RegistrationDateReceivedUTC": "2022-06-02T03:16:44.6720722Z",
"RegistrationNote": "Example registration note",
"ResponseDietaryRequirement": "Vegetarian",
"PlannerNote": "Planner notes may be here",
"TransferredFrominviteeId": "26e5179e-4ea7-47ac-b53c-9bdcd61a38d3",
"InvitationGroup": "groupname",
"InvitationGroupMembers": [
{
"FullName": "Sample Friend",
"FirstName": "Sample",
"LastName": "Friend",
"Email": "friend@example.com"
},
{
"FullName": "Second Friend",
"FirstName": "Second",
"LastName": "Friend",
"Email": "second@example.com"
}
],
"NumberInGroup": 2,
"Category": "Invitee Category",
"ReferenceCode": "TNSHYVC8Y6",
"PackageName": "Standard Package",
"PackageCode": "Deluxe",
"PackageFeesAndTaxesAmount": 20.00,
"BasePrice": 1256.25,
"Room": null,
"AmountOwing": 837.542,
"tripId": "341e71a2-489f-e711-8305-985fd3437709",
"TripName": "Saturn In The Summertime",
"TripAlias": "saturn-trip",
"TripRegistrationButtonLabel": "OK sure",
"TripTags": [
"Culinary",
"Fundraising"
],
"MagicLink": "https://youli.io/t/ahmad/saturn-trip/06826297-91eb-4e37-806b-70c1a08f657b",
"TrackingSource": null,
"TrackingMedium": null,
"TrackingCampaign": null,
"Payments": [
{
"Id": "8de4ef98-7821-497b-8a9d-916d893f67a2",
"PaymentGatewayChargeId": null,
"Amount": 100.0,
"Currency": "USD",
"Method": "offline",
"Description": "Sample payment",
"Status": "successful",
"PaymentDateUTC": "2022-06-02T03:16:44.6720722Z",
"YouLiFeeAmount": 0.0,
"YouLiFeeCurrency": null,
"CreditCardSurchargeAmount": 0.0,
"CreditCardSurchargeCurrency": "USD",
"RefundProtectSurchargeAmount": 0.0,
"RefundProtectSurchargeCurrency": "USD",
"Allocations": [
{
"Id": "00000000-0000-0000-0000-000000000000",
"FullName": "Example Invitee",
"FirstName": "Example",
"LastName": "Invitee",
"Amount": 100.0,
"Installment": null
}
]
}
]
}
Delete Manual Payment, Refund or Credit
You can do this via the UI from Manage Payments, or use this endpoint directly or via Zapier to delete a manual payment recorded in YouLi (via API or UI)
DELETE /api/trippayment/deletemanualpayment/{paymentId}
paymentId- Required
- Get this from the response to
addmanualpaymentorgetinvitees
-
- Also available from webhooks
- If a paymentId is provided for a payment that is not manual, the request fails with:
- Only Manual Payment, Manual Refund or Credit are allowed for deletion
inviteeId- Required unless referenceCode provided
- Get this from the response to
addmanualpaymentorgetinvitees - Also available from webhooks
referenceCode- Required if inviteeId is missing
- Ignored if inviteeId provided
Response JSON
Response when successful is the updated invitee, where the payment (and its allocations) have been removed, example:
{
"Results":
[
{
"Id": "dbc0945e-43fe-e611-82bb-985fd335920c",
"FullName": "Example Invitee",
"FirstName": "Example",
"LastName": "Invitee",
"Email": "example@example.com",
"PhoneNumber": "44443333",
"BillToFirstName": "Example",
"BillToLastName": "Invitee",
"BillToStreetLine1": "100 Some Street",
"BillToStreetLine2": null,
"BillToCity": "Melbourne",
"BillToCountry": "Australia",
"BillToState": "Victoria",
"BillToPostCode": "3000",
"AvatarURL": "https://ylt-images.imgix.net/app/invitees-icon@2x.png?fit=crop&crop=faces&h=150&w=150",
"MiniBio": "Bio sample",
"RegistrationStatus": 1,
"RegistrationDateReceivedUTC": "2022-06-02T03:16:44.6720722Z",
"RegistrationNote": "Example registration note",
"ResponseDietaryRequirement": "Vegetarian",
"PlannerNote": "Planner notes may be here",
"TransferredFrominviteeId": "26e5179e-4ea7-47ac-b53c-9bdcd61a38d3",
"InvitationGroup": "groupname",
"InvitationGroupMembers": [
{
"FullName": "Sample Friend",
"FirstName": "Sample",
"LastName": "Friend",
"Email": "friend@example.com"
},
{
"FullName": "Second Friend",
"FirstName": "Second",
"LastName": "Friend",
"Email": "second@example.com"
}
],
"NumberInGroup": 2,
"Category": "Invitee Category",
"ReferenceCode": "TNSHYVC8Y6",
"PackageName": "Standard Package",
"PackageCode": "Deluxe",
"PackageFeesAndTaxesAmount": 20.00,
"BasePrice": 1256.25,
"Room": null,
"AmountOwing": 837.542,
"tripId": "341e71a2-489f-e711-8305-985fd3437709",
"TripName": "Saturn In The Summertime",
"TripAlias": "saturn-trip",
"TripRegistrationButtonLabel": "OK sure",
"TripTags": [
"Culinary",
"Fundraising"
],
"MagicLink": "https://youli.io/t/ahmad/saturn-trip/06826297-91eb-4e37-806b-70c1a08f657b",
"TrackingSource": null,
"TrackingMedium": null,
"TrackingCampaign": null,
}