WeTravel Payment Links API

The Payment Links API from WeTravel — 3 operation(s) for payment links.

OpenAPI Specification

wetravel-payment-links-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: WeTravel Partner Access token Payment Links API
  version: 2.0.0
  description: WeTravel Partner API — Trip Builder, Bookings/Orders, Payments (payment links), Transactions, Suppliers and Leads. Enables travel companies to programmatically create WeTravel trip and booking pages and sync customers, orders and transactions. Harvested from the WeTravel Developer Hub per-endpoint OpenAPI fragments (developer.wetravel.com). Paths normalized to the https://api.wetravel.com/v2 base.
  x-apievangelist:
    generated: '2026-07-21'
    method: searched
    source: https://developer.wetravel.com/reference (per-endpoint OpenAPI fragments, merged; paths normalized to the /v2 base)
    note: Harvested v2 Partner API. Current release is v3 (2026-02-01); see changelog/.
servers:
- url: https://api.wetravel.com/v2
  description: Production
- url: https://api.demo.wetravel.to/v2
  description: Sandbox
security:
- bearerAuth: []
- tokenAuth: []
tags:
- name: Payment Links
paths:
  /payment_links:
    post:
      tags:
      - Payment Links
      summary: Create payment link
      description: Create a new payment link
      operationId: createPaymentLink
      parameters:
      - name: publish_immediately
        in: query
        description: Whether to publish the payment link immediately upon creation.
        required: false
        schema:
          type: boolean
          default: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/CreatePaymentLink'
            example:
              data:
                trip:
                  title: Amazing London Adventure
                  trip_id: TRIP20
                  start_date: '2026-05-07'
                  end_date: '2026-05-14'
                  currency: USD
                  participant_fees: all
                pricing:
                  price: 800
                  days_before_departure: 0
                  payment_plan:
                    allow_auto_payment: false
                    allow_partial_payment: false
                    deposit: 200
                    installments:
                    - price: 350
                      days_before_departure: 60
                    - price: 250
                      days_before_departure: 30
        required: true
      responses:
        '201':
          description: Successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PaymentLink'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/ValidationError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: A token is not valid.
    get:
      tags:
      - Payment Links
      summary: List payment links
      description: Get the list of all payment links
      operationId: getPaymentLinks
      parameters:
      - in: query
        name: per_page
        description: Number of trips per page
        schema:
          type: integer
          minimum: 1
          maximum: 1000
          example: 25
          default: 1000
      - in: query
        name: page
        description: Page number (minimum:1)
        schema:
          type: integer
          minimum: 1
          example: 1
          default: 1
      - name: publish_status
        in: query
        description: Filter payment links by publish status
        required: false
        schema:
          type: string
          enum:
          - published
          - draft
          default: published
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/PaymentLink'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: A token is not valid.
  /payment_links/{uuid}:
    delete:
      tags:
      - Payment Links
      summary: Delete payment link
      description: Delete a payment link
      operationId: deletePaymentLink
      parameters:
      - name: uuid
        in: path
        description: UUID of the payment link
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: A token is not valid.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: Payment Link {uuid} not found
    get:
      tags:
      - Payment Links
      summary: Get payment link
      description: Get a payment link by UUID
      operationId: getPaymentLinkById
      parameters:
      - name: uuid
        in: path
        description: UUID of the payment link
        required: true
        schema:
          type: string
      - name: publish_status
        in: query
        description: Filter payment link by publish status
        required: false
        schema:
          type: string
          enum:
          - published
          - draft
          default: published
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PaymentLink'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: A token is not valid.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: Payment Link {uuid} not found
    put:
      tags:
      - Payment Links
      summary: Update payment link
      description: Update a payment link
      operationId: updatePaymentLink
      parameters:
      - name: uuid
        in: path
        description: UUID of the payment link
        required: true
        schema:
          type: string
      - name: publish_immediately
        in: query
        description: Whether to publish the payment link immediately upon update
        required: false
        schema:
          type: boolean
          default: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/UpdatePaymentLink'
            example:
              data:
                trip:
                  title: Updated London Adventure
                  trip_id: TRIP21
                  start_date: '2026-06-01'
                  end_date: '2026-06-08'
                  currency: EUR
                  participant_fees: all
                pricing:
                  price: 950
                  days_before_departure: 7
                  payment_plan:
                    allow_auto_payment: false
                    allow_partial_payment: false
                    deposit: 250
                    installments:
                    - price: 400
                      days_before_departure: 45
                    - price: 300
                      days_before_departure: 15
        required: true
      responses:
        '200':
          description: Successfully updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PaymentLink'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/ValidationError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: A token is not valid.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: Payment Link {uuid} not found
  /payment_links/{uuid}/publish:
    post:
      tags:
      - Payment Links
      summary: Publish payment link
      description: Publish Payment Link
      operationId: publishPaymentLink
      parameters:
      - name: uuid
        in: path
        description: UUID of the payment link
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successfully published
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PaymentLink'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: Invalid request or validation error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: A token is not valid.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: Payment Link {uuid} not found
components:
  schemas:
    Installment:
      required:
      - days_before_departure
      - price
      type: object
      properties:
        price:
          type: number
          description: Amount of the installment
          format: double
          example: 145.99
          minimum: 1
          maximum: 1000000000
        days_before_departure:
          type: integer
          description: "Defines the date on which the installment is due in relation to the trip start date.\n                  E.g. if this setting is set to “5” and the trip starts on January 15, then the installment due date will be January 10."
          format: int32
          example: 60
    ValidationError:
      type: object
      properties:
        field_name:
          type: array
          items:
            type: string
            description: Error message
            example: is missing
    PaymentLink:
      type: object
      properties:
        trip:
          type: object
          description: Trip information associated with the payment link
          properties:
            uuid:
              type: string
              description: UUID of the trip
              example: '12345678'
            title:
              type: string
              description: Title of the trip
              example: Amazing London Adventure
            trip_id:
              type: string
              description: Trip reference ID
              example: TRIP20
            url:
              type: string
              description: URL of the trip
              example: https://example.com/trips/123456
            defaultImageUrl:
              type: string
              description: Default image URL for the trip
              example: https://example.com/trip-123.jpg
            start_date:
              type: string
              description: Start date of the trip in ISO 8601 format
              example: '2026-05-07'
            end_date:
              type: string
              description: End date of the trip in ISO 8601 format
              example: '2026-05-14'
            currency:
              type: string
              description: Currency code (e.g., USD, EUR, GBP)
              example: USD
            participant_fees:
              type: string
              enum:
              - credit_card
              - service
              - all
              - none
              description: "Allows you to choose how the payment fees are handled. The available options are:\n          “credit_card” - Bank account payments are free for the participant, but if they choose to pay by credit card, a card fee is added to the price\n          “service” - Service fees are paid by the participant. Payment method fees are covered by the organizer.\n          “all” - all fees are paid by the participant\n          “none” - all fees are paid by the organizer"
              example: all
        pricing:
          type: object
          description: Pricing information for the payment link
          properties:
            price:
              type: number
              format: double
              description: Price of the trip
              example: 800
              minimum: 1
              maximum: 1000000000
            days_before_departure:
              type: integer
              description: "Whether this trip has a booking deadline. The deadline is defined in relation to the trip start date.\n        E.g. if this setting is set to “5” and the trip starts on January 15, then the booking deadline will be January 10."
              format: int32
              example: 0
            payment_plan:
              type: object
              description: Payment plan
              properties:
                allow_auto_payment:
                  type: boolean
                  description: Participants will automatically be auto-billed to their default payment method when each payment is due.
                  example: false
                allow_partial_payment:
                  type: boolean
                  description: Allow participants to make partial payments
                  example: false
                deposit:
                  type: number
                  description: Deposit price of the package
                  format: double
                  example: 654
                  minimum: 0
                  maximum: 1000000000
                installments:
                  type: array
                  description: Payment installments (max 18)
                  maxItems: 18
                  items:
                    $ref: '#/components/schemas/Installment'
      description: Payment Link model
    CreatePaymentLink:
      required:
      - trip
      - pricing
      type: object
      properties:
        trip:
          type: object
          description: Trip information for the payment link
          required:
          - title
          - start_date
          - end_date
          - currency
          - participant_fees
          properties:
            title:
              type: string
              description: Title of the trip
              example: Amazing London Adventure
            trip_id:
              type: string
              description: Optional trip reference ID
              example: TRIP20
            start_date:
              type: string
              description: Start date of the trip in ISO 8601 format
              example: '2026-05-07'
            end_date:
              type: string
              description: End date of the trip in ISO 8601 format
              example: '2026-05-14'
            currency:
              type: string
              description: Currency code (e.g., USD, EUR, GBP)
              example: USD
            participant_fees:
              type: string
              enum:
              - credit_card
              - service
              - all
              - none
              description: "Allows you to choose how the payment fees are handled. The available options are:\n          “credit_card” - Bank account payments are free for the participant, but if they choose to pay by credit card, a card fee is added to the price\n          “service” - Service fees are paid by the participant. Payment method fees are covered by the organizer.\n          “all” - all fees are paid by the participant\n          “none” - all fees are paid by the organizer"
              default: all
        pricing:
          type: object
          description: Pricing information for the payment link
          required:
          - price
          properties:
            price:
              type: number
              format: double
              description: Price of the trip
              example: 800
              minimum: 1
              maximum: 1000000000
            days_before_departure:
              type: integer
              description: "Whether this trip has a booking deadline. The deadline is defined in relation to the trip start date.\n        E.g. if this setting is set to “5” and the trip starts on January 15, then the booking deadline will be January 10."
              format: int32
              example: 0
            payment_plan:
              type: object
              description: Payment plan
              required:
              - deposit
              - allow_auto_payment
              - allow_partial_payment
              - installments
              properties:
                allow_auto_payment:
                  type: boolean
                  description: Participants will automatically be auto-billed to their default payment method when each payment is due.
                  example: false
                allow_partial_payment:
                  type: boolean
                  description: Allow participants to make partial payments
                  example: false
                deposit:
                  type: number
                  description: Deposit price of the package
                  format: double
                  example: 654
                  minimum: 0
                  maximum: 1000000000
                installments:
                  type: array
                  description: Payment installments (max 18)
                  maxItems: 18
                  items:
                    $ref: '#/components/schemas/Installment'
      description: Create Payment Link request model
    UpdatePaymentLink:
      type: object
      properties:
        trip:
          type: object
          description: Trip information for the payment link (all fields optional for updates)
          properties:
            title:
              type: string
              description: Title of the trip
              example: Amazing London Adventure
            trip_id:
              type: string
              description: Trip reference ID
              example: TRIP20
            start_date:
              type: string
              description: Start date of the trip in ISO 8601 format
              example: '2026-05-07'
            end_date:
              type: string
              description: End date of the trip in ISO 8601 format
              example: '2026-05-14'
            currency:
              type: string
              description: Currency code (e.g., USD, EUR, GBP)
              example: USD
            participant_fees:
              type: string
              enum:
              - credit_card
              - service
              - all
              - none
              description: "Allows you to choose how the payment fees are handled. The available options are:\n          “credit_card” - Bank account payments are free for the participant, but if they choose to pay by credit card, a card fee is added to the price\n          “service” - Service fees are paid by the participant. Payment method fees are covered by the organizer.\n          “all” - all fees are paid by the participant\n          “none” - all fees are paid by the organizer"
              example: all
        pricing:
          type: object
          description: Pricing information for the payment link (all fields optional for updates)
          properties:
            price:
              type: number
              format: double
              description: Price of the trip
              example: 800
              minimum: 1
              maximum: 1000000000
            days_before_departure:
              type: integer
              description: "Whether this trip has a booking deadline. The deadline is defined in relation to the trip start date.\n        E.g. if this setting is set to “5” and the trip starts on January 15, then the booking deadline will be January 10."
              format: int32
              example: 0
            payment_plan:
              type: object
              description: Payment plan
              required:
              - deposit
              - allow_auto_payment
              - allow_partial_payment
              - installments
              properties:
                allow_auto_payment:
                  type: boolean
                  description: Participants will automatically be auto-billed to their default payment method when each payment is due.
                  example: false
                allow_partial_payment:
                  type: boolean
                  description: Allow participants to make partial payments
                  example: false
                deposit:
                  type: number
                  description: Deposit price of the package
                  format: double
                  example: 654
                  minimum: 0
                  maximum: 1000000000
                installments:
                  type: array
                  description: Payment installments (max 18)
                  maxItems: 18
                  items:
                    $ref: '#/components/schemas/Installment'
      description: Update Payment Link request model
    Pagination:
      type: object
      properties:
        total_count:
          type: integer
          description: Total number of leads
          format: int32
          example: 1
        page:
          type: integer
          description: Current page number where the lead is found
          format: int32
          example: 1
        per_page:
          type: integer
          description: 'How many lead are per page (default: 25)'
          format: int32
          example: 20
        total_pages:
          type: integer
          description: Total number of pages
          format: int32
          example: 1
        has_previous:
          type: boolean
          description: Whether the previous page is there or not
          example: false
        has_next:
          type: boolean
          description: Whether the next page is there or not
          example: false
      description: Pagination object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    tokenAuth:
      type: apiKey
      in: header
      name: X-Api-Key