Send movie tickets

To send a movie ticket, you must first retrieve the transactionId of the user for whom you want to generate a ticket. Provide the transactionId for every transaction.

After getting the user transactionId, pass the movie ticket template parameters in the message payload.

To send a movie ticket to a user, make the following POST request to the API:

POST https://nbupayments.googleapis.com/v1/merchantCommunications:send
Content-type: application/json

{
  "merchantInfo": {
    "googleMerchantId": "Google assigned merchant ID."
  },
  "recipients": [
    {
      "vendorPaymentTransactionId": "35 digit UPI transaction ID"
    }
  ],
  "messagePayload": {
    "merchantMessageId": "Unique message ID.",
    "components": [
      {
        "template": {
          "templateType": "MOVIE_TICKET",
          "templateParameters": {
            "merchantBookingId": "Merchant assigned booking ID",
            "movieTheatreInfo": {
              "theatreName": "",
              "theatreAddress": {
                "addressLine": [
                  "Address line 1",
                  "Address line 2"
                ]
              }
            },
            "movieInfo": {
              "movieName": "Name of the movie.",
              "contentRating": "A / UA / U"
            },
            "screenName": "Name of screen / auditorium.",
            "qrCode": "QR code string for this movie ticket.",
            "startTime": "Movie start time in RFC 3339 format (2018-06-02T11:50:30Z)",
            "seatInfo": [
              {
                "seatType": "Seat type (Gold / Premium / Classic)",
                "seatNumber": "C3"
              },
              {
                "seatType": "Seat type (Gold / Premium / Classic)",
                "seatNumber": "C4"
              }
            ]
          }
        }
      }
    ]
  }
}

Parameters

User and merchant

The following data parameters for the user object must be passed in the API request:

Parameters Type of value Description Required/Optional
googleMerchantId String The ID provided by Google for a business. Required
vendorPaymentTransactionId String The 35-digit UPI transaction ID generated either by vendor (payment service provider) or merchant for every transaction. Required

Message payload

You must pass the merchant-created unique ID for every message in the merchantMessageId.

Template type

You must pass the value for templateType object as MOVIE_TICKET. Pass the merchant-created unique ID for every message in the merchantBookingId.

Movie theatre info object

The following are the data parameters to pass into the movieTheatreInfo object:

Parameters Type of value Description Required/Optional
theatreName String Name of the theatre where the audience is watching the movie. Required
theatreAddress String Address of the theatre where the audience is watching the movie. Optional

Movie info object

The following are the data parameters to pass into the movieInfo object:

ParametersType of valueDescriptionRequired/Optional
movieNameStringName of the movie.Required
contentRatingStringRating designated by the central Board of Film Certification (CBFC). can be any of the following:
  • U
  • UA
  • A
  • S
Required

You must pass the name of the screen on which the movie is shown in the screenName key. Pass the unique barcode string generated by the merchant for every movie ticket in the qrCode key and the movie start time in the startTime key. The startTime must be defined in the RFC 3339 format (2018-06-02T11:50:30Z).

Seat info object

The following are the data parameters to pass into the seatInfo object.

Parameters Type of value Description Required/Optional
seatType String Type of seat - Gold/Premium/ Classic. Required
seatNumber String Seat number allocated to the audience. Required

If more than one person is watching the movie, define the key-value pairs such as seatType and seatNumber for each audience in the seatInfo object as shown in the sample request.

Response

The API returns the following response if the request is successful.


{
  "sendMessageResults": [
    {
      "recipient": {
        "vendorPaymentTransactionId": "35-digit UPI transaction ID"
      },
      "status": {
        "code": 200,
        "message": "Success response message"
      }
    }
  ]
}

The response contains the recipient vendorPaymentTransactionId, API response status, and the relevant message.