{
  "swagger": "2.0",
  "info": {
    "title": "Google Standard Payments Google Hosted One Time Payment Codes API",
    "description": "This includes services hosted by Google for One Time Payment Codes.",
    "version": "v1"
  },
  "host": "vgw.googleapis.com",
  "basePath": "/gsp",
  "schemes": ["https"],
  "paths": {
    "/one-time-payment-code-v1/echo": {
      "post": {
        "tags": ["vgw"],
        "operationId": "Echo",
        "description": "Echos back the `clientMessage` passed in. The purpose of this method is to test basic connectivity between the payment integrator and Google. 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\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"ZWNobyB0cmFuc2FjdGlvbg\", \"requestTimestamp\": \"1481899949606\" }, \"clientMessage\": \"client message\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1481900013178\" }, \"clientMessage\": \"client message\", \"serverMessage\": \"server message\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/EchoRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/EchoResponse"
            }
          }
        }
      }
    },
    "/one-time-payment-code-v1/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\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"ZWNobyB0cmFuc2FjdGlvbg\", \"requestTimestamp\": \"1481855969503\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"paymentIntegratorTransactionId\": \"abc-e34-21343\", \"referenceNumber\": \"a1234567\", \"paymentTimestamp\": \"1481855969203\", \"paymentLocation\": { \"brandName\": \"ExampleMart\", \"locationId\": \"7783\" } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1481855970403\" }, \"result\": \"SUCCESS\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/ReferenceNumberPaidNotificationRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ReferenceNumberPaidNotificationResponse"
            }
          }
        }
      }
    },
    "/one-time-payment-code-v1/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\": 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\" }, \"eventOffset\": 0, \"nextEventOffset\": 4, \"totalEvents\": 15, \"remittanceStatementSummary\": { \"statementDate\": \"1502521200000\", \"billingPeriod\": { \"startDate\": \"1502434800000\", \"endDate\": \"1502434800000\" }, \"dateDue\": \"1502348400000\", \"currencyCode\": \"INR\", \"totalDueByIntegrator\": \"1076000000\", \"totalPresentmentAmounts\": [ { \"amountMicros\": \"1076000000\", \"currencyCode\": \"INR\" } ], \"remittanceInstructions\": { \"memoLineId\": \"stmt-1AB-pp0-invisi\" } }, \"captureEvents\": [ { \"eventRequestId\": \"bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ\", \"paymentIntegratorEventId\": \"ioj32SOIjf23oijSDfoij\", \"eventCharge\": \"700000000\", \"eventFee\": \"-28000000\" }, { \"eventRequestId\": \"Ggghvh78200PQ3Yrpb\", \"paymentIntegratorEventId\": \"iasdf23dSdfijSDfoij\", \"eventCharge\": \"800000000\", \"eventFee\": \"-32000000\" } ], \"refundEvents\": [ { \"eventRequestId\": \"liUrreQY233839dfFFb24gaQM\", \"paymentIntegratorEventId\": \"asd3SDf3f3oijSDfoij\", \"eventCharge\": \"-200000000\", \"eventFee\": \"8000000\" }, { \"eventRequestId\": \"IIghhhUrreQY233839II9qM==\", \"paymentIntegratorEventId\": \"DFjidoso12FSDFSDE\", \"eventCharge\": \"-150000000\", \"eventFee\": \"6000000\" } ] } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/RemittanceStatementDetailsRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/RemittanceStatementDetailsResponse"
            }
          }
        }
      }
    },
    "/one-time-payment-code-v1/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\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"0123434-abc\", \"requestTimestamp\": \"1502545413098\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"statementId\": \"0123434-statement-abc\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1519996752221\" }, \"acceptRemittanceStatementResultCode\": \"SUCCESS\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/AcceptRemittanceStatementRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/AcceptRemittanceStatementResponse"
            }
          }
        }
      }
    },
    "/one-time-payment-code-v1/acceptRemittanceStatementWithModifications": {
      "post": {
        "tags": ["vgw"],
        "operationId": "AcceptRemittanceStatementWithModifications",
        "description": "Tells Google that the statement indicated in this request will be paid after modifications are made to the statement such as fee to VAT reclassification. 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\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"0123434-abc\", \"requestTimestamp\": \"1502545413098\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"statementId\": \"0123434-statement-abc\", \"feeToVatModification\": { \"vatToFeeRatioInMicros\": \"150000\" } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1519996752221\" }, \"acceptRemittanceStatementWithModificationsResultCode\": \"SUCCESS\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/AcceptRemittanceStatementWithModificationsRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/AcceptRemittanceStatementWithModificationsResponse"
            }
          }
        }
      }
    }
  },
  "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 represented as milliseconds since epoch. The receiver should verify that this timestamp is \u00B1 60s of 'now'. This request timestamp is not idempotent upon retries.",
          "type": "string",
          "format": "int64"
        },
        "userLocale": {
          "description": "**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 `userMessage` fields in the response.",
          "type": "string"
        },
        "protocolVersion": {
          "description": "**REQUIRED**: The version of this request.",
          "$ref": "#/definitions/Version"
        }
      }
    },
    "Version": {
      "description": "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.",
      "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"
        },
        "minor": {
          "description": "**REQUIRED**: Minor version. This denotes significant bug fixes.",
          "type": "integer",
          "format": "int32"
        },
        "revision": {
          "description": "**REQUIRED**: Minor version. This denotes minor bug fixes.",
          "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 represented as milliseconds since epoch. The receiver should verify that this timestamp is \u00B1 60s of 'now'.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "ErrorResponse": {
      "description": "Error Response object for all methods.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "errorResponseCode": {
          "description": "**OPTIONAL**: A code that captures the type of error that occurred.",
          "type": "string",
          "enum": [
            "UNKNOWN_ERROR_RESPONSE_CODE",
            "INVALID_API_VERSION",
            "INVALID_PAYLOAD_SIGNATURE",
            "INVALID_PAYLOAD_ENCRYPTION",
            "REQUEST_TIMESTAMP_OUT_OF_RANGE",
            "INVALID_IDENTIFIER",
            "IDEMPOTENCY_VIOLATION",
            "INVALID_FIELD_VALUE",
            "MISSING_REQUIRED_FIELD",
            "PRECONDITION_VIOLATION",
            "USER_ACTION_IN_PROGRESS",
            "INVALID_DECRYPTED_REQUEST",
            "FORBIDDEN"
          ]
        },
        "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. For example, `INVALID_IDENTIFIER` should be accompanied by information in this field as to which type of identifier was invalid. 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"
        }
      }
    },
    "ReferenceNumberPaidNotificationRequest": {
      "description": "Request object for the referenceNumberPaidNotification method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: This is the payment integrator account identifier on which the reference number was created.",
          "type": "string"
        },
        "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"
        },
        "pixEndToEndId": {
          "description": "This ID is created by Banco Central do Brasil (BCB) for the Brazilian instant payment ecosystem (Pix). This ID is used to identify the operation on a transaction, either a payment or a refund.",
          "type": "string"
        },
        "referenceNumber": {
          "description": "**REQUIRED**: Reference number that the user has paid. For legacy integrations, it is the `referenceNumber` of the `generateReferenceNumber` call for this transaction. For new integrations, it is the `printableString` of the `generateReferenceNumber` call for this transaction. If the `generateReferenceNumber` call doesn't contains `printableString`, it falls back to the `barcodeContents` of the same call.",
          "type": "string"
        },
        "paymentTimestamp": {
          "description": "**REQUIRED**: Timestamp recorded by the integrator when the user paid this reference number (milliseconds since epoch).",
          "type": "string",
          "format": "int64"
        },
        "paymentLocation": {
          "description": "**REQUIRED**: Information about the physical location where the user paid.",
          "$ref": "#/definitions/PaymentLocation"
        },
        "paidAmount": {
          "description": "**TO-BE-REQUIRED**: The amount actually paid by the user. The user should not be allowed to pay a different amount than the amount sent in the `generateReferenceNumber` call, and any cases of the amount mismatching will be treated as a bug requiring investigation. This field supports accurate accounting of how much the user actually paid, independent of what the user should have paid. *Note:* This field will transition to be required by end of October 2023. ",
          "$ref": "#/definitions/Amount"
        },
        "payerInfo": {
          "description": "**OPTIONAL**: Details about the person making the payment. This may include tax information, bank account details, etc. Providing this information enhances our ability to detect and prevent fraudulent activity by adding Risk checks, making the payment system more secure for cash FOPs. If this information is not provided, the payment system will still function normally but may not be as secure.",
          "$ref": "#/definitions/PayerInfo"
        }
      }
    },
    "PaymentLocation": {
      "description": "Information about the physical location where the user paid.",
      "type": "object",
      "properties": {
        "brandName": {
          "description": "**REQUIRED**: The brand name of the location where the user paid (for example, the brand name of the store chain).",
          "type": "string"
        },
        "locationId": {
          "description": "**REQUIRED**: A unique name, number, or other identifier for the specific location where the user paid (for example a number representing the particular store within a brand of stores).",
          "type": "string"
        }
      }
    },
    "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"
        }
      }
    },
    "PayerInfo": {
      "description": "Information about the person making the payment.",
      "type": "object",
      "properties": {
        "payerTaxInfo": {
          "description": "**OPTIONAL**: Tax-related information about the payer, such as tax ID or orther relevant identifiers.",
          "$ref": "#/definitions/TaxInfo"
        },
        "payerBankAccountIdentifier": {
          "description": "**OPTIONAL**: Banking details of the payer, potentially including bank name, account number, or other identifying information.",
          "$ref": "#/definitions/BankAccountIdentifier"
        }
      }
    },
    "TaxInfo": {
      "description": "Tax-related information about the payer.",
      "type": "object",
      "properties": {
        "brazil": {
          "description": "Specific tax details for Brazil.",
          "$ref": "#/definitions/BrazilTaxInfo"
        }
      }
    },
    "BrazilTaxInfo": {
      "description": "Tax-related information about the payer specific to Brazil.",
      "type": "object",
      "properties": {
        "cnpj": {
          "description": "Cadastro Nacional da Pessoa Jur\u00EDdica (CNPJ), an identification number issued to Brazilian companies.",
          "type": "string"
        },
        "cpf": {
          "description": "Cadastro de Pessoas F\u00EDsicas (CPF), the Brazilian individual taxpayer registry identification.",
          "type": "string"
        }
      }
    },
    "BankAccountIdentifier": {
      "description": "Unique identifier of a bank account.",
      "type": "object",
      "properties": {
        "brazilBankAccount": {
          "description": "An account with a bank in Brazil.",
          "$ref": "#/definitions/BrazilBankAccountInfo"
        }
      }
    },
    "BrazilBankAccountInfo": {
      "description": "Details of a user's bank account in Brazil.",
      "type": "object",
      "properties": {
        "bankCode": {
          "description": "**REQUIRED**: The unique code identifying the bank associated with the payer's account.",
          "type": "string"
        },
        "branchCode": {
          "description": "**REQUIRED**: The specific code representing the branch where the payer's account is held.",
          "type": "string"
        },
        "accountNumber": {
          "description": "**REQUIRED**: The unique number identifying the payer's bank account.",
          "type": "string"
        }
      }
    },
    "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 the call.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS",
            "INVALID_REFERENCE_NUMBER"
          ]
        },
        "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"
        }
      }
    },
    "RemittanceStatementDetailsRequest": {
      "description": "Request object for the remittance statement detail method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this statement.",
          "type": "string"
        },
        "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"
        },
        "totalEvents": {
          "description": "**REQUIRED**: Total number of events in this statement.",
          "type": "integer",
          "format": "int32"
        },
        "totalWithholdingTaxes": {
          "description": "**REQUIRED**: The sum of all taxes withheld for this statement. This value is in [micros]({{glossary_path}}#micros \"What are micros?\").",
          "type": "string",
          "format": "int64"
        },
        "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.",
          "type": "string",
          "format": "int64"
        },
        "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 milliseconds from epoch. 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.",
          "type": "string",
          "format": "int64"
        },
        "currencyCode": {
          "description": "**REQUIRED**: ISO 4217 3-letter currency code.",
          "type": "string"
        },
        "totalDueByIntegrator": {
          "description": "**REQUIRED**: This value is in micros in the currency of `currencyCode`. This value is always positive.",
          "type": "string",
          "format": "int64"
        },
        "remittanceInstructions": {
          "description": "**REQUIRED**: Details on how to remit payment",
          "$ref": "#/definitions/RemittanceInstructions"
        },
        "totalPresentmentAmounts": {
          "description": "**REQUIRED**: This is the total amount 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 milliseconds from epoch. 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",
          "type": "string",
          "format": "int64"
        },
        "endDate": {
          "description": "**REQUIRED**: The end date of the billing period. This is represented as milliseconds from epoch. This is the last millisecond of the last day of the billing period, 23:59:59.999",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "RemittanceInstructions": {
      "description": "Structure holding information about how to pay this remittance notification.",
      "type": "object",
      "properties": {
        "memoLineId": {
          "description": "**REQUIRED**: Identifier that is mandatory to be put on the memo line for the payment for remittance identification.",
          "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"
        },
        "paymentIntegratorEventId": {
          "description": "**REQUIRED**: 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. This field is of variable length, as an integrator whatever ID you supply for this event will be reflected here. If a value was not provided by the integrator for the corresponding event, this field will contain the same value as the `eventRequestId` field. For reverse refund, chargeback and reverse chargeback events this will be the `requestId` that the Payment Integrator sent with the notification of the event. The length and format of this field depends on the source field for each ID. Refer to the documentation for each of the source fields for details about length and character set requirements. In particular, note that this field can sometimes contain Google-generated IDs which may have different max length requirements than integrator-generated IDs.",
          "type": "string"
        },
        "eventCharge": {
          "description": "**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. 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?\").",
          "type": "string",
          "format": "int64"
        },
        "eventFee": {
          "description": "**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, 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?\").",
          "type": "string",
          "format": "int64"
        },
        "presentmentChargeAmount": {
          "description": "**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]({{glossary_path}}#micros \"What are micros?\"). *Note:* This will be required in version 1.1 ",
          "type": "string",
          "format": "int64"
        },
        "presentmentCurrencyCode": {
          "description": "**OPTIONAL**: ISO 4217 3-letter currency code denominating the presentment (transaction) currency. *Note:* This will be required in version 1.1 ",
          "type": "string"
        },
        "exchangeRate": {
          "description": "**DEPRECATED**: 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.",
          "type": "string",
          "format": "int64"
        },
        "nanoExchangeRate": {
          "description": "**OPTIONAL**: 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. Both this field and exchange_rate will be populated. They are equivalent exchange rates expressed with different precision. In future versions, exchange_rate will be removed in favor of nano_exchange_rate. *Note:* This will be required in version 1.1 ",
          "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"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this statement.",
          "type": "string"
        },
        "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"
        },
        "acceptRemittanceStatementResultCode": {
          "description": "**REQUIRED**: Result of the AcceptRemittanceStatement call.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS"
          ]
        }
      }
    },
    "AcceptRemittanceStatementWithModificationsRequest": {
      "description": "Request object for the `acceptRemittanceStatementWithModifications` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this statement.",
          "type": "string"
        },
        "statementId": {
          "description": "**REQUIRED**: Request ID of the statement notification this request modifies.",
          "type": "string"
        },
        "feeToVatModification": {
          "description": "Requested modification to reattribute a portion of fees to value-added-tax (VAT).",
          "$ref": "#/definitions/FeeToVATModification"
        },
        "settlementExchangeRateModification": {
          "description": "Requested modification to adjust the exchange rate on the statement to use a different exchange rate, where permitted.",
          "$ref": "#/definitions/SettlementExchangeRateModification"
        },
        "feeToVatAndSettlementExchangeRateModification": {
          "description": "Requested modification to both reattribute a portion of fees to value-added-tax (VAT) and adjust the exchange rate on the statement to use a different exchange rate, where permitted.",
          "$ref": "#/definitions/AcceptRemittanceStatementWithModificationsRequestFeeToVATAndSettlementExchangeRateModification"
        }
      }
    },
    "FeeToVATModification": {
      "description": "This object provides tax modifications to be applied to remittance statements.",
      "type": "object",
      "properties": {
        "vatToFeeRatioInMicros": {
          "description": "**REQUIRED**: Ratio of VAT to Fee amount in micros. This is the percentage of the fees to reattribute to VAT and must be greater than or equal to zero. Rounding should be \"half even\" or \"banker's\" rounding, meaning round to the even neighbor in the case that both numbers are equidistant (e.g. 2.5 -> 2, 5.5 -> 6). A sample for calculating tax is as follows: - Tax-inclusive processing fee collected by payment integrator: 1000 USD - Tax rate: 10% - Thus, 1000 USD = (processing fee) + (10% * processing fee) - Processing fee (sans tax) = 1000 \/ 1.1 = 909.090909 USD - Tax paid by payment integrator = 1000 - 909.090909 = 90.909091 USD - `vatToFeeRatioInMicros` = (90.909091 \/ 1000) * 1000000 = 90909.091 - Half-even rounding on 90909.091 = 90909 ",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "SettlementExchangeRateModification": {
      "description": "If permitted for the payment integrator, this object provides the ability to report a different exchange rate than what is on the statement.",
      "type": "object",
      "properties": {
        "actualNanoExchangeRate": {
          "description": "**REQUIRED**: The actual exchange rate that the payment integrator is planning to settle with. The exchange rate represents the value that the presentment amount is multiplied by to convert to the settlement amount. 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"
        }
      }
    },
    "AcceptRemittanceStatementWithModificationsRequestFeeToVATAndSettlementExchangeRateModification": {
      "description": "Object used for modifications that both reattributes a portion of fees to value-added-tax (VAT) and also adjusts the exchange rate on the statement to use a different exchange rate, where permitted.",
      "type": "object",
      "properties": {
        "feeToVatModification": {
          "description": "**REQUIRED**: Requested modification to reattribute a portion of fees to value-added-tax (VAT).",
          "$ref": "#/definitions/FeeToVATModification"
        },
        "settlementExchangeRateModification": {
          "description": "** REQUIRED **: Requested modification to adjust the exchange rate on the statement to use a different exchange rate, where permitted.",
          "$ref": "#/definitions/SettlementExchangeRateModification"
        }
      }
    },
    "AcceptRemittanceStatementWithModificationsResponse": {
      "description": "Response object for the `acceptRemittanceStatementWithModifications` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "acceptRemittanceStatementWithModificationsResultCode": {
          "description": "**REQUIRED**: Result of the AcceptRemittanceStatement call.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS",
            "INVALID_VAT_MODIFICATION"
          ]
        },
        "modifiedTotalDueByIntegrator": {
          "description": "**OPTIONAL**: If the amount of the remittance modification changed the amount due (for example, due to an exchange rate modification), this field will be populated with the new total due.",
          "$ref": "#/definitions/Amount"
        }
      }
    }
  }
}
