Skip to content
  • There are no suggestions because the search field is empty.

How-to: Automatically Record a Payment made outside YouLi via Zapier or API endpoint addpayment

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.

DRAFT

 

For this endpoint, "invitee" refers to the traveler registered on the trip. You can get the inviteeID from registration webhooks or the getinvitee endpoint.

addpayment
  1. tripID 
    1. Optional to provide a more robust integration
    1. If provided and Invitee is not on that trip, then fail with error:
      1. The person specified by the inviteeID is not on tripID XXXXXXX. Please check your data and try again
  1. inviteeID (discussed that users can get this via getInvitee before calling this endpoint)
    1. Required unless referenceCode provided, then referenceCode is required
    2. Zapier: Required
    3. If this invitee does not exist fail with error:
      • The person specified by the inviteeID does not exist. Please check your data and try again
  2. referenceCode
    1. If inviteeID provided
      1. Ignore if inviteeID is provided
    2. else
      1. Required String
    3. MaxLength: 10
    4. Zapier: Optional
  3. type
    1. Required
    2. Zapier: Required
    3. payment
      1. Maps to a successful manual payment
      2. Must be Positive
      3. If a Negative amount is sent, This should be validated with message payments must be a positive amount
    4. credit
      1. Maps to a success credit
      2. Must be Positive
      3. If a Negative amount is sent, This should be validated with message credits must be a positive amount
    5. refund
      1. Maps to a refund
      2. Must be Negative
      3. If Positive amount is sent, This should be validated with message Refund payments must be a negative amount
  4. label
    1. Optional String, default to “Manual Payment”
    2. Zapier: Optional
    3. Strip any HTML from this before inserting
    4. Maxlength: 100
  5. dateTimePaidUTC
    1. Optional date, default to time at the time of the call
    2. Zapier: Optional
    3. no conversion needed accept as is.
  6. currency
    1. Required, must be 3 characters
    2. Zapier: Required, String, “Payment Currency” as label
    3. Must match the Trip Currency, otherwise fail with error:
      1. Trip Currency is XXX, convert to that currency and record payment again
  7. paymentAmount (with decimals, 100.11)
    1. Required
    2. Zapier: Required, number with decimals
    3. Can be negative due to refund type
    4. Can be 0
      1. Status = “Success”
    5. Must be a number with decimal and comma allowed but if they put the comma in incorrect place the system will convert this and possibly do incorrect amounts.
  8. installmentName
    1. optional - if not specified, allocate dynamically based on what's outstanding (should be the same as payments made via Manage Payments/Trip Page)
    2. Zapier: Optional, string
    3. If installment specified - should follow the same as if this was made via Manage Payments
      1. If the amount is more than the outstanding owing on that installment, the remainder will allocate dynamically across the other installments.
    4. has to be a string, trim spaces for the match (because we don’t publish an endpoint for our installment ids)
    5. problem is if they have more than one installment with this name, but we should fail a call if it matches more than one or doesn’t match at all
  9. externalPaymentGatewaychargeID
    1. Optional String that can be used for lookup/deletion if another gateway integrate with us
    2. Zapier: Optional
    3. Because the PaymentMethod in our system is “offline” we won’t treat this as a charge made on our platform
  10. isApplyOnlyToThisPerson = nullable
    • Optional (similar to the popup for “Record Manual Payment”)
    • Zapier: optional, true/false
    • (default) False = apply our dynamic allocation logic across invitees in this invitation group
    • True = applies only to the specified inviteeID
    • Pay Together Gang:
      • isApplyOnlyToThisPerson
        • if provided - Respect the isApplyOnlyToThisPerson flag
          • If isApplyOnlyToThisPerson is true, apply payment and allocation only to this person
          • If isApplyOnlyToThisPerson is false, then the flag behavior matches the gang default and payments and allocations shall be applied across to the gang
        • NOT provided - default to ‘false’
          • (gangs default Pay Together setting)
      Pay Separately Gang:
      • isApplyOnlyToThisPerson
        • if provided - Respect the isApplyOnlyToThisPerson flag
          • If isApplyOnlyToThisPerson is true, then the flag behavior matches the gang settings and payment and allocation shall be applied only to this person
          • If isApplyOnlyToThisPerson is false, then override gang settings and apply payment and allocation across the gang (unlikely, but supported)
        • NOT provided - default to ‘true’
          • ( gangs default Pay Separately Setting)
  11. appendNoteToPlannerNote
    1. Optional string to append to Planner note
    2. Zapier: Optional, string, can be HTML
    3. Apply the HTML cleaning that we do for Planner Notes (HTML allowed) to remove scripts
    4. If provided, append at the end of the Planner Note with ‘<br/>’ before it