Method: remittanceStatementDetailsWithAggregateFees

Returns transaction detail information about a remittance statement with aggregated fees.

This is a paginated API. The number of transaction events per page can be specified with numberOfEvents. If unspecified, the maximum of 1000 events will be returned per page. Each request to this API will return a nextEventOffset pointing to the next transaction event in the statement, as well as totalEvents specifying the total number of transactions in the statement. If the current retrieved page contains the last transactions of the statement, nextEventOffset will not be present in the response.

The statementId value is the requestId from the remittanceStatementNotificationRequest

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": 0,
      "revision": 0
    },
    "requestId": "statement_detail_request_139932019",
    "requestTimestamp": "1502551332087"
  },
  "paymentIntegratorAccountId": "InvisiCashUSA_USD",
  "statementId": "0123434-statement-abc",
  "numberOfEvents": 4
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": "1481900013178"
  },
  "remittanceStatementSummary": {
    "statementDate": "1502521200000",
    "billingPeriod": {
      "startDate": "1502434800000",
      "endDate": "1502434800000"
    },
    "dateDue": "1502348400000",
    "currencyCode": "INR",
    "totalDueByIntegrator": "1076000000",
    "remittanceInstructions": {
      "memoLineId": "stmt-1AB-pp0-invisi"
    }
  },
  "aggregateFees": {
    "appFee": "10000000",
    "contentFee": "20000000",
    "appSubscriptionFee": "30000000",
    "specialAppFee": "40000000",
    "unknownFee": "0"
  },
  "events": {
    "eventOffset": 0,
    "nextEventOffset": 4,
    "totalEvents": 15,
    "captureEvents": [
      {
        "eventRequestId": "bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ",
        "paymentIntegratorEventId": "ioj32SOIjf23oijSDfoij",
        "eventCharge": "700000000"
      },
      {
        "eventRequestId": "Ggghvh78200PQ3Yrpb",
        "paymentIntegratorEventId": "iasdf23dSdfijSDfoij",
        "eventCharge": "800000000"
      }
    ],
    "refundEvents": [
      {
        "eventRequestId": "liUrreQY233839dfFFb24gaQM",
        "paymentIntegratorEventId": "asd3SDf3f3oijSDfoij",
        "eventCharge": "-200000000"
      },
      {
        "eventRequestId": "IIghhhUrreQY233839II9qM==",
        "paymentIntegratorEventId": "DFjidoso12FSDFSDE",
        "eventCharge": "-150000000"
      }
    ]
  }
}

HTTP request

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

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "paymentIntegratorAccountId": string,
  "statementId": string,
  "eventOffset": integer,
  "numberOfEvents": integer
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

paymentIntegratorAccountId

string

REQUIRED: This is the payment integrator account identifier that identifies contractual constraints around this statement.

statementId

string

REQUIRED: Request ID of the statement notification.

eventOffset

integer

OPTIONAL: Return events starting at this offset. This should be set to the nextEventOffset if one was returned or left unspecified if this is the first request. If eventOffset is zero, events will be returned starting with the first event. If this is two, events will be returned starting with the third event. If unspecified, eventOffset will be assumed to be zero.

numberOfEvents

integer

OPTIONAL: Number of events to show per page. If unspecified or greater than 1000, this will be 1000.

Response body

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

Response object for the remittance statement details with aggregate fees method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "remittanceStatementSummary": {
    object (RemittanceStatementSummary)
  },
  "aggregateFees": {
    object (AggregateFees)
  },
  "events": {
    object (EventList)
  }
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

remittanceStatementSummary

object (RemittanceStatementSummary)

REQUIRED: Summary of this remittance statement.

aggregateFees

object (AggregateFees)

REQUIRED: All aggregate fees for this remittance statement.

events

object (EventList)

REQUIRED: Batch of events from this remittance statement.

AggregateFees

The total fee of the remittance statement for each category.

JSON representation
{
  "appFee": string,
  "contentFee": string,
  "appSubscriptionFee": string,
  "specialAppFee": string,
  "unknownFee": string
}
Fields
appFee

string (Int64Value format)

REQUIRED: The total fee in currency code defined by the statement for transactions surrounding apps.

This value is in micros.

contentFee

string (Int64Value format)

REQUIRED: The total fee in currency code defined by the statement for transactions surrounding content (e.g. books, music, etc.).

This value is in micros.

appSubscriptionFee

string (Int64Value format)

REQUIRED: The total fee in currency code defined by the statement for transactions surrounding app subscriptions.

This value is in micros.

specialAppFee

string (Int64Value format)

REQUIRED: The total fee in currency code defined by the statement for transactions surrounding apps or app subscriptions that do not fit in the regular app and app subscription fees.

This value is in micros.

unknownFee

string (Int64Value format)

REQUIRED: The total fee in currency code defined by the statement for transactions that do not fit in one of the other fee categories.

This value is in micros.

EventList

List of events that are from a single remittance statement.

JSON representation
{
  "eventOffset": integer,
  "nextEventOffset": integer,
  "totalEvents": integer,
  "captureEvents": [
    {
      object (Event)
    }
  ],
  "refundEvents": [
    {
      object (Event)
    }
  ],
  "reverseRefundEvents": [
    {
      object (Event)
    }
  ],
  "chargebackEvents": [
    {
      object (Event)
    }
  ],
  "reverseChargebackEvents": [
    {
      object (Event)
    }
  ]
}
Fields
eventOffset

integer

REQUIRED: The event offset within the remittance statement of this response.

nextEventOffset

integer

OPTIONAL: The offset of the next event to return. If unspecified there are no more events to retrieve for this statement.

totalEvents

integer

REQUIRED: Total number of events in this statement.

captureEvents[]

object (Event)

REQUIRED: Set of capture events.

refundEvents[]

object (Event)

REQUIRED: Set of refund events.

reverseRefundEvents[]

object (Event)

OPTIONAL: Set of reverse refund events.

chargebackEvents[]

object (Event)

OPTIONAL: Set of chargeback events.

reverseChargebackEvents[]

object (Event)

OPTIONAL: Set of reverse chargeback events.

Event

Structure representing a single event included in a remittance statement.

JSON representation
{
  "eventRequestId": string,
  "paymentIntegratorEventId": string,
  "eventCharge": string,
  "presentmentChargeAmount": string,
  "presentmentCurrencyCode": string,
  "exchangeRate": string
}
Fields
eventRequestId

string

REQUIRED: Capture or Refund requestId.

paymentIntegratorEventId

string

OPTIONAL: ID the payment integrator returned for this event. For a capture this is the paymentIntegratorTransactionId from the response to a capture call, for a refund this is the paymentIntegratorRefundId from the response to a refund call

eventCharge

string (Int64Value format)

REQUIRED: In currency code defined by the statement. If this value is negative then this represents monetary value moving from Google to the payment integrator. If this is positive it is money from the payment integrator due to Google.

For example, capture transactions will always be positive, and refund transactions will always be negative.

This value is in micros.

presentmentChargeAmount

string (Int64Value format)

OPTIONAL: Transaction amount in the presentment (aka transaction) currency prior to foreign exchange. This field follows the same sign convention as the eventCharge field.

This value is in micros.

presentmentCurrencyCode

string

OPTIONAL: ISO 4217 3-letter currency code denominating the presentment (transaction) currency.

exchangeRate

string (Int64Value format)

OPTIONAL: The exchange rate used in converting the presentment amount to the settlement (invoice) amount.

This value is in micro basis points (1 basis point = .0001 = .01%). That is, to get the exchange rate, divide this field by 10^10.