{
  "swagger": "2.0",
  "info": {
    "title": "Google Standard Payments Payment Integrator Hosted Refundable One Time Payment Codes API",
    "description": "This includes services hosted by Payment Integrators for Refundable One Time Payment Codes.",
    "version": "v2"
  },
  "host": "www.integratorhost.example.com",
  "basePath": "/integrator-base-path",
  "schemes": ["https"],
  "paths": {
    "/refundable-one-time-payment-code-v2/echo": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "Echo",
        "description": "Echos back a string sent from the client. If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 2 }, \"requestId\": \"G1MQ0YERJ0Q7LPM\", \"requestTimestamp\": { \"epochMillis\": \"1481899949606\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\" }, \"clientMessage\": \"Client echo message\" } An example success response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\":\"1481899950236\" } }, \"clientMessage\": \"Client echo message\", \"serverMessage\": \"Debug ID 12345\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/EchoRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/EchoResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v2/remittanceStatementNotification": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "RemittanceStatementNotification",
        "description": "Notifies the integrator of a new remittance statement. Statement notifications occur every time a new statement is raised that represents money that Google will pay the integrator or the money that the integrator owes Google. If the integrator returns a success, then it acknowledges receipt of the statement. The `requestId` is also the statement Id (used elsewhere). The `requestId` within the header is the idempotency key and uniquely identifies this statement. If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 2 }, \"requestId\": \"0123434-statement-abc\", \"requestTimestamp\": { \"epochMillis\": \"1502632800000\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\" }, \"remittanceStatementSummary\": { \"statementDate\": { \"epochMillis\": \"1502521200000\" }, \"billingPeriod\": { \"startDate\": { \"epochMillis\": \"1502434800000\" }, \"endDate\": { \"epochMillis\": \"1502434800000\" } }, \"dateDue\": { \"epochMillis\": \"1502348400000\" }, \"totalDueByIntegrator\": { \"amountMicros\": \"1076000000\", \"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 } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\": \"1502632802000\" } }, \"result\": { \"accepted\": {} } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/RemittanceStatementNotificationRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/RemittanceStatementNotificationResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v2/associateAccount": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "AssociateAccount",
        "description": "Associates the customer's account with the payment processor to the Google instrument being added. Account association happens after the integrator has authenticated the user. Association occurs through a server-to-server call that contains the `requestId` for the associated authentication flow (`authenticationRequestId`), an `associationId` and a `googlePaymentToken` (GPT). The payment processor should associate the `associationId` and the `googlePaymentToken` to the customer's account. The GPT is used to initiate payments. The `requestId` within the header is the idempotency key and uniquely identifies this association attempt. If Google sends an `associationId` or a `googlePaymentToken` that the integrator has already seen during a different association attempt (different idempotency key), the expectation is this would throw an HTTP error. If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 2 }, \"requestId\": \"cmVxdWVzdDE\", \"requestTimestamp\": { \"epochMillis\": \"1481899949606\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\" }, \"googlePaymentToken\": { \"issuerId\": { \"value\": \"InvisiCashUSA\" }, \"token\": \"ZXhhbXBsZSB1bmlxdWUgcGF5bWVudCB0b2tlbiB2YWx1ZQ\" }, \"authenticationRequestId\": \"bnAxdWTydDX==\", \"associationId\": \"LmddbXBsZSByZWZlcmVuY2UgdG9rZW4gdmFsdWU_\", \"provideUserInformation\": true } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\": \"1481899949611\" } }, \"result\": { \"success\": { \"transactionLimits\": { \"transactionMaxLimit\": { \"limitAmount\": { \"amountMicros\": \"100000000\", \"currencyCode\": \"JPY\" } } }, \"associatedAccountIdentifier\": { \"accountId\": \"1234-5678-91\" }, \"associatedAccountDetails\": { \"accountNickname\" : { \"partialAccountNickname\": \"***-91\" }, \"accountAlias\": { \"phoneNumber\": { \"value\": \"+15555555555\" } } }, \"userInformation\": { \"name\": \"Example Customer\", \"addressLine\": [\"123 Main St\"], \"localityName\": \"Springfield\", \"administrativeAreaName\": \"CO\", \"postalCodeNumber\": \"80309\", \"countryCode\": \"US\" } } } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/AssociateAccountRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/AssociateAccountResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v2/asynchronousRefund": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "AsynchronousRefund",
        "description": "Refunds a portion or all of the entire transaction. This initiates a request to refund funds that were captured. The amount refunded can be equal to or smaller than the remaining captured amount on the transaction. Multiple partial refunds are allowed by calling `asynchronousRefund` multiple times with different `requestId` within the header. The final result of the refund is supplied by a call to `refundResultNotification`. The `requestId` within the header is the idempotency key, which uniquely identifies this transaction. If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 2 }, \"requestId\": \"liUrreQY233839dfFFb24gaQM\", \"requestTimestamp\": { \"epochMillis\": \"1502220434778\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\" }, \"transactionId\": \"bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ\", \"refundAmount\": { \"amountMicros\": \"208000000\", \"currencyCode\": \"INR\" } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\": \"1481900013178\" } }, \"result\": { \"acknowledged\": {} } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/AsynchronousRefundRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/AsynchronousRefundResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v2/generateReferenceNumber": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "GenerateReferenceNumber",
        "description": "Creates a reference number and registers payment information (description, timestamp) with the integrator. The `requestId` is the idempotency key and uniquely identifies this transaction. All mutations on this transaction populate the `requestId` value in their `generateReferenceNumberRequestId` field or `transactionId` field. If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 2 }, \"requestId\": \"cmVxdWVzdDE\", \"requestTimestamp\": { \"epochMillis\": \"1481899949606\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\" }, \"googlePaymentToken\": { \"issuerId\": { \"value\": \"invisicash\" }, \"token\": \"ZXhhbXBsZSB1bmlxdWUgcGF5bWVudCB0b2tlbiB2YWx1ZQ\" }, \"transactionDescription\": \"Google - Music\", \"amount\": { \"amountMicros\": \"728000000\", \"currencyCode\": \"USD\" } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\": \"1481907920760\" } }, \"result\": { \"success\": { \"displayableReferenceNumber\": { \"barcodeWithPrintableString\": { \"printableString\": \"1122334455\", \"barcodeContents\": \"aW50ZWdyYXRvciB0cmFuc2FjdGlvbiBpZA\" } } } } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/GenerateReferenceNumberRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/GenerateReferenceNumberResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v2/cancelReferenceNumber": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "CancelReferenceNumber",
        "description": "Cancels a reference number by invalidating it in the integrators system and preventing future payments. Only a reference number that was previously created by calling generateReferenceNumber is subject to cancellation. If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type `ErrorResponse`. An example requests looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 2 }, \"requestId\": \"cmVxdWVzdDE\", \"requestTimestamp\": { \"epochMillis\": \"1481899949606\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\" }, \"generateReferenceNumberRequestId\": \"aW50ZWdyYXRvciB0cmFuc2FjdGlvbiBpZA\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\": \"1481907920760\" } }, \"result\": { \"success\": {} } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/CancelReferenceNumberRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/CancelReferenceNumberResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v2/refund": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "Refund",
        "description": "Refunds a portion of or the entire transaction initiated through `capture`. The `requestId` within the header is the idempotency key, which uniquely identifies this transaction. If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 2 }, \"requestId\": \"liUrreQY233839dfFFb24gaQM\", \"requestTimestamp\": { \"epochMillis\": \"1502220434778\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\" }, \"transactionId\": \"bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ\", \"refundAmount\": { \"amountMicros\": \"208000000\", \"currencyCode\": \"INR\" } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": { \"epochMillis\": \"1481900013178\" } }, \"result\": { \"success\": {} } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/RefundRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/RefundResponse"
            }
          }
        }
      }
    }
  },
  "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": {
      }
    },
    "RemittanceStatementNotificationRequest": {
      "description": "Request object for the remittance statement notification method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "remittanceStatementSummary": {
          "description": "**REQUIRED**: Summary of this remittance statement.",
          "$ref": "#/definitions/RemittanceStatementSummary"
        }
      }
    },
    "RemittanceStatementSummary": {
      "description": "Summary object about a remittance statement.",
      "type": "object",
      "properties": {
        "statementDate": {
          "description": "**REQUIRED**: Date (in America\/Los Angeles) that this statement was created.",
          "$ref": "#/definitions/Timestamp"
        },
        "billingPeriod": {
          "description": "**REQUIRED**: The billing period this statement covers.",
          "$ref": "#/definitions/BillingPeriod"
        },
        "dateDue": {
          "description": "**OPTIONAL**: The date that the remittance is due. This is represented as a Timestamp. It is a date (and therefore will always start at the first millisecond of the day in the billing timezone). This is set as long as the `totalDueByIntegrator` is greater than 0.",
          "$ref": "#/definitions/Timestamp"
        },
        "totalDueByIntegrator": {
          "description": "**REQUIRED**: This value is always positive.",
          "$ref": "#/definitions/Amount"
        },
        "totalEvents": {
          "description": "**REQUIRED**: Total number of events in this statement.",
          "type": "integer",
          "format": "int32"
        },
        "totalProcessedAmount": {
          "description": "**TO_BE_REQUIRED**: This value is the sum of all the event charges in this statement.",
          "$ref": "#/definitions/Amount"
        },
        "totalDirectTaxAmount": {
          "description": "**OPTIONAL**: This value is the sum of all direct taxes applied to all events in this statement. This value is populated for integrators on a contractual basis.",
          "$ref": "#/definitions/Amount"
        },
        "totalFeesAmount": {
          "description": "**TO_BE_REQUIRED**: This value is the sum of all fees applied for all events in this statement.",
          "$ref": "#/definitions/Amount"
        },
        "totalWithholdingTaxAmount": {
          "description": "**OPTIONAL**: This value is the total withholding tax applied for this statement. This value is populated for integrators on a contractual basis.",
          "$ref": "#/definitions/Amount"
        },
        "totalPresentmentAmounts": {
          "description": "**REQUIRED**: These are the total amounts presented to the customer. There will be one entry for each presentment currency.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Amount"
          }
        }
      }
    },
    "BillingPeriod": {
      "description": "Billing period of this statement.",
      "type": "object",
      "properties": {
        "startDate": {
          "description": "**REQUIRED**: The start date of the billing period. This is represented as a Timestamp. It is a date (and therefore will always start at the first millisecond of the day in the billing timezone). This is the first millisecond of the day of the billing period, 00:00:00.000",
          "$ref": "#/definitions/Timestamp"
        },
        "endDate": {
          "description": "**REQUIRED**: The end date of the billing period. This is represented as a Timestamp. This is the last millisecond of the last day of the billing period, 23:59:59.999",
          "$ref": "#/definitions/Timestamp"
        }
      }
    },
    "Amount": {
      "description": "Associates an amount in micros with a currency code.",
      "type": "object",
      "properties": {
        "amountMicros": {
          "description": "**REQUIRED**: An amount in [micros]({{glossary_path}}#micros \"What are micros?\").",
          "type": "string",
          "format": "int64"
        },
        "currencyCode": {
          "description": "**REQUIRED**: ISO 4217 3-letter currency code",
          "type": "string"
        }
      }
    },
    "RemittanceStatementNotificationResponse": {
      "description": "Response object for the remittance statement notification method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Result of this statement notification.",
          "$ref": "#/definitions/RemittanceStatementNotificationResponseStatementNotificationResult"
        }
      }
    },
    "RemittanceStatementNotificationResponseStatementNotificationResult": {
      "description": "Result of this statement notification.",
      "type": "object",
      "properties": {
        "accepted": {
          "description": "Integrator acknowledges receipt of this notification.",
          "$ref": "#/definitions/V2Empty"
        }
      }
    },
    "V2Empty": {
      "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": {
      }
    },
    "AssociateAccountRequest": {
      "description": "Request object for the associate account method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "authenticationRequestId": {
          "description": "`requestId` of the authentication request that preceded this call. This identifier was generated by Google during the authentication flow. This is only present if the user went through the Android app authentication, web authentication, or an asynchronous authentication method that uses `authenticationResultNotification`.",
          "type": "string"
        },
        "provideUserInformation": {
          "description": "**REQUIRED**: True if we want the integrator to provide the address associated with this account.",
          "type": "boolean"
        },
        "googlePaymentToken": {
          "description": "**REQUIRED**: The token that Google will use to initiate purchases with the payment processor.",
          "$ref": "#/definitions/GooglePaymentToken"
        },
        "associationId": {
          "description": "**REQUIRED**: The identifier of this association, created by Google. This is a string that has a maximum length of 100 characters.",
          "type": "string"
        }
      }
    },
    "GooglePaymentToken": {
      "description": "Describes a GooglePaymentToken (GPT), including the token and the issuer of the backing user account.",
      "type": "object",
      "properties": {
        "issuerId": {
          "description": "**REQUIRED**: The identifier of the issuer of the backing user account.",
          "$ref": "#/definitions/IssuerId"
        },
        "token": {
          "description": "**REQUIRED**: This is the token that both companies will use to identify the account for purchases between each other.",
          "type": "string"
        }
      }
    },
    "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"
        }
      }
    },
    "AssociateAccountResponse": {
      "description": "Response object for the associate account method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Result of this association.",
          "$ref": "#/definitions/AssociateAccountResponseAssociateAccountResult"
        }
      }
    },
    "AssociateAccountResponseAssociateAccountResult": {
      "description": "The result of the account association.",
      "type": "object",
      "properties": {
        "success": {
          "description": "The account association was successful.",
          "$ref": "#/definitions/AssociateAccountResponseAssociateAccountResultSuccessDetails"
        },
        "userAuthenticationFailed": {
          "description": "Even though the account authentication bundle was returned, the user authentication failed.",
          "$ref": "#/definitions/V2Empty"
        },
        "notEligible": {
          "description": "User's account is not eligible for this service.",
          "$ref": "#/definitions/V2Empty"
        },
        "otpNotMatched": {
          "description": "OTP did not match what the integrator sent.",
          "$ref": "#/definitions/V2Empty"
        },
        "otpAlreadyUsed": {
          "description": "OTP was already used.",
          "$ref": "#/definitions/V2Empty"
        },
        "otpLimitReached": {
          "description": "User has requested or tried to verify too many OTPs.",
          "$ref": "#/definitions/V2Empty"
        }
      }
    },
    "AssociateAccountResponseAssociateAccountResultSuccessDetails": {
      "description": "Details about a successful account association.",
      "type": "object",
      "properties": {
        "associatedAccountIdentifier": {
          "description": "The account ID the user has with the integrator.",
          "$ref": "#/definitions/AssociatedAccountIdentifier"
        },
        "associatedAccountDetails": {
          "description": "Details about the account that was associated.",
          "$ref": "#/definitions/AssociatedAccountDetails"
        },
        "transactionLimits": {
          "description": "**REQUIRED**: Defines user scoped transaction limits.",
          "$ref": "#/definitions/TransactionLimits"
        },
        "userInformation": {
          "description": "**OPTIONAL**: User information that the integrator knows and will share with Google about this customer. Used for risk information and address prepopulation. This value is required if the `provideUserInformation` field is set to `true` in the request.",
          "$ref": "#/definitions/UserInformation"
        }
      }
    },
    "AssociatedAccountIdentifier": {
      "description": "The account ID the user has with the integrator.",
      "type": "object",
      "properties": {
        "accountId": {
          "description": "**REQUIRED**: The account ID the user has with the integrator. This is used for Google risk to understand account re-use and account relationships and Google customer operation agents to help customers diagnose issues. This value must be immutable for the life of the account.",
          "type": "string"
        }
      }
    },
    "AssociatedAccountDetails": {
      "description": "Details about the account that was associated.",
      "type": "object",
      "properties": {
        "accountNickname": {
          "description": "**REQUIRED**: Nickname by which the user knows this account for display purposes.",
          "$ref": "#/definitions/AssociatedAccountNickname"
        },
        "accountAlias": {
          "description": "**OPTIONAL**: An additional account alias the user might use to identify their vendor account. These are used by Google customer operation agents to help customers diagnose issues. These aliases should be user recognizable (for example the user knows this alias because it appears on their statement or appears on the website after they log into the account).",
          "$ref": "#/definitions/AccountAlias"
        }
      }
    },
    "AssociatedAccountNickname": {
      "description": "The nickname of the associated account.",
      "type": "object",
      "properties": {
        "partialAccountNickname": {
          "description": "String by which the user knows this account for display purposes. This is a suffix of the account nickname. For example last four digits of a phone number. Google will indicate in the user interface that this is only a suffix of the nickname. *Caution:* This value can be PII, but must never be SPII. This value will be displayed in UIs like the purchase flow to allow the user to distinguish between payment methods. *Note:* that either this value or the `fullAccountNickname` must be present, never both.",
          "type": "string"
        },
        "fullAccountNickname": {
          "description": "String by which the user knows this account for display purposes. Unlike `accountNickname` this is the full account nickname. For example `56565-56501` for a phone number or sally@sample-email.com for an email identity. *Caution:* This value can be PII, but must never be SPII. This value will be displayed in UIs like the purchase flow to allow the user to distinguish between payment methods. *Note:* that either this value or the `accountNickname` must be present, never both.",
          "type": "string"
        }
      }
    },
    "AccountAlias": {
      "description": "Defines the type and value of an alias that a user associates with their vendor account.",
      "type": "object",
      "properties": {
        "phoneNumber": {
          "description": "The phone number the user has on file with the integrator.",
          "$ref": "#/definitions/PhoneNumber"
        },
        "emailAddress": {
          "description": "The email address the user has on file with the integrator.",
          "type": "string"
        }
      }
    },
    "PhoneNumber": {
      "description": "An E.164 formatted phone number. Examples include +14035551111 and +918067218000. This will always lead with a + and include only numbers afterwards (no dashes).",
      "type": "object",
      "properties": {
        "value": {
          "description": "**REQUIRED**: This is a E.164 formatted phone number. Examples include +14035551111 and +918067218000. This will always lead with a + and include only numbers afterwards (no dashes).",
          "type": "string"
        }
      }
    },
    "TransactionLimits": {
      "description": "Defines transaction limits for the enclosing entity.",
      "type": "object",
      "properties": {
        "transactionMaxLimit": {
          "description": "**REQUIRED**: Defines the value and currency of a maximum per transaction limit for the enclosing type, or states that no maximum per transaction limit exists.",
          "$ref": "#/definitions/TransactionLimit"
        }
      }
    },
    "TransactionLimit": {
      "description": "Defines a transaction limit amount or the absence of a limit.",
      "type": "object",
      "properties": {
        "limitAmount": {
          "description": "The value of the allowable transaction. This is used to determine whether or not the user should be given this integrator as an option to process a specific transaction. *Note:* that either this value or the `noLimit` can be present, never both.",
          "$ref": "#/definitions/Amount"
        },
        "noLimit": {
          "description": "Indicates that there is no transaction limit. This is used to determine whether or not the user should be given this integrator as an option to process a specific transaction. *Note:* that either this value or the `limitAmount` can be present, never both.",
          "$ref": "#/definitions/V2Empty"
        }
      }
    },
    "UserInformation": {
      "description": "Structure holding information about a user.",
      "type": "object",
      "properties": {
        "name": {
          "description": "**OPTIONAL**: Customer's full name.",
          "type": "string"
        },
        "addressLine": {
          "description": "**OPTIONAL**: This holds unstructured Address text.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "localityName": {
          "description": "**OPTIONAL**: This is something of a fuzzy term, but it generally refers to the city\/town portion of an address. In regions of the world where localities are not well defined or do not fit into this structure well (for example, Japan and China), leave locality_name empty and use address_line. Examples: US city, IT comune, UK post town.",
          "type": "string"
        },
        "administrativeAreaName": {
          "description": "**OPTIONAL**: Top-level administrative subdivision of this country\" Examples: US state, IT region, CN province, JP prefecture.\"",
          "type": "string"
        },
        "postalCodeNumber": {
          "description": "**OPTIONAL**: Despite the name, postal_code_number values are frequently alphanumeric. Examples: \"94043\", \"SW1W\", \"SW1W 9TQ\".",
          "type": "string"
        },
        "countryCode": {
          "description": "**OPTIONAL**: Customer address country code, expected to be ISO-3166-1 Alpha-2.",
          "type": "string"
        },
        "phone": {
          "description": "**OPTIONAL**: Customer's phone number.",
          "type": "string"
        },
        "emailAddress": {
          "description": "**OPTIONAL**: Customer's email address.",
          "type": "string"
        }
      }
    },
    "AsynchronousRefundRequest": {
      "description": "Request object for the payment integrator hosted `asynchronousRefund` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "transactionId": {
          "description": "**REQUIRED**: A unique identifier for this transaction. This is a `requestId` generated by Google. The call during which this `requestId` is generated will depend on the buy flow.",
          "type": "string"
        },
        "refundAmount": {
          "description": "**REQUIRED**: The amount of the refund. Must be a positive number.",
          "$ref": "#/definitions/Amount"
        }
      }
    },
    "AsynchronousRefundResponse": {
      "description": "Response object for the payment integrator hosted `asynchronousRefund` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: The result of the asynchronous refund call.",
          "$ref": "#/definitions/AsynchronousRefundResponseAsynchronousRefundResult"
        }
      }
    },
    "AsynchronousRefundResponseAsynchronousRefundResult": {
      "description": "Result codes for `asynchronousRefund`.",
      "type": "object",
      "properties": {
        "acknowledged": {
          "description": "The refund has been requested and the integrator will do additional steps to determine if the refund was successful. Once the integrator knows the result of the refund, they will inform Google of the result by calling the `refundResultNotification` API.",
          "$ref": "#/definitions/V2Empty"
        }
      }
    },
    "GenerateReferenceNumberRequest": {
      "description": "Request object for the `generateReferenceNumber` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "googlePaymentToken": {
          "description": "**REQUIRED**: This is the token that both companies will use to identify the account for purchases between each other.",
          "$ref": "#/definitions/GooglePaymentToken"
        },
        "transactionDescription": {
          "description": "**REQUIRED**: This is the description of the transaction that can be put on the customer's statement. Localized to the user's preferred language. This format can be changed without notice and must never be parsed.",
          "type": "string"
        },
        "amount": {
          "description": "**REQUIRED**: The amount of the purchase.",
          "$ref": "#/definitions/Amount"
        }
      }
    },
    "GenerateReferenceNumberResponse": {
      "description": "Response object for the `generateReferenceNumber` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Result of this `generateReferenceNumber` call.",
          "$ref": "#/definitions/GenerateReferenceNumberResponseGenerateReferenceNumberResult"
        }
      }
    },
    "GenerateReferenceNumberResponseGenerateReferenceNumberResult": {
      "description": "Result of this `generateReferenceNumber` call.",
      "type": "object",
      "properties": {
        "success": {
          "description": "Reference number is generated.",
          "$ref": "#/definitions/GenerateReferenceNumberResponseGenerateReferenceNumberResultSuccessDetails"
        },
        "googlePaymentTokenInvalidatedByUser": {
          "description": "The account is active, but the GPT has been invalidated by the user on the integrator's side. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again.",
          "$ref": "#/definitions/GooglePaymentTokenInvalidatedByUser"
        },
        "accountClosed": {
          "description": "The user's account held with the integrator has been closed. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again.",
          "$ref": "#/definitions/AccountClosed"
        }
      }
    },
    "GenerateReferenceNumberResponseGenerateReferenceNumberResultSuccessDetails": {
      "description": "Results are within this message.",
      "type": "object",
      "properties": {
        "displayableReferenceNumber": {
          "description": "**REQUIRED**: Reference number created by the integrator.",
          "$ref": "#/definitions/DisplayableReferenceNumber"
        }
      }
    },
    "DisplayableReferenceNumber": {
      "description": "This message contains a reference number for a transaction.",
      "type": "object",
      "properties": {
        "printableString": {
          "description": "The string value of the reference number. Normally, this string should not contain any whitespace. When displaying this string on UI, Google may insert whitespace for better readability. There is no max length limitation. However, the user\/cashier may need to type in this string. The shorter the better. Populate this field if we only need to show the reference number to the users.",
          "type": "string"
        },
        "barcodeContents": {
          "description": "The contents to encode in a barcode. Google's UIs can represent the reference number in the Code 128 format or QR code format. Other barcode formats can be supported by request. Populate this field if we only need to show a barcode to the users.",
          "type": "string"
        },
        "barcodeWithPrintableString": {
          "description": "Populate this field if we need to show both the reference number and a barcode to the users.",
          "$ref": "#/definitions/DisplayableReferenceNumberBarcodeWithPrintableString"
        }
      }
    },
    "DisplayableReferenceNumberBarcodeWithPrintableString": {
      "description": "This message contains a printable string and a barcode contents for the reference number.",
      "type": "object",
      "properties": {
        "printableString": {
          "description": "**REQUIRED** The string value of the reference number. Normally, this string should not contain any whitespace. When displaying this string on UI, Google may insert whitespace for better readability. There is no max length limitation. However, the user\/cashier may need to type in this string. The shorter the better.",
          "type": "string"
        },
        "barcodeContents": {
          "description": "**REQUIRED** The contents to encode in a barcode. Google's UIs can represent the reference number in the Code 128 format or QR code format. Other barcode formats can be supported by request.",
          "type": "string"
        }
      }
    },
    "GooglePaymentTokenInvalidatedByUser": {
      "description": "The account is active, but the GPT has been invalidated by the user 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"
        }
      }
    },
    "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"
        }
      }
    },
    "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"
        }
      }
    },
    "CancelReferenceNumberRequest": {
      "description": "Request object for the `cancelReferenceNumber` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "generateReferenceNumberRequestId": {
          "description": "**REQUIRED**: `requestId` of the `generateReferenceNumber` which generated the number to be cancelled.",
          "type": "string"
        }
      }
    },
    "CancelReferenceNumberResponse": {
      "description": "Response object for the `cancelReferenceNumber` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: The result of this `cancelReferenceNumber` call.",
          "$ref": "#/definitions/CancelReferenceNumberResponseCancelReferenceNumberResult"
        }
      }
    },
    "CancelReferenceNumberResponseCancelReferenceNumberResult": {
      "description": "Result of this `cancelReferenceNumber` call.",
      "type": "object",
      "properties": {
        "success": {
          "description": "Reference number successfully cancelled.",
          "$ref": "#/definitions/V2Empty"
        },
        "referenceNumberAlreadyPaid": {
          "description": "Reference number has already been paid. Google should expect a call to `referenceNumberPaidNotification` for this reference number soon.",
          "$ref": "#/definitions/V2Empty"
        }
      }
    },
    "RefundRequest": {
      "description": "Request object for the refund method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "transactionId": {
          "description": "**REQUIRED**: A unique identifier for this transaction. This is a `requestId` generated by Google. The call during which this `requestId` is generated will depend on the buy flow.",
          "type": "string"
        },
        "refundAmount": {
          "description": "**REQUIRED**: The amount of the refund. Must be a positive number.",
          "$ref": "#/definitions/Amount"
        }
      }
    },
    "RefundResponse": {
      "description": "Response object for the refund method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Result of this refund.",
          "$ref": "#/definitions/RefundResponseRefundResult"
        }
      }
    },
    "RefundResponseRefundResult": {
      "description": "Result codes for refunds.",
      "type": "object",
      "properties": {
        "success": {
          "description": "Successful refund.",
          "$ref": "#/definitions/V2Empty"
        },
        "accountClosed": {
          "description": "The account held with the integrator has been closed. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again.",
          "$ref": "#/definitions/AccountClosed"
        },
        "accountClosedAccountTakenOver": {
          "description": "The user's account with the integrator has been closed, suspected account take over. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again.",
          "$ref": "#/definitions/AccountClosedAccountTakenOver"
        },
        "accountClosedFraud": {
          "description": "The user's account held with the integrator has been closed because of fraud. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again.",
          "$ref": "#/definitions/AccountClosedFraud"
        },
        "accountOnHold": {
          "description": "The user's account is currently on hold and cannot accept the refund, but the user's account may later be able to accept the refund. Google may request another refund in the future, but will do so with a new `requestId`, so this request should be considered finished.",
          "$ref": "#/definitions/AccountOnHold"
        },
        "refundExceedsMaximumBalance": {
          "description": "The refund cannot be processed at the current time, because doing so would cause the user's balance to exceed the maximum allowed amount. Google may request another refund in the future, but will do so with a new `requestId`, so this request should be considered finished.",
          "$ref": "#/definitions/RefundExceedsMaximumBalance"
        },
        "refundWindowExceeded": {
          "description": "The refund cannot be processed because the request is outside of the allowed refund period.",
          "$ref": "#/definitions/RefundWindowExceeded"
        }
      }
    },
    "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"
        }
      }
    },
    "AuthenticationRequest": {
      "description": "Object sent during authentication request. Here's an example of a clear text JSON request: {\"requestId\": \"375dhjf9-Uydd=\"} The `AuthenticationRequest` is encrypted and signed using PGP or JWE+JWS. Further, this value is web-safe base64 encoded. This encoding is referred to below as `Base64UrlEncode`. In other words, the clear text JSON version of the `AuthenticationRequest` must be passed through the following functions: Base64UrlEncode( PGPSignAndEncrypt( {\"requestId\": \"375dhjf9-Uydd=\"} ) ) or Base64UrlEncode( JWSignAndEncrypt( {\"requestId\": \"375dhjf9-Uydd=\"} ) ) ",
      "type": "object",
      "properties": {
        "requestId": {
          "description": "**REQUIRED**: Identifier for this request.",
          "type": "string"
        },
        "associationId": {
          "description": "**OPTIONAL**: The ID that represents the association between a customer's Google Account and a customer's account with the vendor. If this authentication flow is being used to re-authenticate a user that has already gone through an Association flow, this field identifies the specific account with the vendor that the user must authenticate. This allows to ensure that the user does not (e.g.) accidentally authenticate using some other account. If this field is provided, the Payment Integrator must ensure that that the account being authenticated is tied to this `associationId`, and otherwise must return a failure.",
          "type": "string"
        },
        "paymentIntegratorAccountId": {
          "description": "**OPTIONAL**: This is the payment integrator account identifier that identifies contractual constraints around this transaction.",
          "type": "string"
        }
      }
    },
    "AuthenticationResponse": {
      "description": "Object sent during authentication response. Here's an example of a clear text JSON response: { \"associationId\": \"88ydEE-ioiwe==\", \"requestId\": \"375dhjf9-Uydd=\" } The `AuthenticationResponse` is encrypted and signed using PGP or JWE+JWS. Further, this value is web-safe base64 encoded. This encoding is referred to below as `Base64UrlEncode`. In other words, the clear text JSON version of the `AuthenticationRequest` must be passed through the following functions: Base64UrlEncode( PGPSignAndEncrypt( { \"associationId\": \"88ydEE-ioiwe==\", \"requestId\": \"375dhjf9-Uydd=\" } ) ) or Base64UrlEncode( JWSignAndEncrypt( { \"associationId\": \"88ydEE-ioiwe==\", \"requestId\": \"375dhjf9-Uydd=\" } ) ) ",
      "type": "object",
      "properties": {
        "associationId": {
          "description": "**OPTIONAL**: Reflected back by the payment integrator to Google. This allows Google to check that the associationId passed back is the same associationId passed in. This is required if it is present on the request.",
          "type": "string"
        },
        "requestId": {
          "description": "**REQUIRED**: Reflected back by the payment integrator to Google. This allows Google to prevent replay attacks.",
          "type": "string"
        },
        "authenticationResult": {
          "description": "**OPTIONAL**: The result of the authentication. For flows where there is no subsequent call to the Payment Integrator after the authentication has taken place, the result must be included in the response to ensure the integrity of the result.",
          "$ref": "#/definitions/AuthenticationResponseAuthenticationResult"
        }
      }
    },
    "AuthenticationResponseAuthenticationResult": {
      "description": "The result of the authentication.",
      "type": "object",
      "properties": {
        "success": {
          "description": "Authentication was successful.",
          "$ref": "#/definitions/V1Empty"
        },
        "cancelled": {
          "description": "User canceled the flow manually and the flow should be aborted.",
          "$ref": "#/definitions/V1Empty"
        },
        "fatalError": {
          "description": "Authentication failed for a fatal reason and the flow should be aborted.",
          "$ref": "#/definitions/V1Empty"
        }
      }
    },
    "V1Empty": {
      "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": {
      }
    }
  }
}
