Method: getOrderDetails

Get an order that provides the basis to the Google partners for charging the end-users.

Responses to this query may be empty if this method does not return an HTTP 200. They are empty in situations where an ErrorResponse with a clear description could be used to help an attacker understand the payment integrator account identifier of other integrators. In these situations, where either the signing key doesn't match, the payment integrator identifier was not found, or the encryption key was unknown, this method will return a HTTP 404 with an empty body.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 1,
      "revision": 0
    },
    "requestId": "HsKv5pvtQKTtz7rdcw1YqE",
    "requestTimestamp": "1519996751331"
  },
  "paymentIntegratorAccountId": "IntegratorFakeAccount",
  "orderLookupCriteria": {
    "googleTransactionReferenceNumberCriteria": {
      "googleTransactionReferenceNumber": "714545417102363157911822",
      "authorizationCode": "111111"
    }
  }
  "requestOriginator": {
    "organizationId": "ISSUER_256",
    "organizationDescription": "Community Bank of Some City",
  }
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": "1519996752221"
  },
  "result": "SUCCESS",
  "order": {
    "timestamp": "1517992525972",
    "orderId": "UPG.DEFC.X6F4.MEOM.CDWF",
    "currencyCode": "USD",
    "subTotalAmount": "399000000",
    "totalAmount": "459000000",
    "shippingAddress": {
      "name": "Example Customer",
      "addressLine": ["123 Main St"],
      "localityName": "Springfield",
      "administrativeAreaName": "CO",
      "postalCodeNumber": "80309",
      "countryCode": "US"
    },
    "taxes": [],
    "items": [
      {
        "description": "YouTube TV membership",
        "merchant": "fake org"
        "googleProductName": "YouTube TV"
        "quantity": "1",
        "totalPrice": "399000000"
      },
      {
        "description": "Showtime",
        "merchant": "fake org"
        "quantity": "1",
        "totalPrice": "6000000"
      }
    ]
  }
}

HTTP request

POST https://billpaynotification.googleapis.com/secure-serving/gsp/v1/getOrderDetails

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "paymentIntegratorAccountId": string,
  "orderLookupCriteria": {
    object (OrderLookupCriteria)
  },
  "requestOriginator": {
    object (RequestOriginator)
  }
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

paymentIntegratorAccountId

string

REQUIRED: The payment integrator account identifier that identifies the caller and associated contractual constraints for this interaction.

orderLookupCriteria

object (OrderLookupCriteria)

REQUIRED: Criteria indicating the order that is to be looked up.

requestOriginator

object (RequestOriginator)

OPTIONAL: Information about the organization or organizational sub-group that originated this request (if the integrator is calling us on behalf of another organization).

Response body

If successful, the response body contains data with the following structure:

Response payload for the getOrderDetails method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": enum (GetOrderDetailsResultCode),
  "order": {
    object (Order)
  }
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

enum (GetOrderDetailsResultCode)

REQUIRED: Result of this call.

order

object (Order)

OPTIONAL: Information regarding the order on which the payment was made. (Present if and only if result is SUCCESS.)

RequestHeader

Header object that is defined on all requests sent to the server.

JSON representation
{
  "requestId": string,
  "requestTimestamp": string,
  "userLocale": string,
  "protocolVersion": {
    object (Version)
  }
}
Fields
requestId

string

REQUIRED: Unique identifier of this request.

This is a string that has a max length of 100 characters, and contains only the characters "a-z", "A-Z", "0-9", ":", "-", and "_".

requestTimestamp

string (int64 format)

REQUIRED: Timestamp of this request represented as milliseconds since epoch. The receiver should verify that this timestamp is ± 60s of 'now'. This request timestamp is not idempotent upon retries.

userLocale
(deprecated)

string

OPTIONAL: A two- or three-letter ISO 639-2 Alpha 3 language code optionally followed by a hyphen and an ISO 3166-1 Alpha-2 country code, e.g.'pt', 'pt-BR', 'fil', or 'fil-PH'. Use this to help drive the user_message fields in the response.

protocolVersion

object (Version)

REQUIRED: The version of this request.

Version

Version object which is a structured form of the classic a.b.c version structure. Major versions of the same number are guaranteed to be compatible. Note that minor and revisions can change frequently and without notice. The integrator must support all requests for the same major version.

JSON representation
{
  "major": integer,
  "minor": integer,
  "revision": integer
}
Fields
major

integer

REQUIRED: Major version. This is marked for compatibility requests with different versions are not guaranteed to be compatible.

minor

integer

REQUIRED: Minor version. This denotes significant bug fixes.

revision

integer

REQUIRED: Minor version. This denotes minor bug fixes.

OrderLookupCriteria

Order lookup criteria.

JSON representation
{

  // Union field criteria can be only one of the following:
  "dcb3CorrelationId": string,
  "arnCriteria": {
    object (ArnCriteria)
  },
  "googleTransactionReferenceNumberCriteria": {
    object (GoogleTransactionReferenceNumberCriteria)
  }
  // End of list of possible types for union field criteria.
}
Fields

Union field criteria.

criteria can be only one of the following:

dcb3CorrelationId

string

Lookup based on the Google-generated DCB correlation ID that uniquely identifies the payment. This value was generated by Google and sent to the carrier billing payment integrator during the Auth call.

arnCriteria

object (ArnCriteria)

Lookup based on Acquirer Reference Number (ARN).

googleTransactionReferenceNumberCriteria

object (GoogleTransactionReferenceNumberCriteria)

Lookup based on the Google Transaction Reference Number.

ArnCriteria

Payment lookup criteria based on Acquirer Reference Number (ARN).

JSON representation
{
  "acquirerReferenceNumber": string,
  "authorizationCode": string
}
Fields
acquirerReferenceNumber

string

REQUIRED: The Acquirer Reference Number (ARN) that uniquely identifies the payment. Must be 23 digits long.

authorizationCode

string

REQUIRED: The Authorization Code for the transaction.

GoogleTransactionReferenceNumberCriteria

Payment lookup criteria based on the Google-generated Transaction Reference Number.

JSON representation
{
  "googleTransactionReferenceNumber": string,
  "authorizationCode": string
}
Fields
googleTransactionReferenceNumber

string

REQUIRED: The Google-generated Transaction Reference Number that uniquely identifies the payment.

authorizationCode

string

REQUIRED: The Authorization Code for the transaction.

RequestOriginator

Information about the organization or organizational sub-group from which this request originated. This allows Google to identify issues or abuse and implement controls at a finer-grained level than the paymentIntegratorAccountId. It is especially valuable when the caller is an intermediary service provider that sources requests from multiple external clients.

JSON representation
{
  "organizationId": string,
  "organizationDescription": string
}
Fields
organizationId

string

REQUIRED: An identifier of the company, organization, or organizational group from which this request originated. Must be unique within this paymentIntegratorAccountId.

organizationDescription

string

REQUIRED: A human-readable name or description of the organization that can be used to ease communication between employees of Google and the integrator regarding that organization.

ResponseHeader

Header object that is defined on all responses sent from the server.

JSON representation
{
  "responseTimestamp": string
}
Fields
responseTimestamp

string (int64 format)

REQUIRED: Timestamp of this response represented as milliseconds since epoch. The receiver should verify that this timestamp is ± 60s of 'now'.

GetOrderDetailsResultCode

The result of the getOrderDetails method call.

Enums
GET_ORDER_DETAILS_RESULT_CODE_UNKNOWN Do not ever set this default value!
SUCCESS The order was found and returned.
ORDER_CANNOT_BE_RETURNED

The requested order that exists, but cannot be returned. Reasons include cases where the order was removed at the request of its owner.

PAYMENT_TOO_OLD The requested payment was found, but an order details was not provided due to the age of the payment.
PAYMENT_NOT_FOUND The requested payment was not found.
NO_ADDITIONAL_DETAILS The requested payment was found, but order details are not available.

Order

Information about the order.

JSON representation
{
  "timestamp": string,
  "orderId": string,
  "currencyCode": string,
  "subTotalAmount": string,
  "totalAmount": string,
  "items": [
    {
      object (Item)
    }
  ],
  "taxes": [
    {
      object (Tax)
    }
  ]
}
Fields
timestamp

string (int64 format)

OPTIONAL: Timestamp of when the order was made, represented as milliseconds since epoch. Not available for all order types.

orderId

string

OPTIONAL: A string uniquely identifying this order. Not available for all order types.

currencyCode

string

OPTIONAL: ISO 4217 3-letter currency code for all amounts in this order. Not available for all order types.

subTotalAmount

string (Int64Value format)

OPTIONAL: Total amount of this order before tax, represented as micros of the currency specified in order.currencyCode. This is equal to SUM(items.totalPrice). Not available for all order types.

totalAmount

string (Int64Value format)

OPTIONAL: Total amount of this order including tax, represented as micros of the currency specified in order.currencyCode. This is equal to subTotalAmount + SUM(taxes.amount). Not available for all order types.

items[]

object (Item)

REQUIRED: List of items that were part of this order.

taxes[]

object (Tax)

OPTIONAL: List of taxes that were part of this order.

Item

Information about an item in the order.

JSON representation
{
  "description": string,
  "merchant": string,
  "quantity": string,
  "totalPrice": string,
  "googleProductName": string
}
Fields
description

string

OPTIONAL: A description of the item that was purchased. Not available for all order types.

merchant

string

REQUIRED: The seller, artist, or maker of the item.

quantity

string (Int64Value format)

OPTIONAL: The quantity that were ordered of this item.

This field will be omitted if integer quantities are not applicable to the product (metered products may have fractional quantities for example).

totalPrice

string (Int64Value format)

OPTIONAL: The total price of this item, represented as micros of the currency specified in order.currencyCode. If quantity is populated, this reflects the total price of the entire quantity. Not available for all order types.

googleProductName

string

REQUIRED: Name of Google product service for the item.

Tax

Information about a tax that applies to this order.

JSON representation
{
  "description": string,
  "amount": string
}
Fields
description

string

REQUIRED: A description of the tax.

amount

string (Int64Value format)

REQUIRED: The amount of the tax, represented as micros of the currency specified in order.currencyCode.