- [HTTP request](https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#body.request_body)
  - [JSON representation](https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#body.response_body)
- [RemittanceStatementDetailsResponse](https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#RemittanceStatementDetailsResponse)
  - [JSON representation](https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#RemittanceStatementDetailsResponse.SCHEMA_REPRESENTATION)
- [Event](https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event)
  - [JSON representation](https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event.SCHEMA_REPRESENTATION)

Returns transaction detail information about a remittance statement.

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 request to [`remittanceStatementNotification`](https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/remittanceStatementNotification#google.standardpayments.flows.remittance.v2.PaymentIntegratorRemittanceService.RemittanceStatementNotification)

If the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type [`ErrorResponse`](https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/ErrorResponse) or contain a generic error (e.g. a message similar to "There was an error. Please try again later.").

The generic error is used in situations where an [`ErrorResponse`](https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/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 generic error. If the request signature could be verified, additional information regarding the error will be returned in an [`ErrorResponse`](https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/ErrorResponse).

An example request looks like:


    {
      "requestHeader": {
        "protocolVersion": {
          "major": 2
        },
        "requestId": "statement_detail_request_139932019",
        "requestTimestamp": {
          "epochMillis": "1616976000000"
        },
        "paymentIntegratorAccountId": "InvisiCashUSA_USD"
      },
      "statementId": "0123434-statement-abc",
      "numberOfEvents": 5
    }

An example response looks like:


    {
      "responseHeader": {
        "responseTimestamp": {
          "epochMillis": "1616976000000"
        }
      },
      "remittanceStatementSummary": {
        "statementDate": {
          "epochMillis": "1614556800000"
        },
        "billingPeriod": {
          "startDate": {
            "epochMillis": "1612137600000"
          },
          "endDate": {
            "epochMillis": "1614470400000"
          }
        },
        "dateDue": {
          "epochMillis": "1617235200000"
        },
        "totalDueByIntegrator": {
          "amountMicros": "1584000000",
          "currencyCode": "INR"
        },
        "totalProcessedAmount": {
          "amountMicros": "1669000000",
          "currencyCode": "INR"
        },
        "totalFeesAmount": {
          "amountMicros": "100000000",
          "currencyCode": "INR"
        },
        "totalDirectTaxAmount": {
          "amountMicros": "100000",
          "currencyCode": "INR"
        },
        "totalWithholdingTaxAmount": {
          "amountMicros": "-1000000",
          "currencyCode": "INR"
        },
        "totalPresentmentAmounts": [
          {
            "amountMicros": "1669000000",
            "currencyCode": "INR"
          }
        ],
        "totalEvents": 15
      },
      "eventOffset": 0,
      "nextEventOffset": 5,
      "totalWithholdingTaxes": {
        "amountMicros": "0",
        "currencyCode": "INR"
      },
      "captureEvents": [
        {
          "eventRequestId": "bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ",
          "eventCharge": {
            "amountMicros": "700000000",
            "currencyCode": "INR"
          },
          "eventFee": {
            "amountMicros": "-28000000",
            "currencyCode": "INR"
          },
          "eventTax": {
            "amountMicros": "35000000",
            "currencyCode": "INR"
          },
          "presentmentChargeAmount": {
            "amountMicros": "700000000",
            "currencyCode": "INR"
          },
          "nanoExchangeRate": "10000000000000"
        },
        {
          "eventRequestId": "Ggghvh78200PQ3Yrpb",
          "eventCharge": {
            "amountMicros": "800000000",
            "currencyCode": "INR"
          },
          "eventFee": {
            "amountMicros": "-32000000",
            "currencyCode": "INR"
          },
          "eventTax": {
            "amountMicros": "40000000",
            "currencyCode": "INR"
          },
          "presentmentChargeAmount": {
            "amountMicros": "800000000",
            "currencyCode": "INR"
          },
          "nanoExchangeRate": "10000000000000"
        },
        {
          "eventRequestId": "bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ",
          "eventCharge": {
            "amountMicros": "500000000",
            "currencyCode": "INR"
          },
          "eventFee": {
            "amountMicros": "-20000000",
            "currencyCode": "INR"
          },
          "eventTax": {
            "amountMicros": "25000000",
            "currencyCode": "INR"
          },
          "presentmentChargeAmount": {
            "amountMicros": "500000000",
            "currencyCode": "INR"
          },
          "nanoExchangeRate": "10000000000000"
        }
      ],
      "refundEvents": [
        {
          "eventRequestId": "liUrreQY233839dfFFb24gaQM",
          "eventCharge": {
            "amountMicros": "-200000000",
            "currencyCode": "INR"
          },
          "eventFee": {
            "amountMicros": "8000000",
            "currencyCode": "INR"
          },
          "eventTax": {
            "amountMicros": "-10000000",
            "currencyCode": "INR"
          },
          "presentmentChargeAmount": {
            "amountMicros": "-200000000",
            "currencyCode": "INR"
          },
          "nanoExchangeRate": "10000000000000"
        },
        {
          "eventRequestId": "IIghhhUrreQY233839II9qM==",
          "eventCharge": {
            "amountMicros": "-150000000",
            "currencyCode": "INR"
          },
          "eventFee": {
            "amountMicros": "6000000",
            "currencyCode": "INR"
          },
          "eventTax": {
            "amountMicros": "-7500000",
            "currencyCode": "INR"
          },
          "presentmentChargeAmount": {
            "amountMicros": "-150000000",
            "currencyCode": "INR"
          },
          "nanoExchangeRate": "10000000000000"
        }
      ]
    }

### HTTP request

`POST https://vgw.googleapis.com/gsp/refundable-one-time-payment-code-v2/remittanceStatementDetails/https://developers.google.com/pay/refundable-one-time-payment-code-v2/reference/glossary#payment_integrator_account_id`

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "requestHeader": { object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/RequestHeader) }, "statementId": string, "eventOffset": integer, "numberOfEvents": integer } ``` |

| Fields ||
|---|---|
| `requestHeader` | `object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/RequestHeader)` **REQUIRED**: Common header for all requests. |
| `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. > [!NOTE] > **Note:** If `eventOffset` exceeds the total number of events (i.e. `eventOffset` \>= `totalEvents`) then no events will be returned. <br /> |
| `numberOfEvents` | `integer` **OPTIONAL**: Number of events to show per page. If unspecified or greater than 1000, this will be 1000. |

### Response body

This method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an `ErrorResponse`, consult the `ErrorResponse` object and [HTTP status codes documentation](https://developers.google.com/pay/refundable-one-time-payment-code-v2/guides/connectivity/protocol-standards#http_status_codes).

| Possible response messages ||
|---|---|
| HTTP 200 Status | ``object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#RemittanceStatementDetailsResponse`)`` |
| HTTP 4XX / 5XX Status | `object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/ErrorResponse)` |
| End of mutually exclusive fields. ||

## RemittanceStatementDetailsResponse

Response object for the remittance statement detail method.

| JSON representation |
|---|
| ``` { "responseHeader": { object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/ResponseHeader) }, "remittanceStatementSummary": { object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/remittanceStatementNotification#RemittanceStatementSummary) }, "eventOffset": integer, "nextEventOffset": integer, "totalWithholdingTaxes": { object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/Amount) }, "captureEvents": [ { object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event`) } ], "refundEvents": [ { object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event`) } ], "reverseRefundEvents": [ { object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event`) } ], "chargebackEvents": [ { object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event`) } ], "reverseChargebackEvents": [ { object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event`) } ], "adjustmentEvents": [ { object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event`) } ] } ``` |

| Fields ||
|---|---|
| `responseHeader` | `object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/ResponseHeader)` **REQUIRED**: Common header for all responses. |
| `remittanceStatementSummary` | `object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/remittanceStatementNotification#RemittanceStatementSummary)` **REQUIRED**: Summary of this remittance statement. |
| `eventOffset` | `integer` **REQUIRED**: The event offset 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. |
| `totalWithholdingTaxes` | `object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/Amount)` **REQUIRED**: The sum of all taxes withheld for this statement. |
| `captureEvents[]` | ``object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event`)`` **REQUIRED**: Set of capture events. <br /> > [!NOTE] > **Note:** this is a set, it has no defined order. <br /> |
| `refundEvents[]` | ``object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event`)`` **REQUIRED**: Set of refund events. <br /> > [!NOTE] > **Note:** this is a set, it has no defined order. <br /> |
| `reverseRefundEvents[]` | ``object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event`)`` **OPTIONAL**: Set of reverse refund events. <br /> > [!NOTE] > **Note:** this is a set, it has no defined order. <br /> |
| `chargebackEvents[]` | ``object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event`)`` **OPTIONAL**: Set of chargeback events. <br /> > [!NOTE] > **Note:** this is a set, it has no defined order. <br /> |
| `reverseChargebackEvents[]` | ``object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event`)`` **OPTIONAL**: Set of reverse chargeback events. <br /> > [!NOTE] > **Note:** this is a set, it has no defined order. <br /> |
| `adjustmentEvents[]` | ``object (`https://developers.google.com/pay/refundable-one-time-payment-code-v2/google-refundable-one-time-payment-code-api/remittanceStatementDetails#Event`)`` **OPTIONAL**: Set of adjustment events. Adjustment events may be added at Google's discretion to reconcile billing discrepancies, for example if fees were undercomputed for a set of prior transactions, an adjustment may be used to make the integrator whole. <br /> > [!NOTE] > **Note:** this is a set, it has no defined order. <br /> |

## Event

Structure representing a single event included in a remittance statement.

| JSON representation |
|---|
| ``` { "eventRequestId": string, "eventCharge": { object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/Amount) }, "eventFee": { object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/Amount) }, "eventTax": { object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/Amount) }, "presentmentChargeAmount": { object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/Amount) }, "nanoExchangeRate": string } ``` |

| Fields ||
|---|---|
| `eventRequestId` | `string` **REQUIRED** : For capture or refund events, this will be the `requestId` that Google sends with the request. For reverse refund, chargeback and reverse chargeback events, this will be the `requestId` that the Payment Integrator sends with the notification of that event. For adjustments, this will be a unique ID assigned by Google to the adjustment event. |
| `eventCharge` | `object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/Amount)` **REQUIRED**: 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. Reverse refund and reverse chargeback events will always be positive. Chargeback events will always be negative. This value is in [micros](https://developers.google.com/pay/refundable-one-time-payment-code-v2/reference/glossary#micros "What are micros?"). |
| `eventFee` | `object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/Amount)` **REQUIRED**: 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, if an agreement says that Google will pay 1% of the `transactionCharge` to the payment integrator, and will reverse that 1% upon refund of that transaction, then the capture fee will be negative and upon refund the refund fee will be positive. This value is in [micros](https://developers.google.com/pay/refundable-one-time-payment-code-v2/reference/glossary#micros "What are micros?"). |
| `eventTax` | `object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/Amount)` **REQUIRED**: 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. This value is the tax applied directly to this event, e.g. sales tax. |
| `presentmentChargeAmount` | `object (https://developers.google.com/pay/refundable-one-time-payment-code-v2/payment-integrator-refundable-one-time-payment-code-api/Amount)` **REQUIRED** : 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](https://developers.google.com/pay/refundable-one-time-payment-code-v2/reference/glossary#micros "What are micros?"). > [!NOTE] > **Note:** This will be required in version 1.1 <br /> |
| `nanoExchangeRate` | `string (https://developers.google.com/discovery/v1/type-format format)` **REQUIRED**: The exchange rate used in converting the presentment amount to the settlement (invoice) amount, expressed in nano basis points. This value is in *nano* basis points (1 basis point = .0001 = .01%). That is, to get the exchange rate, divide this field by 10\^13. |