v1

latestOpenAPI 3.0.12026-07-247756110.6 KB
Orders

Edit payment plans for multiple orders

Edit payment plan for an existing order

put/orders/batch/edit_payment_plan

Request body

Example request

{
  "batches": [
    {
      "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

successful_countinteger
failed_countinteger

Example response

{
  "successful_count": 1,
  "data": [
    {
      "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"
        }
      ]
    }
  ],
  "errors": [
    {
      "message": "Order not found"
    }
  ]
}