- HTTP request
- Request body
- Response body
- RequestHeader
- Version
- OrderLookupCriteria
- ArnCriteria
- GoogleTransactionReferenceNumberCriteria
- RequestOriginator
- ResponseHeader
- GetOrderDetailsResultCode
- Order
- Item
- Tax
Get an order that provides the basis to the Google partners for charging the end-users.
If the endpoint encounters an error while processing the request, the response from this endpoint will be of type
.ErrorResponse
Responses to this query may be empty if this method does not return an HTTP 200. The response body is empty in situations where an
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 an HTTP 404 with an empty body. If the request signature could be verified, additional information regarding the error will be returned in the response body.ErrorResponse
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",
"taxes": [],
"items": [
{
"description": "YouTube TV membership",
"merchant": "fake org",
"googleProductName": "YouTube TV",
"quantity": "1",
"totalPrice": "399000000"
},
{
"description": "Showtime",
"merchant": "fake org",
"googleProductName": "YouTube TV",
"quantity": "1",
"totalPrice": "6000000"
}
]
}
}
HTTP request
POST https://vgw.googleapis.com/secure-serving/gsp/v1/getOrderDetails/:PIAID
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "requestHeader": { object ( |
Fields | |
---|---|
requestHeader |
REQUIRED: Common header for all requests. |
paymentIntegratorAccountId |
REQUIRED: The payment integrator account identifier that identifies the caller and associated contractual constraints for this interaction. |
orderLookupCriteria |
REQUIRED: Criteria indicating the order that is to be looked up. |
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
Response payload for the getOrderDetails
method.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "responseHeader": { object ( |
Fields | |
---|---|
responseHeader |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Result of this call. |
order |
OPTIONAL: Information regarding the order on which the payment was made. (Present if and only if |
RequestHeader
Header object that is defined on all requests sent to the server.
JSON representation |
---|
{
"requestId": string,
"requestTimestamp": string,
"userLocale": string,
"protocolVersion": {
object ( |
Fields | |
---|---|
requestId |
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 |
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: 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 |
protocolVersion |
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 |
REQUIRED: Major version. This is marked for compatibility requests with different versions are not guaranteed to be compatible. |
minor |
REQUIRED: Minor version. This denotes significant bug fixes. |
revision |
REQUIRED: Minor version. This denotes minor bug fixes. |
OrderLookupCriteria
Order lookup criteria.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
dcb3CorrelationId |
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 |
Lookup based on Acquirer Reference Number (ARN). |
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 |
REQUIRED: The Acquirer Reference Number (ARN) that uniquely identifies the payment. Must be 23 digits long. |
authorizationCode |
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 |
REQUIRED: The Google-generated Transaction Reference Number that uniquely identifies the payment. |
authorizationCode |
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 |
REQUIRED: An identifier of the company, organization, or organizational group from which this request originated. Must be unique within this |
organizationDescription |
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 |
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 ( |
Fields | |
---|---|
timestamp |
OPTIONAL: Timestamp of when the order was made, represented as milliseconds since epoch. Not available for all order types. |
orderId |
OPTIONAL: A string uniquely identifying this order. Not available for all order types. |
currencyCode |
OPTIONAL: ISO 4217 3-letter currency code for all amounts in this order. Not available for all order types. |
subTotalAmount |
OPTIONAL: Total amount of this order before tax, represented as micros of the currency specified in |
totalAmount |
OPTIONAL: Total amount of this order including tax, represented as micros of the currency specified in |
items[] |
REQUIRED: List of items that were part of this order. |
taxes[] |
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 |
OPTIONAL: A description of the item that was purchased. Not available for all order types. |
merchant |
REQUIRED: The seller, artist, or maker of the item. |
quantity |
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 |
OPTIONAL: The total price of this item, represented as micros of the currency specified in |
googleProductName |
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 |
REQUIRED: A description of the tax. |
amount |
REQUIRED: The amount of the tax, represented as micros of the currency specified in |