viagogo Payments API

The Payments API from viagogo — 3 operation(s) for payments.

OpenAPI Specification

viagogo-payments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: viagogo Sales Payments API
  version: 2.249.0.0
  x-logo:
    url: https://img.vggcdn.net/img/assets/logo/viagogo_logo_apidocs.png
    backgroundColor: '#222222'
servers:
- url: https://api.viagogo.net/v2
  description: Production
- url: https://sandbox.api.viagogo.net/v2
  description: Sandbox
security:
- OAuth2:
  - read:payment
  - read:sales
  - read:sellerlistings
  - read:user
  - write:purchases
  - write:sales
  - write:sellerlistings
  - write:user
tags:
- name: Payments
paths:
  /payments:
    get:
      tags:
      - Payments
      summary: List payments
      description: Lists payments for the authenticated user.
      operationId: Payments_GetPayments
      responses:
        '200':
          description: ''
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '404':
          $ref: '#/components/responses/not_found'
          description: null
        '403':
          $ref: '#/components/responses/forbidden'
          description: null
        '401':
          $ref: '#/components/responses/requires_authentication'
          description: null
        '500':
          $ref: '#/components/responses/internal_server_error'
          description: null
      security:
      - OAuth2:
        - read:user
        - read:payment
  /payments/{paymentId}:
    get:
      tags:
      - Payments
      summary: Get a payment
      operationId: Payments_Get
      parameters:
      - name: paymentId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Payment'
        '404':
          $ref: '#/components/responses/not_found'
          description: null
        '403':
          $ref: '#/components/responses/forbidden'
          description: null
        '401':
          $ref: '#/components/responses/requires_authentication'
          description: null
        '500':
          $ref: '#/components/responses/internal_server_error'
          description: null
      security:
      - OAuth2:
        - read:user
        - read:payment
  /payments/next:
    get:
      tags:
      - Payments
      summary: Preview next payment
      description: Previews the next payment for the authenticated user. The payment will not have an `id` and is subject to changes.
      operationId: Payments_GetNextPayment
      responses:
        '200':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Payment'
        '404':
          $ref: '#/components/responses/not_found'
          description: null
        '403':
          $ref: '#/components/responses/forbidden'
          description: null
        '401':
          $ref: '#/components/responses/requires_authentication'
          description: null
        '500':
          $ref: '#/components/responses/internal_server_error'
          description: null
      security:
      - OAuth2:
        - read:user
        - read:payment
components:
  schemas:
    EmbeddedEvent:
      type: object
      description: An event on the viagogo platform.
      additionalProperties: false
      properties:
        id:
          type:
          - integer
          - 'null'
          description: The event identifier.
          format: int32
        name:
          type:
          - string
          - 'null'
          description: The name of the event.
        start_date:
          type:
          - string
          - 'null'
          description: The date when the event starts.
          format: date-time
        end_date:
          type:
          - string
          - 'null'
          description: The date when the event ends.
          format: date-time
        on_sale_date:
          type:
          - string
          - 'null'
          description: The date when tickets for the event will go onsale.
          format: date-time
        date_confirmed:
          type:
          - boolean
          - 'null'
          description: True if the event start and end date have been confirmed; Otherwise, false.
        merged_events:
          type:
          - array
          - 'null'
          description: The list of event ids that are merged into this event.
          items:
            $ref: '#/components/schemas/MergedEntity'
        _links:
          oneOf:
          - $ref: '#/components/schemas/EmbeddedEventLinks'
    EmbeddedSale:
      type: object
      additionalProperties: false
      properties:
        id:
          type:
          - integer
          - 'null'
          description: The sale identifier.
          format: int32
        created_at:
          type:
          - string
          - 'null'
          description: The date when the sale was created.
          format: date-time
        seating:
          description: The seating information for the ticket(s) that have been sold.
          oneOf:
          - $ref: '#/components/schemas/Seating'
        proceeds:
          description: The total amount that the seller will receive for the sale.
          oneOf:
          - $ref: '#/components/schemas/Money'
        number_of_tickets:
          type:
          - integer
          - 'null'
          description: The number of tickets that have been sold.
          format: int32
        _links:
          oneOf:
          - $ref: '#/components/schemas/EmbeddedSaleLinks'
    ChargeDetail:
      type: object
      additionalProperties: false
      properties:
        amount:
          oneOf:
          - $ref: '#/components/schemas/Money'
        reason_description:
          type:
          - string
          - 'null'
        sale_id:
          type: integer
          format: int32
        id:
          type:
          - integer
          - 'null'
          format: int32
    Payment:
      type: object
      description: A payment on the viagogo marketplace that belongs to the currently authenticated user.
      additionalProperties: false
      properties:
        id:
          type:
          - integer
          - 'null'
          description: The payment identifier
          format: int32
        created_at:
          type:
          - string
          - 'null'
          description: Date when the payment was created.
          format: date-time
        number_of_sales:
          type: integer
          description: Total number of sales associated to the payment.
          format: int32
        payment_amount:
          description: Net amount the user will receive in this payment.
          oneOf:
          - $ref: '#/components/schemas/Money'
        credits:
          description: Non-proceeds credits applied to the user's account, paid out in this payment.
          oneOf:
          - $ref: '#/components/schemas/Money'
        charges:
          description: Charges applied to the user's account, settled in this payment.
          oneOf:
          - $ref: '#/components/schemas/Money'
        proceeds:
          description: Money owed to the user from sale(s) of a ticket(s), paid out in this payment.
          oneOf:
          - $ref: '#/components/schemas/Money'
        reference_numbers:
          type:
          - array
          - 'null'
          description: Reference numbers for the payment, can be multiple if the payment is split.
          items:
            type: string
        _links:
          oneOf:
          - $ref: '#/components/schemas/PaymentLinks'
        _embedded:
          oneOf:
          - $ref: '#/components/schemas/PaymentEmbeddedResources'
    EmbeddedVenue:
      type: object
      description: A venue is a location where an event takes place.
      additionalProperties: false
      properties:
        id:
          type:
          - integer
          - 'null'
          description: The venue identifier.
          format: int32
        name:
          type:
          - string
          - 'null'
          description: The name of the venue.
        city:
          type:
          - string
          - 'null'
          description: The name of the city where the venue is located.
        state_province:
          type:
          - string
          - 'null'
          description: The name of the State or Province where the venue is located.
        latitude:
          type:
          - number
          - 'null'
          description: The latitude for the venue.
          format: double
        longitude:
          type:
          - number
          - 'null'
          description: The longitude for the venue.
          format: double
        _links:
          oneOf:
          - $ref: '#/components/schemas/EmbeddedVenueLinks'
        _embedded:
          oneOf:
          - $ref: '#/components/schemas/EmbeddedVenueEmbeddedResources'
    EmbeddedPaymentMethodLinks:
      title: EmbeddedPaymentMethodLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
    MergedEntity:
      type: object
      description: An entity that has been merged into another entity.
      additionalProperties: false
      properties:
        id:
          type: integer
          description: The identifier for this entity.
          format: int32
    PaymentEmbeddedResources:
      title: PaymentEmbeddedResources
      type: object
      properties:
        payment_method:
          description: Payment method that will be used for the payments or charges.
          oneOf:
          - $ref: '#/components/schemas/EmbeddedPaymentMethod'
        sales:
          type:
          - array
          - 'null'
          description: Sales associated with the payment.
          items:
            $ref: '#/components/schemas/PaymentSale'
    EmbeddedSaleLinks:
      title: EmbeddedSaleLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
    Country:
      type: object
      additionalProperties: false
      properties:
        code:
          type:
          - string
          - 'null'
          description: The two-letter ISO 3166 code for the country.
        name:
          type:
          - string
          - 'null'
          description: The name of the country.
        _links:
          oneOf:
          - $ref: '#/components/schemas/CountryLinks'
    PaymentSale:
      type: object
      description: A sale related to a payment that belongs to the currently authenticated user.
      additionalProperties: false
      properties:
        proceeds:
          type:
          - array
          - 'null'
          description: Money owed to the user from this sale.
          items:
            $ref: '#/components/schemas/ChargeDetail'
        charges:
          type:
          - array
          - 'null'
          description: Charges, related to this sale, that are applied to the user's account.
          items:
            $ref: '#/components/schemas/ChargeDetail'
        credits:
          type:
          - array
          - 'null'
          description: Non-proceeds credits, related to this sale, that are applied to the user's account.
          items:
            $ref: '#/components/schemas/ChargeDetail'
        _links:
          oneOf:
          - $ref: '#/components/schemas/PaymentSaleLinks'
        _embedded:
          oneOf:
          - $ref: '#/components/schemas/PaymentSaleEmbeddedResources'
    PaymentSaleLinks:
      title: PaymentSaleLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
    EmbeddedVenueLinks:
      title: EmbeddedVenueLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
    EmbeddedPaymentMethod:
      type: object
      additionalProperties: false
      properties:
        details:
          type:
          - string
          - 'null'
          description: The obfuscated details of the payment method
        _links:
          oneOf:
          - $ref: '#/components/schemas/EmbeddedPaymentMethodLinks'
    Seating:
      type: object
      description: Represents the seating information for a ticket(s) in a Venue.
      additionalProperties: false
      required:
      - section
      properties:
        section:
          type:
          - string
          - 'null'
          description: The section of the ticket(s).
        row:
          type:
          - string
          - 'null'
          description: The row of the ticket(s).
        seat_from:
          type:
          - string
          - 'null'
          description: The first in a contiguous block of seats to which the tickets have been allocated.
        seat_to:
          type:
          - string
          - 'null'
          description: The last in a contiguous block of seats to which the tickets have been allocated.
    EmbeddedEventLinks:
      title: EmbeddedEventLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
    PaymentLinks:
      title: PaymentLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
    Link:
      type: object
      additionalProperties: false
      properties:
        href:
          type:
          - string
          - 'null'
        title:
          type:
          - string
          - 'null'
        templated:
          type: boolean
    CountryLinks:
      title: CountryLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
        country:events:
          description: The events taking place in a country.
          oneOf:
          - $ref: '#/components/schemas/Link'
        country:localwebpage:
          oneOf:
          - $ref: '#/components/schemas/Link'
    EmbeddedVenueEmbeddedResources:
      title: EmbeddedVenueEmbeddedResources
      type: object
      properties:
        country:
          description: The Country where the venue is located.
          oneOf:
          - $ref: '#/components/schemas/Country'
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type:
          - string
          - 'null'
        message:
          type:
          - string
          - 'null'
        errors:
          type:
          - object
          - 'null'
          additionalProperties:
            type: array
            items:
              type: string
    Money:
      type: object
      description: Returned for monetary values, such as ticket prices, fees charged and tax amounts.
      additionalProperties: false
      required:
      - amount
      - currency_code
      properties:
        amount:
          type:
          - number
          - 'null'
          description: The decimal amount of the money.
          format: decimal
        currency_code:
          type:
          - string
          - 'null'
          description: The ISO 4217 currency code that the monetary value is represented in.
        display:
          type:
          - string
          - 'null'
          description: A user-friendly string representing the monetary value.
    PaymentSaleEmbeddedResources:
      title: PaymentSaleEmbeddedResources
      type: object
      properties:
        event:
          description: The event for this sale.
          oneOf:
          - $ref: '#/components/schemas/EmbeddedEvent'
        sale:
          description: A sale associated with a payment.
          oneOf:
          - $ref: '#/components/schemas/EmbeddedSale'
        venue:
          description: The venue where the event is taking place.
          oneOf:
          - $ref: '#/components/schemas/EmbeddedVenue'
  responses:
    internal_server_error:
      description: Internal server error
      content:
        application/hal+json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/Error'
    not_found:
      description: The URI requested is invalid or the resource requested, such as an event, does not exist.
      content:
        application/hal+json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/Error'
    forbidden:
      description: The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why.
      content:
        application/hal+json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/Error'
    requires_authentication:
      description: Authentication credentials were missing or incorrect.
      content:
        application/hal+json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/Error'
  securitySchemes:
    OAuth2:
      type: oauth2
      bearerFormat: JWT
      flows:
        implicit:
          authorizationUrl: https://account.viagogo.com/authorize
          tokenUrl: https://account.viagogo.com/oauth2/token
          refreshUrl: https://account.viagogo.com/oauth2/token
        clientCredentials:
          tokenUrl: https://account.viagogo.com/oauth2/token
        authorizationCode:
          authorizationUrl: https://account.viagogo.com/authorize
          tokenUrl: https://account.viagogo.com/oauth2/token
          refreshUrl: https://account.viagogo.com/oauth2/token
x-tagGroups:
- name: Endpoints
  tags:
  - Sales
  - E-Tickets
  - Payments
  - Shipments
  - TicketHolders
  - TransferStatusProof
- name: Basic Types
  tags:
  - BasicType_Money
- name: Resources
  tags:
  - Resource_ETickets
  - Resource_ETicketUploads
  - Resource_Payment
  - Resource_Sale
  - Resource_Sales
  - Resource_Shipment
  - Resource_Shipments
  - Resource_TicketHolder
  - Resource_TransferStatusProof