v1

latestOpenAPI 3.0.12026-07-247756110.6 KB
Orders

Edit payment plan for an order

Edit payment plan for an existing order

put/orders/{order_id}/edit_payment_plan

Path parameters

order_idstring required

order identifier

Request body

notification_messagestring

Message to be sent to the participant

Example request

{
  "payment_plan": {
    "installments": [
      {
        "amount": 100000,
        "type": "installment",
        "days_before_departure": 60
      }
    ],
    "allow_partial_payment": true,
    "enable_auto_payment": true
  },
  "notification_message": "Hello, this is a notification message"
}

Response

Get Trip Order

pending_amountinteger

Bank payment is still pending confirmation. Clears in 5 business days

paid_amountinteger

Total gross amount paid through WeTravel - cc or bank payments

failed_amountinteger

Attempted bank payments that have failed

disputed_amountinteger

Disputed payments for the booking

cash_amountinteger

Cash payments registered for the booking

refunded_amountinteger

Amount refunded to the participant through WeTravel - cc or bank payments

cash_refunded_amountinteger

Cash refund to the participant

adjusted_amountinteger

Amount withheld upon package or option cancellation

due_amountinteger

Balance due. Applies to orders without payment plans only

past_due_amountinteger

Amount due before today. Applies to orders with payment plans only

due_later_amountinteger

Amount due in later installments. Doesn't include past_due_amount. Applies to orders with payment plans only

total_due_amountinteger

Total amount due. For orders without payment plans (due_amount), for orders with payment plans (past_due_amount + due_later_amount)

total_amountinteger

Sum of the price of all packages and add-ons in the booking

total_next_installmentinteger

All installments due in the next periods, does not include the current due amount. Applies to orders with payment plans only

idstring

Unique ID of the order

rebooked_from_order_idstring

Unique ID of the order which this order was rebooked from

trip_uuidstring

Unique ID of the trip

buyer_idinteger

Unique ID of the buyer

trip_lengthinteger

Trip duration

departure_datestring

Departure date of the trip in ISO 8601 format

currency'USD' | 'EUR' | 'GBP' | 'CAD' | 'ZAR' | 'AUD'

Currency of the trip

total_deposit_dueinteger

Total amount to pay for the deposit of the package. Applies for bookings with no payment made yet

overpaid_amountinteger

Amount that has been overpaid. This can happen if the organizer has set a custom price for an existing booking, which is lower than what the buyer has already paid

already_paidinteger

Total paid amount for all items in the booking at this point. Includes both packages and add-ons

has_payment_planboolean

Whether the package has a payment plan or not

allow_auto_paymentboolean

Participants will automatically be auto-billed to their default payment method when each payment is due

allow_partial_paymentboolean

Allow participants to make partial payments

active_participants_countinteger

Number of active participants in the booking/order

cancelled_participants_countinteger

Number of canceled participants in the booking/order

created_atstring date-time

Time at which the order was created

Example response

{
  "paid_amount": 200000,
  "refunded_amount": 100000,
  "total_amount": 100000,
  "buyer_id": 1,
  "trip_length": 8,
  "departure_date": "2021-08-14T00:00:00.000Z",
  "currency": "EUR",
  "overpaid_amount": 100000,
  "already_paid": 200000,
  "has_payment_plan": true,
  "allow_partial_payment": true,
  "active_participants_count": 1,
  "created_at": "2021-07-30T09:55:46.000Z",
  "esign_document": {
    "document_id": 3126680263958200300,
    "signed_at": "2021-07-30T09:55:46.000Z"
  },
  "options": [
    {
      "trip_option_id": "2354579505229986943",
      "price": 100000,
      "name": "Gold package",
      "type": "package",
      "active_count": 1,
      "deposit_amount": 5000,
      "has_deposit": true,
      "participants": [
        {
          "email": "max.smith@wetravel.com",
          "first_name": "Max",
          "last_name": "Smith"
        }
      ]
    }
  ],
  "donations": [
    {
      "price": 100000,
      "name": "Carbon Offset",
      "type": "Carbon Offset",
      "active_count": 1,
      "amount": 5000
    }
  ],
  "installments": [
    {
      "type": "installment",
      "total": 5000,
      "previous_payment": 5000,
      "paid": true,
      "date": "2021-06-25T00:00:00.000Z"
    }
  ]
}