{
  "swagger": "2.0",
  "info": {
    "title": "Google Standard Payments Google Hosted Refundable One Time Payment Codes API",
    "description": "This includes services hosted by Google for Refundable One Time Payment Codes.",
    "version": "v2"
  },
  "host": "vgw.googleapis.com",
  "basePath": "/gsp",
  "schemes": ["https"],
  "paths": {
    "/refundable-one-time-payment-code-v2/echo": {
      "post": {
        "tags": ["vgw"],
        "operationId": "Echo",
        "description": "Echos back a string sent from the client. If the echo is successful, the endpoint will return an HTTP 200 and the response will be of type `EchoResponse`. 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` 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` 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`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 2 }, \"requestId\": \"G1MQ0YERJ0Q7LPM\", \"requestTimestamp\": { \"epochMillis\": \"1481899949606\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\" }, \"clientMessage\": \"Client echo message\" } An example success response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\":\"1481899950236\" } }, \"clientMessage\": \"Client echo message\", \"serverMessage\": \"Debug ID 12345\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/EchoRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/EchoResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v2/remittanceStatementDetails": {
      "post": {
        "tags": ["vgw"],
        "operationId": "RemittanceStatementDetails",
        "description": "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` 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` 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` 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`. 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\" } ] } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/RemittanceStatementDetailsRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/RemittanceStatementDetailsResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v2/acceptRemittanceStatement": {
      "post": {
        "tags": ["vgw"],
        "operationId": "AcceptRemittanceStatement",
        "description": "Tells Google that the statement indicated in this request will be paid. 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` 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` 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`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 2 }, \"requestId\": \"0123434-abc\", \"requestTimestamp\": { \"epochMillis\": \"1616976000000\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\" }, \"statementId\": \"0123434-statement-abc\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\": \"1616976000000\" } }, \"result\": { \"success\": {} } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/AcceptRemittanceStatementRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/AcceptRemittanceStatementResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v2/refundResultNotification": {
      "post": {
        "tags": ["vgw"],
        "operationId": "RefundResultNotification",
        "description": "Notify Google of the result of a refund after a `refund` method call has been made. Refunds should be handled synchronously during the `refund` method call, but this method provides Google with a fast backup signal in case the synchronous call fails after it has performed the action but before it can return a result. This avoids the delay introduced by Google scheduling a retry for a future time. The `refundResult` value is idempotent for this `refundRequestId`, so it's value can not be changed by a subsequent call to this method. 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` 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` 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`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 2 }, \"requestId\": \"HsKv5pvtQKTtz7rdcw1YqE\", \"requestTimestamp\": { \"epochMillis\": \"1481852928293\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\" }, \"refundRequestId\": \"hH1T32PI86CpKwjuf6oD2r\", \"result\": { \"success\": {} } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\": \"1481855928376\" } }, \"result\": { \"success\": {} } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/RefundResultNotificationRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/RefundResultNotificationResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v2/referenceNumberPaidNotification": {
      "post": {
        "tags": ["vgw"],
        "operationId": "ReferenceNumberPaidNotification",
        "description": "Notify Google that a customer completed payment of a reference number. It is expected that this will be called within milliseconds of the user paying. While this call can be enqueued if the network is down, Google expects the user will typically receive notification that their payment has been paid by the time they are leaving the store. 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` 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` 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`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 2 }, \"requestId\": \"cmVxdWVzdDE\", \"requestTimestamp\": { \"epochMillis\": \"1481899949606\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\" }, \"paymentIntegratorTransactionId\": \"abc-e34-21343\", \"generateReferenceNumberRequestId\": \"aW50ZWdyYXRvciB0cmFuc2FjdGlvbiBpZA\", \"paymentTimestamp\": { \"epochMillis\": \"1481855969203\" } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\": \"1481907920760\" } }, \"result\": { \"success\": {} } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/ReferenceNumberPaidNotificationRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ReferenceNumberPaidNotificationResponse"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "EchoRequest": {
      "description": "Request object for the echo method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "clientMessage": {
          "description": "**REQUIRED**: Message to echo in the response.",
          "type": "string"
        }
      }
    },
    "RequestHeader": {
      "description": "Header object that is defined on all requests sent to the server.",
      "type": "object",
      "properties": {
        "requestId": {
          "description": "**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 \"_\".",
          "type": "string"
        },
        "requestTimestamp": {
          "description": "**REQUIRED**: Timestamp of this request. The receiver must verify that this timestamp is \u00B1 60s of 'now', and reject the request if it is not. This request timestamp is not idempotent upon retries.",
          "$ref": "#/definitions/Timestamp"
        },
        "protocolVersion": {
          "description": "**REQUIRED**: The version of this request.",
          "$ref": "#/definitions/Version"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: Identifies a unique account with contractual constraints.",
          "type": "string"
        }
      }
    },
    "Timestamp": {
      "description": "A timestamp object representing a point on the ISO timeline in milliseconds since the Unix epoch.",
      "type": "object",
      "properties": {
        "epochMillis": {
          "description": "**REQUIRED**: Milliseconds since the Unix epoch",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "Version": {
      "description": "Version object contains the major version of the API. Versions of the same major version are guaranteed to be compatible. The integrator must support all requests for the same major version.",
      "type": "object",
      "properties": {
        "major": {
          "description": "**REQUIRED**: Major version. This is marked for compatibility requests with different versions are not guaranteed to be compatible.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "EchoResponse": {
      "description": "Response object for the echo method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "clientMessage": {
          "description": "**REQUIRED**: Message received in the request.",
          "type": "string"
        },
        "serverMessage": {
          "description": "**OPTIONAL**: Server message, independent of the `clientMessage` being echoed.",
          "type": "string"
        }
      }
    },
    "ResponseHeader": {
      "description": "Header object that is defined on all responses sent from the server.",
      "type": "object",
      "properties": {
        "responseTimestamp": {
          "description": "**REQUIRED**: Timestamp of this response. The receiver must verify that this timestamp is \u00B1 60s of 'now', and reject the response if it is not.",
          "$ref": "#/definitions/Timestamp"
        }
      }
    },
    "ErrorResponse": {
      "description": "Error Response object for all methods.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "errorDescription": {
          "description": "**OPTIONAL**: Provide a description of this status for support reps to debug errors. Note that this is never shown to users. It can contain descriptive, non-sensitive text used for debugging. Note that some values for errorResponseCode should be accompanied by additional detail in this field. Warning: Do not include any tokens in this message unless they are defined as public.",
          "type": "string"
        },
        "paymentIntegratorErrorIdentifier": {
          "description": "**OPTIONAL**: This identifier is specific to the integrator and is generated by the integrator. It is used for debugging purposes only in order to identify this call. This is the identifier that the integrator knows this call by.",
          "type": "string"
        },
        "errorResponseResult": {
          "description": "**OPTIONAL**: A code that captures the type of error that occurred.",
          "$ref": "#/definitions/ErrorResponseErrorResponseResult"
        }
      }
    },
    "ErrorResponseErrorResponseResult": {
      "description": "Error Codes",
      "type": "object",
      "properties": {
        "invalidApiVersion": {
          "description": "Used if the request's API version is unsupported. Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponseInvalidApiVersion"
        },
        "invalidPayloadSignature": {
          "description": "Used if the signature of the payload is to an unknown or inactive key. Advised HTTP Code: 401",
          "$ref": "#/definitions/ErrorResponseInvalidPayloadSignature"
        },
        "invalidPayloadEncryption": {
          "description": "Used if the encryption of the payload is to an unknown or inactive key. Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponseInvalidPayloadEncryption"
        },
        "requestTimestampOutOfRange": {
          "description": "Used if the request_timestamp is not \u00B1 60s of now. Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponseRequestTimestampOutOfRange"
        },
        "invalidIdentifier": {
          "description": "Used if an identifier sent in the request was invalid or unknown. This may include PIAID, captureRequestId, Google Payment Token, etc. Advised HTTP Code: 404",
          "$ref": "#/definitions/ErrorResponseInvalidIdentifier"
        },
        "idempotencyViolation": {
          "description": "Used if the request violates the idempotency requirements for the request. Advised HTTP Code: 412",
          "$ref": "#/definitions/ErrorResponseIdempotencyViolation"
        },
        "invalidFieldValue": {
          "description": "Used if the request contains a value for a field that isn't in the set of supported values. Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponseInvalidFieldValue"
        },
        "missingRequiredField": {
          "description": "Used if a field that is required is unset in the request. Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponseMissingRequiredField"
        },
        "preconditionViolation": {
          "description": "Used if a constraint on the operation is violated (e.g. when a request for a refund amount exceeds the amount remaining on the transaction). Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponsePreconditionViolation"
        },
        "userActionInProgress": {
          "description": "Used if the request cannot be processed at this time because it would interrupt an in-process user action which effectively acts as a system lock. This code must *not* be used to indicate failures due to implementation-specific internal concurrency errors. Advised HTTP Code: 423",
          "$ref": "#/definitions/ErrorResponseUserActionInProgress"
        },
        "invalidDecryptedRequest": {
          "description": "Used if the request payload could be decrypted, but the resulting message could not be parsed. Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponseInvalidDecryptedRequest"
        },
        "forbidden": {
          "description": "Access to the requested resource is forbidden. Advised Http Code: 403",
          "$ref": "#/definitions/ErrorResponseForbidden"
        }
      }
    },
    "ErrorResponseInvalidApiVersion": {
      "description": "Used if the request's API version is unsupported.",
      "type": "object",
      "properties": {
        "requestVersion": {
          "description": "**REQUIRED**: The invalid version that was specified on the request.",
          "$ref": "#/definitions/Version"
        },
        "expectedVersion": {
          "description": "**REQUIRED**: The expected version.",
          "$ref": "#/definitions/Version"
        }
      }
    },
    "ErrorResponseInvalidPayloadSignature": {
      "description": "This message is intentionally empty right now. New fields could be added in the future.",
      "type": "object",
      "properties": {
      }
    },
    "ErrorResponseInvalidPayloadEncryption": {
      "description": "This message is intentionally empty right now. New fields could be added in the future.",
      "type": "object",
      "properties": {
      }
    },
    "ErrorResponseRequestTimestampOutOfRange": {
      "description": "Used if the request_timestamp is not \u00B1 60s of now.",
      "type": "object",
      "properties": {
        "requestTimestamp": {
          "description": "**REQUIRED**: The timestamp provided in the request",
          "$ref": "#/definitions/Timestamp"
        },
        "serverTimestampAtReceipt": {
          "description": "**REQUIRED**: The server time at receipt, used for comparison",
          "$ref": "#/definitions/Timestamp"
        }
      }
    },
    "ErrorResponseInvalidIdentifier": {
      "description": "Used if an identifier sent in the request was invalid or unknown. This may include PIAID, captureRequestId, Google Payment Token, etc.",
      "type": "object",
      "properties": {
        "invalidIdentifierType": {
          "description": "**REQUIRED**: The type of identifier that was invalid, e.g. PIAID, captureRequestId, etc.",
          "type": "string"
        }
      }
    },
    "ErrorResponseIdempotencyViolation": {
      "description": "This message is intentionally empty right now. New fields could be added in the future.",
      "type": "object",
      "properties": {
      }
    },
    "ErrorResponseInvalidFieldValue": {
      "description": "Used if the request contains a value for a field that isn't in the set of supported values.",
      "type": "object",
      "properties": {
        "invalidFieldName": {
          "description": "**REQUIRED**: The name of the field that was found to be invalid.",
          "type": "string"
        }
      }
    },
    "ErrorResponseMissingRequiredField": {
      "description": "Used if a field that is required is unset in the request.",
      "type": "object",
      "properties": {
        "missingFieldNames": {
          "description": "**REQUIRED**: The names of the missing fields.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ErrorResponsePreconditionViolation": {
      "description": "This message is intentionally empty right now. New fields could be added in the future.",
      "type": "object",
      "properties": {
      }
    },
    "ErrorResponseUserActionInProgress": {
      "description": "This message is intentionally empty right now. New fields could be added in the future.",
      "type": "object",
      "properties": {
      }
    },
    "ErrorResponseInvalidDecryptedRequest": {
      "description": "This message is intentionally empty right now. New fields could be added in the future.",
      "type": "object",
      "properties": {
      }
    },
    "ErrorResponseForbidden": {
      "description": "This message is intentionally empty right now. New fields could be added in the future.",
      "type": "object",
      "properties": {
      }
    },
    "RemittanceStatementDetailsRequest": {
      "description": "Request object for the remittance statement detail method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "statementId": {
          "description": "**REQUIRED**: Request ID of the statement notification.",
          "type": "string"
        },
        "eventOffset": {
          "description": "**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:* If `eventOffset` exceeds the total number of events (i.e. `eventOffset` >= `totalEvents`) then no events will be returned. ",
          "type": "integer",
          "format": "int32"
        },
        "numberOfEvents": {
          "description": "**OPTIONAL**: Number of events to show per page. If unspecified or greater than 1000, this will be 1000.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "RemittanceStatementDetailsResponse": {
      "description": "Response object for the remittance statement detail method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "remittanceStatementSummary": {
          "description": "**REQUIRED**: Summary of this remittance statement.",
          "$ref": "#/definitions/RemittanceStatementSummary"
        },
        "eventOffset": {
          "description": "**REQUIRED**: The event offset of this response.",
          "type": "integer",
          "format": "int32"
        },
        "nextEventOffset": {
          "description": "**OPTIONAL**: The offset of the next event to return. If unspecified there are no more events to retrieve for this statement.",
          "type": "integer",
          "format": "int32"
        },
        "totalWithholdingTaxes": {
          "description": "**REQUIRED**: The sum of all taxes withheld for this statement.",
          "$ref": "#/definitions/Amount"
        },
        "captureEvents": {
          "description": "**REQUIRED**: Set of capture events. *Note:* this is a set, it has no defined order. ",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RemittanceStatementDetailsResponseEvent"
          }
        },
        "refundEvents": {
          "description": "**REQUIRED**: Set of refund events. *Note:* this is a set, it has no defined order. ",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RemittanceStatementDetailsResponseEvent"
          }
        },
        "reverseRefundEvents": {
          "description": "**OPTIONAL**: Set of reverse refund events. *Note:* this is a set, it has no defined order. ",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RemittanceStatementDetailsResponseEvent"
          }
        },
        "chargebackEvents": {
          "description": "**OPTIONAL**: Set of chargeback events. *Note:* this is a set, it has no defined order. ",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RemittanceStatementDetailsResponseEvent"
          }
        },
        "reverseChargebackEvents": {
          "description": "**OPTIONAL**: Set of reverse chargeback events. *Note:* this is a set, it has no defined order. ",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RemittanceStatementDetailsResponseEvent"
          }
        },
        "adjustmentEvents": {
          "description": "**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. *Note:* this is a set, it has no defined order. ",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RemittanceStatementDetailsResponseEvent"
          }
        }
      }
    },
    "RemittanceStatementSummary": {
      "description": "Summary object about a remittance statement.",
      "type": "object",
      "properties": {
        "statementDate": {
          "description": "**REQUIRED**: Date (in America\/Los Angeles) that this statement was created.",
          "$ref": "#/definitions/Timestamp"
        },
        "billingPeriod": {
          "description": "**REQUIRED**: The billing period this statement covers.",
          "$ref": "#/definitions/BillingPeriod"
        },
        "dateDue": {
          "description": "**OPTIONAL**: The date that the remittance is due. This is represented as a Timestamp. It is a date (and therefore will always start at the first millisecond of the day in the billing timezone). This is set as long as the `totalDueByIntegrator` is greater than 0.",
          "$ref": "#/definitions/Timestamp"
        },
        "totalDueByIntegrator": {
          "description": "**REQUIRED**: This value is always positive.",
          "$ref": "#/definitions/Amount"
        },
        "totalEvents": {
          "description": "**REQUIRED**: Total number of events in this statement.",
          "type": "integer",
          "format": "int32"
        },
        "totalProcessedAmount": {
          "description": "**TO_BE_REQUIRED**: This value is the sum of all the event charges in this statement.",
          "$ref": "#/definitions/Amount"
        },
        "totalDirectTaxAmount": {
          "description": "**OPTIONAL**: This value is the sum of all direct taxes applied to all events in this statement. This value is populated for integrators on a contractual basis.",
          "$ref": "#/definitions/Amount"
        },
        "totalFeesAmount": {
          "description": "**TO_BE_REQUIRED**: This value is the sum of all fees applied for all events in this statement.",
          "$ref": "#/definitions/Amount"
        },
        "totalWithholdingTaxAmount": {
          "description": "**OPTIONAL**: This value is the total withholding tax applied for this statement. This value is populated for integrators on a contractual basis.",
          "$ref": "#/definitions/Amount"
        },
        "totalPresentmentAmounts": {
          "description": "**REQUIRED**: These are the total amounts presented to the customer. There will be one entry for each presentment currency.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Amount"
          }
        }
      }
    },
    "BillingPeriod": {
      "description": "Billing period of this statement.",
      "type": "object",
      "properties": {
        "startDate": {
          "description": "**REQUIRED**: The start date of the billing period. This is represented as a Timestamp. It is a date (and therefore will always start at the first millisecond of the day in the billing timezone). This is the first millisecond of the day of the billing period, 00:00:00.000",
          "$ref": "#/definitions/Timestamp"
        },
        "endDate": {
          "description": "**REQUIRED**: The end date of the billing period. This is represented as a Timestamp. This is the last millisecond of the last day of the billing period, 23:59:59.999",
          "$ref": "#/definitions/Timestamp"
        }
      }
    },
    "Amount": {
      "description": "Associates an amount in micros with a currency code.",
      "type": "object",
      "properties": {
        "amountMicros": {
          "description": "**REQUIRED**: An amount in [micros]({{glossary_path}}#micros \"What are micros?\").",
          "type": "string",
          "format": "int64"
        },
        "currencyCode": {
          "description": "**REQUIRED**: ISO 4217 3-letter currency code",
          "type": "string"
        }
      }
    },
    "RemittanceStatementDetailsResponseEvent": {
      "description": "Structure representing a single event included in a remittance statement.",
      "type": "object",
      "properties": {
        "eventRequestId": {
          "description": "**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.",
          "type": "string"
        },
        "eventCharge": {
          "description": "**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]({{glossary_path}}#micros \"What are micros?\").",
          "$ref": "#/definitions/Amount"
        },
        "eventFee": {
          "description": "**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]({{glossary_path}}#micros \"What are micros?\").",
          "$ref": "#/definitions/Amount"
        },
        "eventTax": {
          "description": "**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.",
          "$ref": "#/definitions/Amount"
        },
        "presentmentChargeAmount": {
          "description": "**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]({{glossary_path}}#micros \"What are micros?\"). *Note:* This will be required in version 1.1 ",
          "$ref": "#/definitions/Amount"
        },
        "nanoExchangeRate": {
          "description": "**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.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "AcceptRemittanceStatementRequest": {
      "description": "Request object for the `acceptRemittanceStatement` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "statementId": {
          "description": "**REQUIRED**: Request ID of the statement notification.",
          "type": "string"
        }
      }
    },
    "AcceptRemittanceStatementResponse": {
      "description": "Response object for the `acceptRemittanceStatement` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Result of the AcceptRemittanceStatement call.",
          "$ref": "#/definitions/AcceptRemittanceStatementResponseAcceptRemittanceStatementResult"
        }
      }
    },
    "AcceptRemittanceStatementResponseAcceptRemittanceStatementResult": {
      "description": "Result of this remittance acceptance.",
      "type": "object",
      "properties": {
        "success": {
          "description": "Remittance statement accepted successfully.",
          "$ref": "#/definitions/Empty"
        }
      }
    },
    "Empty": {
      "description": " This object is used for extensibility because booleans and enumerations often need to be extended with extra data. The implementer uses it to determine presence. The enumeration this represents may be extended to contain data in future versions. The JSON representation for `Empty` is empty JSON object `{}`.",
      "type": "object",
      "properties": {
      }
    },
    "RefundResultNotificationRequest": {
      "description": "Request object for the `refundResultNotification` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "refundRequestId": {
          "description": "**REQUIRED**: `requestId` of the `asynchronousRefund` call for this transaction.",
          "type": "string"
        },
        "result": {
          "description": "**REQUIRED**: Result of this refund.",
          "$ref": "#/definitions/RefundResultNotificationRequestRefundResult"
        }
      }
    },
    "RefundResultNotificationRequestRefundResult": {
      "description": "Result codes for refunds.",
      "type": "object",
      "properties": {
        "success": {
          "description": "Successful refund.",
          "$ref": "#/definitions/Empty"
        },
        "accountClosed": {
          "description": "The account held with the integrator has been closed. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again.",
          "$ref": "#/definitions/AccountClosed"
        },
        "accountClosedAccountTakenOver": {
          "description": "The user's account with the integrator has been closed, suspected account take over. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again.",
          "$ref": "#/definitions/AccountClosedAccountTakenOver"
        },
        "accountClosedFraud": {
          "description": "The user's account held with the integrator has been closed because of fraud. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again.",
          "$ref": "#/definitions/AccountClosedFraud"
        },
        "accountOnHold": {
          "description": "The user's account is currently on hold and cannot accept the refund, but the user's account may later be able to accept the refund. Google may request another refund in the future, but will do so with a new `requestId`, so this request should be considered finished.",
          "$ref": "#/definitions/AccountOnHold"
        },
        "refundExceedsMaximumBalance": {
          "description": "The refund cannot be processed at the current time, because doing so would cause the user's balance to exceed the maximum allowed amount. Google may request another refund in the future, but will do so with a new `requestId`, so this request should be considered finished.",
          "$ref": "#/definitions/RefundExceedsMaximumBalance"
        },
        "refundWindowExceeded": {
          "description": "The refund cannot be processed because the request is outside of the allowed refund period.",
          "$ref": "#/definitions/RefundWindowExceeded"
        }
      }
    },
    "AccountClosed": {
      "description": "The user's account held with the integrator has been closed.",
      "type": "object",
      "properties": {
        "rawResult": {
          "description": "**OPTIONAL**: Raw result of this event. Used to help inform Google's risk engine and analytics. In decline code\u2013mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the `scope` would be \"visa\" and the `rawCode` would be whatever the VISA network returned.",
          "$ref": "#/definitions/RawResult"
        }
      }
    },
    "RawResult": {
      "description": "Raw result object.",
      "type": "object",
      "properties": {
        "scope": {
          "description": "**OPTIONAL**: Scope of the raw_code, can be empty.",
          "type": "string"
        },
        "rawCode": {
          "description": "**REQUIRED**: Raw code from the integrator or subsystems within it.",
          "type": "string"
        }
      }
    },
    "AccountClosedAccountTakenOver": {
      "description": "The user's account with the integrator has been closed, suspected account take over.",
      "type": "object",
      "properties": {
        "rawResult": {
          "description": "**OPTIONAL**: Raw result of this event. Used to help inform Google's risk engine and analytics. In decline code\u2013mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the `scope` would be \"visa\" and the `rawCode` would be whatever the VISA network returned.",
          "$ref": "#/definitions/RawResult"
        }
      }
    },
    "AccountClosedFraud": {
      "description": "The user's account held with the integrator has been closed because of fraud.",
      "type": "object",
      "properties": {
        "rawResult": {
          "description": "**OPTIONAL**: Raw result of this event. Used to help inform Google's risk engine and analytics. In decline code\u2013mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the `scope` would be \"visa\" and the `rawCode` would be whatever the VISA network returned.",
          "$ref": "#/definitions/RawResult"
        }
      }
    },
    "AccountOnHold": {
      "description": "The account is on hold.",
      "type": "object",
      "properties": {
        "rawResult": {
          "description": "**OPTIONAL**: Raw result of this event. Used to help inform Google's risk engine and analytics. In decline code\u2013mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the `scope` would be \"visa\" and the `rawCode` would be whatever the VISA network returned.",
          "$ref": "#/definitions/RawResult"
        }
      }
    },
    "RefundExceedsMaximumBalance": {
      "description": "The refund cannot be processed at the current time, because doing so would cause the user's balance to exceed the maximum allowed amount. Google may request another refund in the future, but will do so with a new `requestId`, so this request should be considered finished.",
      "type": "object",
      "properties": {
        "rawResult": {
          "description": "**OPTIONAL**: Raw result of this event. Used to help inform Google's risk engine and analytics. In decline code\u2013mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the `scope` would be \"visa\" and the `rawCode` would be whatever the VISA network returned.",
          "$ref": "#/definitions/RawResult"
        }
      }
    },
    "RefundWindowExceeded": {
      "description": "The refund cannot be processed because the request is outside of the allowed refund period.",
      "type": "object",
      "properties": {
        "rawResult": {
          "description": "**OPTIONAL**: Raw result of this event. Used to help inform Google's risk engine and analytics. In decline code\u2013mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the `scope` would be \"visa\" and the `rawCode` would be whatever the VISA network returned.",
          "$ref": "#/definitions/RawResult"
        }
      }
    },
    "RefundResultNotificationResponse": {
      "description": "Response object for the `refundResultNotification` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Result of this call.",
          "$ref": "#/definitions/RefundResultNotificationResponseRefundResultNotificationResult"
        }
      }
    },
    "RefundResultNotificationResponseRefundResultNotificationResult": {
      "description": "Result messages for the `refundResultNotification` method.",
      "type": "object",
      "properties": {
        "success": {
          "description": "Refund result notification was successful.",
          "$ref": "#/definitions/Empty"
        }
      }
    },
    "ReferenceNumberPaidNotificationRequest": {
      "description": "Request object for the `referenceNumberPaidNotification` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorTransactionId": {
          "description": "**OPTIONAL**: This identifier is specific to the integrator and is generated by the integrator. This is the identifier by which the integrator knows this transaction. For convenience, this identifier is included when the payment integrator requests remittanceStatementDetails.",
          "type": "string"
        },
        "generateReferenceNumberRequestId": {
          "description": "**REQUIRED**: `requestId` of the `generateReferenceNumber` call for this transaction.",
          "type": "string"
        },
        "paymentTimestamp": {
          "description": "**REQUIRED**: Timestamp recorded by the integrator when the user paid this reference number.",
          "$ref": "#/definitions/Timestamp"
        }
      }
    },
    "ReferenceNumberPaidNotificationResponse": {
      "description": "Response object for the `referenceNumberPaidNotification` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Result of this `referenceNumberPaidNotification` call.",
          "$ref": "#/definitions/ReferenceNumberPaidNotificationResponseReferenceNumberPaidNotificationResult"
        },
        "googlePaymentTransactionId": {
          "description": "**OPTIONAL**: Populated if `result` is `SUCCESS`, otherwise not populated. A Google-generated identifier for this transaction that is included when the payment integrator requests `remittanceStatementDetails`.",
          "type": "string"
        }
      }
    },
    "ReferenceNumberPaidNotificationResponseReferenceNumberPaidNotificationResult": {
      "description": "Result of this `referenceNumberPaidNotification` call.",
      "type": "object",
      "properties": {
        "success": {
          "description": "The reference number was successfully recorded as paid.",
          "$ref": "#/definitions/Empty"
        },
        "invalidReferenceNumber": {
          "description": "The reference number was not found.",
          "$ref": "#/definitions/Empty"
        }
      }
    }
  }
}
