{
  "swagger": "2.0",
  "info": {
    "title": "Google Standard Payments Google Hosted Redirect FOP API",
    "description": "This includes services hosted by Google for Redirect FOPs.",
    "version": "v1"
  },
  "host": "vgw.googleapis.com",
  "basePath": "/gsp",
  "schemes": ["https"],
  "paths": {
    "/v1/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\": 1 }, \"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"
            }
          }
        }
      }
    },
    "/redirect-fop-v1/refundResultNotification": {
      "post": {
        "tags": ["vgw"],
        "operationId": "RefundResultNotification",
        "description": "Notify Google of the result of a refund after an `asynchronousRefund` method call has been made. The `refundResult` value is idempotent for this `refundRequestId`, so its 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\": 1 }, \"requestId\": \"zldLDZaKLdk31la\", \"requestTimestamp\": { \"epochMillis\": \"1481899949606\" }, \"paymentIntegratorAccountId\": \"InvisiRedirectPaymentUSA_USD\" }, \"paymentIntegratorRefundId\": \"UJ97F3RY8R\", \"refundRequestId\": \"qierozie12345\", \"result\": { \"success\": {} } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\": \"1481899949611\" } }, \"result\": { \"accepted\": {} } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/RefundResultNotificationRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/RefundResultNotificationResponse"
            }
          }
        }
      }
    },
    "/redirect-fop-v1/redirectPaymentCompleteNotification": {
      "post": {
        "tags": ["vgw"],
        "operationId": "RedirectPaymentCompleteNotification",
        "description": "Notify Google of the status of a redirect payment. 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 }, \"requestId\": \"aBcEIzjekl291A\", \"requestTimestamp\": { \"epochMillis\": \"1481899949606\" }, \"paymentIntegratorAccountId\": \"InvisiRedirectPaymentUSA_USD\" }, \"redirectRequestId\": \"cmVxdWVzdDE\", \"result\": { \"chargeExceedsTransactionLimit\": { \"transactionLimit\": { \"amountMicros\": \"1000000000000\", \"currencyCode\": \"INR\" } } }, \"formOfPayment\": { \"issuerId\": { \"value\": \"123ABC\" } } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\": \"1481899949611\" } }, \"result\": { \"accepted\": {} } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/RedirectPaymentCompleteNotificationRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/RedirectPaymentCompleteNotificationResponse"
            }
          }
        }
      }
    },
    "/redirect-fop-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 }, \"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"
            }
          }
        }
      }
    },
    "/redirect-fop-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 }, \"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"
            }
          }
        }
      }
    },
    "/redirect-fop-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 }, \"requestId\": \"0123434-abc\", \"requestTimestamp\": { \"epochMillis\": \"1616976000000\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\" }, \"statementId\": \"0123434-statement-abc\", \"feeToVatModification\": { \"vatToFeeRatioInMicros\": \"150000\" } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\": \"1616976000000\" } }, \"result\": { \"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. 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": {
      }
    },
    "RefundResultNotificationRequest": {
      "description": "Request object for the `refundResultNotification` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorRefundId": {
          "description": "**OPTIONAL**: This identifier is specific to the integrator and is generated by the integrator. The integrator identifies this refund in their system by this identifier. For convenience, this identifier is included in the remittance details.",
          "type": "string"
        },
        "refundRequestId": {
          "description": "**REQUIRED**: Unique identifier for this refund, established by the `requestId` field when the `refund` method was called.",
          "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.",
          "$ref": "#/definitions/AccountClosed"
        },
        "accountClosedAccountTakenOver": {
          "description": "The user's account with the integrator has been closed, suspected account take over.",
          "$ref": "#/definitions/AccountClosedAccountTakenOver"
        },
        "accountClosedFraud": {
          "description": "The user's account held with the integrator has been closed because of fraud.",
          "$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"
        },
        "captureUsedPromotionalBalance": {
          "description": "The amount used in the purchased was earned through cashback and refunds are not allowed.",
          "$ref": "#/definitions/CaptureUsedPromotionalBalance"
        }
      }
    },
    "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": {
      }
    },
    "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"
        }
      }
    },
    "CaptureUsedPromotionalBalance": {
      "description": "The amount used in the purchased was earned through cashback and refunds are not allowed.",
      "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": {
        "accepted": {
          "description": "Refund result notification was accepted.",
          "$ref": "#/definitions/Empty"
        }
      }
    },
    "RedirectPaymentCompleteNotificationRequest": {
      "description": "Request object for the `redirectPaymentCompleteNotification` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "redirectRequestId": {
          "description": "**REQUIRED**: The `requestId` sent in the original\/initiating redirect payment 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"
        },
        "result": {
          "description": "**REQUIRED**: Result of this redirect payment.",
          "$ref": "#/definitions/RedirectPaymentCompleteNotificationRequestRedirectPaymentNotificationRequestResult"
        },
        "formOfPayment": {
          "description": "**REQUIRED**: The form of payment that the user selected for this payment. If the user made no choice or it does not apply, this should be set to `noneChosen`.",
          "$ref": "#/definitions/FormOfPayment"
        }
      }
    },
    "RedirectPaymentCompleteNotificationRequestRedirectPaymentNotificationRequestResult": {
      "description": "Result details of the redirect payment.",
      "type": "object",
      "properties": {
        "success": {
          "description": "Successful redirect payment, deliver the goods.",
          "$ref": "#/definitions/Empty"
        },
        "chargeExceedsTransactionLimit": {
          "description": "This redirect payment request `amount` exceeds per-transaction limit. If this code is used populate the transaction_limit field for user messaging purposes.",
          "$ref": "#/definitions/ChargeExceedsTransactionLimit"
        },
        "chargeUnderLimit": {
          "description": "This redirect payment request `amount` does not meet the minimum transaction amount.",
          "$ref": "#/definitions/ChargeUnderLimit"
        },
        "insufficientFunds": {
          "description": "This account does not have sufficient funds to guarantee this redirect payment.",
          "$ref": "#/definitions/InsufficientFunds"
        },
        "accountDoesNotSupportCurrency": {
          "description": "This account does not support the requested currency.",
          "$ref": "#/definitions/AccountDoesNotSupportCurrency"
        },
        "userExitedPaymentFlow": {
          "description": "User canceled the whole payment attempt. At any point in the payment flow, the user performed an action that canceled the payment. This should be used only when the payment will not complete in the future.",
          "$ref": "#/definitions/UserExitedPaymentFlow"
        },
        "riskDeclined": {
          "description": "The transaction was declined due to a risk check done by the integrator. This does not cause the user's instrument to be closed at Google.",
          "$ref": "#/definitions/RiskDeclined"
        },
        "captureRequestExpired": {
          "description": "It took too long for the integrator to capture the user's funds. Google will treat this decline as a final state, so the integrator must ensure that the user's funds do not get captured later or that the user gets automatically refunded if the capture ended up succeeding.",
          "$ref": "#/definitions/CaptureRequestExpired"
        },
        "otpNotMatched": {
          "description": "OTP did not match what the integrator sent.",
          "$ref": "#/definitions/OtpNotMatched"
        },
        "declinedByIssuer": {
          "description": "This decline code should never be used in steady-state. It is meant as a temporary catch-all code to use when the integrator encounters an unknown decline code from the underlying issuer of the user's instrument. This result code can be used while the integrator determines a more appropriate result code to use or negotiates the addition of a new result code to this specification. Importantly, this decline code is very much a *real* decline. It is a permanent decline as far as Google is concerned. If the integrator returns this, it is up to them to track down what the issuer's code really means and refund the user if it turns out the code actually meant `SUCCESS`. *Note:* even after the integrator maps the unknown issuer decline code to an appropriate result code going forward, it is important that they still return `DECLINED_BY_ISSUER` idempotently for any capture request that was originally declined with a `DECLINED_BY_ISSUER` result.",
          "$ref": "#/definitions/DeclinedByIssuer"
        }
      }
    },
    "ChargeExceedsTransactionLimit": {
      "description": "This payment request's `amount` exceeds per-transaction limit. If this code is used populate the transaction_limit field for user messaging purposes.",
      "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"
        },
        "transactionLimit": {
          "description": "**REQUIRED**: This is the maximum amount the user could spend on a transaction. The `currencyCode` of `transactionLimit` must match the `currencyCode` of the request.",
          "$ref": "#/definitions/Amount"
        }
      }
    },
    "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"
        }
      }
    },
    "ChargeUnderLimit": {
      "description": "This request's `amount` does not meet the minimum transaction amount.",
      "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"
        },
        "minimumTransactionLimit": {
          "description": "**OPTIONAL**: This is the minimum amount the user could spend on a transaction. Note: this field will transition to REQUIRED in a future version of the API.",
          "$ref": "#/definitions/Amount"
        }
      }
    },
    "InsufficientFunds": {
      "description": "This account does not have sufficient funds to guarantee this capture.",
      "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"
        },
        "currentBalance": {
          "description": "**OPTIONAL**: This is the current available balance for the account. If provided, this value will be included in user-facing messaging.",
          "$ref": "#/definitions/Amount"
        }
      }
    },
    "AccountDoesNotSupportCurrency": {
      "description": "This account does not support the requested currency.",
      "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"
        }
      }
    },
    "UserExitedPaymentFlow": {
      "description": "User canceled the whole payment attempt.",
      "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 rawcode. 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"
        }
      }
    },
    "RiskDeclined": {
      "description": "The transaction was declined due to a risk check on the integrator's side.",
      "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"
        }
      }
    },
    "CaptureRequestExpired": {
      "description": "It took too long for the integrator to capture the user's funds. Google will treat this decline as a final state, so the integrator must ensure that the user's funds do not get captured later or that the user gets automatically refunded if the capture ended up succeeding.",
      "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 rawcode. 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"
        }
      }
    },
    "OtpNotMatched": {
      "description": "OTP did not match what the integrator sent.",
      "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"
        }
      }
    },
    "DeclinedByIssuer": {
      "description": "This decline code should never be used in steady-state. It is meant as a temporary catch-all code to use when the integrator encounters an unknown decline code from the underlying issuer of the user's instrument. This result code can be used while the integrator determines a more appropriate result code to use or negotiates the addition of a new result code to this specification.",
      "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 rawcode. 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"
        }
      }
    },
    "FormOfPayment": {
      "description": "The form of payment (FOP) that the user already selected for this payment. If the user made no choice or it does not apply, this will be set to `noneChosen`.",
      "type": "object",
      "properties": {
        "noneChosen": {
          "description": "The user has not chosen any specific form of payment. For redirect payments where the user needs to select a FOP, the integrator should present a FOP selection UI upon redirect.",
          "$ref": "#/definitions/Empty"
        },
        "issuerId": {
          "description": "The Google-generated unique identifier of the issuer that the user wants to use for this payment. This identifier represents a specific bank \/ ewallet \/ etc. Google will maintain a hard-coded mapping of available issuers and their IDs. The payment integrator should notify Google when a change is required.",
          "$ref": "#/definitions/IssuerId"
        },
        "card": {
          "description": "User's payment card account.",
          "$ref": "#/definitions/Card"
        }
      }
    },
    "IssuerId": {
      "description": "A unique identifier for an issuer of user accounts.",
      "type": "object",
      "properties": {
        "value": {
          "description": "**REQUIRED**: The string value of the identifier. This unique identifier is defined by Google. Google will share a list with the identifiers for all external issuers available through the payment integrator.",
          "type": "string"
        }
      }
    },
    "Card": {
      "description": "Description of a payment card account (i.e., credit card, debit card, charge card).",
      "type": "object",
      "properties": {
        "accountNumber": {
          "description": "**REQUIRED**: The account number itself (i.e., the FPAN).",
          "type": "string"
        },
        "nameOnCard": {
          "description": "**REQUIRED**: The customer's name as it appears on the card.",
          "type": "string"
        },
        "expiryMonth": {
          "description": "**OPTIONAL**: Expiration month, formatted `MM`.",
          "type": "string"
        },
        "expiryYear": {
          "description": "**OPTIONAL**: Expiration year, formatted `YY`.",
          "type": "string"
        },
        "cvn": {
          "description": "**OPTIONAL**: If Google collected the CVN from the user it is provided here and should be verified.",
          "type": "string"
        },
        "issuanceDateMonth": {
          "description": "**OPTIONAL**: Issuance month, formatted `MM`.",
          "type": "string"
        },
        "issuanceDateYear": {
          "description": "**OPTIONAL**: Issuance year, formatted `YY`.",
          "type": "string"
        }
      }
    },
    "RedirectPaymentCompleteNotificationResponse": {
      "description": "Response object for the `redirectPaymentCompleteNotification` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Contains the result of the request.",
          "$ref": "#/definitions/RedirectPaymentCompleteNotificationResponseRedirectPaymentNotificationResult"
        }
      }
    },
    "RedirectPaymentCompleteNotificationResponseRedirectPaymentNotificationResult": {
      "description": "Details corresponding to the result.",
      "type": "object",
      "properties": {
        "accepted": {
          "description": "The `RedirectPaymentCompleteNotificationRequest` was valid and is now being processed by Google.",
          "$ref": "#/definitions/Empty"
        }
      }
    },
    "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"
        }
      }
    },
    "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"
        }
      }
    },
    "AcceptRemittanceStatementWithModificationsRequest": {
      "description": "Request object for the `acceptRemittanceStatementWithModifications` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "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"
        },
        "result": {
          "description": "**REQUIRED**: Result of the AcceptRemittanceStatement call.",
          "$ref": "#/definitions/AcceptRemittanceStatementWithModificationsResponseAcceptRemittanceStatementWithModificationsResult"
        },
        "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"
        }
      }
    },
    "AcceptRemittanceStatementWithModificationsResponseAcceptRemittanceStatementWithModificationsResult": {
      "description": "Result of this remittance modifications acceptance.",
      "type": "object",
      "properties": {
        "success": {
          "description": "Remittance statement accepted with modifications successfully.",
          "$ref": "#/definitions/Empty"
        },
        "invalidVatModification": {
          "description": "The VAT modification was not accepted due to an invalid request.",
          "$ref": "#/definitions/Empty"
        }
      }
    }
  }
}
