{
  "swagger": "2.0",
  "info": {
    "title": "Google Standard Payments Google Hosted Korea e-Wallets API",
    "description": "This includes services hosted by Google for Korea e-Wallets.",
    "version": "v1"
  },
  "host": "vgw.googleapis.com",
  "basePath": "/gsp",
  "schemes": ["https"],
  "paths": {
    "/korea-e-wallets-v1/inquiryNotification": {
      "post": {
        "tags": ["vgw"],
        "operationId": "InquiryNotification",
        "description": "Notifies Google of a request for inquiry into a transaction. This signifies a user is contesting a payment but the issuer is requesting more information before deciding whether to issue a chargeback or not. No money movement occurs as a result of this call. Google may send details about the payment to the integrator to prove validity. If the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type `ErrorResponse` or contain a generic error (e.g. a message similar to \"There was an error. Please try again later.\"). The generic error is used in situations where an `ErrorResponse` with a clear description could be used to help an attacker understand the payment integrator account identifier of other integrators. In these situations, where either the signing key doesn't match, the payment integrator identifier was not found, or the encryption key was unknown, this method will return a generic error. If the request signature could be verified, additional information regarding the error will be returned in an `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"6bbeb443-7ebf-4307-9c5d-259534b1aede\", \"requestTimestamp\": \"1483711327000\" }, \"paymentIntegratorAccountId\": \"SpeedyPaymentsIndia_INR\", \"captureRequestId\": \"G112YZH4XPDV88J\", \"amount\": \"728000000\", \"reasonCode\": \"INCORRECT_MERCHANDISE\", \"rawResult\": { \"scope\": \"VISA\", \"rawCode\": \"04\" }, \"inquiryDate\": \"1481846400000\", \"replyByDate\": \"1487203200000\", \"caseId\": \"G-4732-1352-123\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1483711328134\" }, \"result\": \"SUCCESS\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/InquiryNotificationRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/InquiryNotificationResponse"
            }
          }
        }
      }
    },
    "/korea-e-wallets-v1/chargebackNotification": {
      "post": {
        "tags": ["vgw"],
        "operationId": "ChargebackNotification",
        "description": "Notifies Google that a chargeback is being issued for a payment. This signifies a user is contesting a payment and the issuer has decided to issue a chargeback. When the request is made it signifies that the user is being reimbursed by the issuer and will recover those funds either from the integrator or from Google. *Key Point:* These chargebacks can be challenged by Google through the documented representment process. If the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type `ErrorResponse` or contain a generic error (e.g. a message similar to \"There was an error. Please try again later.\"). The generic error is used in situations where an `ErrorResponse` with a clear description could be used to help an attacker understand the payment integrator account identifier of other integrators. In these situations, where either the signing key doesn't match, the payment integrator identifier was not found, or the encryption key was unknown, this method will return a generic error. If the request signature could be verified, additional information regarding the error will be returned in an `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"fe640ae3-d9af-4075-90a1-7b90f436b3c0\", \"requestTimestamp\": \"1484584747000\" }, \"paymentIntegratorAccountId\": \"SpeedyPaymentsIndia_INR\", \"captureRequestId\": \"G112YZH4XPDV88J\", \"amount\": \"728000000\", \"chargebackStage\": \"FIRST\", \"reasonCode\": \"INCORRECT_MERCHANDISE\", \"rawResult\": { \"scope\": \"VISA\", \"rawCode\": \"04\" }, \"chargebackDate\": \"1483574400000\", \"replyByDate\": \"1491350400000\", \"caseId\": \"G-7832-13512\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1484584747598\" }, \"result\": \"SUCCESS\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/ChargebackNotificationRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ChargebackNotificationResponse"
            }
          }
        }
      }
    },
    "/korea-e-wallets-v1/chargebackReversedNotification": {
      "post": {
        "tags": ["vgw"],
        "operationId": "ChargebackReversedNotification",
        "description": "Notifies Google that a chargeback is being reversed. This signifies the reversal of a chargeback. This means Google won the dispute and the funds taken with the chargeback can be represented to Google. If this was the first chargeback for a transaction the user or issuer may request a second chargeback with new or additional information. If the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type `ErrorResponse` or contain a generic error (e.g. a message similar to \"There was an error. Please try again later.\"). The generic error is used in situations where an `ErrorResponse` with a clear description could be used to help an attacker understand the payment integrator account identifier of other integrators. In these situations, where either the signing key doesn't match, the payment integrator identifier was not found, or the encryption key was unknown, this method will return a generic error. If the request signature could be verified, additional information regarding the error will be returned in an `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"8de12c67-6458-4a8a-b3d5-a10ecdbb3354\", \"requestTimestamp\": \"1488722866000\" }, \"paymentIntegratorAccountId\": \"SpeedyPaymentsIndia_INR\", \"chargebackRequestId\": \"fe640ae3-d9af-4075-90a1-7b90f436b3c0\", \"amount\": \"728000000\", \"rawResult\": { \"scope\": \"VISA\", \"rawCode\": \"03\" }, \"chargebackReversalDate\": \"1488585600000\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1488722868230\" }, \"result\": \"SUCCESS\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/ChargebackReversedNotificationRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ChargebackReversedNotificationResponse"
            }
          }
        }
      }
    },
    "/korea-e-wallets-v1/echo": {
      "post": {
        "tags": ["vgw"],
        "operationId": "Echo",
        "description": "Echos back the `clientMessage` passed in. The purpose of this method is to test basic connectivity between the payment integrator and Google. If the echo is successful, the endpoint will return an HTTP 200 and the response will be of type `EchoResponse`. If the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type `ErrorResponse` or contain a generic error (e.g. a message similar to \"There was an error. Please try again later.\"). The generic error is used in situations where an `ErrorResponse` with a clear description could be used to help an attacker understand the payment integrator account identifier of other integrators. In these situations, where either the signing key doesn't match, the payment integrator identifier was not found, or the encryption key was unknown, this method will return a generic error. If the request signature could be verified, additional information regarding the error will be returned in an `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"ZWNobyB0cmFuc2FjdGlvbg\", \"requestTimestamp\": \"1481899949606\" }, \"clientMessage\": \"client message\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1481900013178\" }, \"clientMessage\": \"client message\", \"serverMessage\": \"server message\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/EchoRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/EchoResponse"
            }
          }
        }
      }
    },
    "/korea-e-wallets-v1/getDisputeInquiryReport": {
      "post": {
        "tags": ["vgw"],
        "operationId": "GetDisputeInquiryReport",
        "description": "Get a report that provides information to facilitate a customer support conversation with a user regarding a potential dispute of a 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, \"minor\": 1, \"revision\": 0 }, \"requestId\": \"HsKv5pvtQKTtz7rdcw1YqE\", \"requestTimestamp\": \"1519996751331\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA\", \"paymentLookupCriteria\": { \"googleTransactionReferenceNumberCriteria\": { \"googleTransactionReferenceNumber\": \"714545417102363157911822\", \"authorizationCode\": \"111111\" } }, \"existingGoogleClaimId\": \"138431383281\", \"requestOriginator\": { \"organizationId\": \"ISSUER_256\", \"organizationDescription\": \"Community Bank of Some City\", \"agentId\": \"982749\" } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1519996752221\" }, \"result\": \"SUCCESS\", \"googleClaimId\": \"138431383281\", \"report\": { \"customerAccount\": { \"customerEmail\": \"example@gmail.com\", \"customerName\" : \"Example Customer\" }, \"order\": { \"timestamp\": \"1517992525972\", \"orderId\": \"SOP.8976-1234-1234-123456..99\", \"currencyCode\": \"USD\", \"subTotalAmount\": \"206990000\", \"totalAmount\": \"212990000\", \"shippingAddress\": { \"name\": \"Example Customer\", \"addressLine\": [\"123 Main St\"], \"localityName\": \"Springfield\", \"administrativeAreaName\": \"CO\", \"postalCodeNumber\": \"80309\", \"countryCode\": \"US\" }, \"taxes\": [ { \"description\": \"Colorado Sales Tax\", \"amount\": \"6000000\" } ], \"items\": [ { \"description\": \"Super cool gizmo\", \"merchant\": \"HTC\", \"googleProductName\": \"Google Store\", \"quantity\": \"2\", \"totalPrice\": \"198000000\" }, { \"description\": \"Gizmo charger\", \"merchant\": \"HTC\", \"googleProductName\": \"Google Store\", \"quantity\": \"1\", \"totalPrice\": \"8990000\" } ] }, \"payment\": { \"billingAddress\" : { \"name\": \"Example Customer\", \"addressLine\": [\"123 Main St\"], \"localityName\": \"Springfield\", \"administrativeAreaName\": \"CO\", \"postalCodeNumber\": \"80309\", \"countryCode\": \"US\" }, \"amount\": \"100000000\", \"refunds\": [ { \"amount\": \"9250000\", \"initiatedTimestamp\": \"1518811245384\" } ], \"cardDetails\": { \"authResult\": \"APPROVED\" } } } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/GetDisputeInquiryReportRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/GetDisputeInquiryReportResponse"
            }
          }
        }
      }
    },
    "/korea-e-wallets-v1/remittanceStatementDetails": {
      "post": {
        "tags": ["vgw"],
        "operationId": "RemittanceStatementDetails",
        "description": "Returns transaction detail information about a remittance statement. This is a paginated API. The number of transaction events per page can be specified with `numberOfEvents`. If unspecified, the maximum of 1000 events will be returned per page. Each request to this API will return a `nextEventOffset` pointing to the next transaction event in the statement, as well as `totalEvents` specifying the total number of transactions in the statement. If the current retrieved page contains the last transactions of the statement, `nextEventOffset` will not be present in the response. The `statementId` value is the `requestId` from the request to `remittanceStatementNotification` If the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type `ErrorResponse` or contain a generic error (e.g. a message similar to \"There was an error. Please try again later.\"). The generic error is used in situations where an `ErrorResponse` with a clear description could be used to help an attacker understand the payment integrator account identifier of other integrators. In these situations, where either the signing key doesn't match, the payment integrator identifier was not found, or the encryption key was unknown, this method will return a generic error. If the request signature could be verified, additional information regarding the error will be returned in an `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"statement_detail_request_139932019\", \"requestTimestamp\": \"1502551332087\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"statementId\": \"0123434-statement-abc\", \"numberOfEvents\": 4 } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1481900013178\" }, \"eventOffset\": 0, \"nextEventOffset\": 4, \"totalEvents\": 15, \"remittanceStatementSummary\": { \"statementDate\": \"1502521200000\", \"billingPeriod\": { \"startDate\": \"1502434800000\", \"endDate\": \"1502434800000\" }, \"dateDue\": \"1502348400000\", \"currencyCode\": \"INR\", \"totalDueByIntegrator\": \"1076000000\", \"totalPresentmentAmounts\": [ { \"amountMicros\": \"1076000000\", \"currencyCode\": \"INR\" } ], \"remittanceInstructions\": { \"memoLineId\": \"stmt-1AB-pp0-invisi\" } }, \"captureEvents\": [ { \"eventRequestId\": \"bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ\", \"paymentIntegratorEventId\": \"ioj32SOIjf23oijSDfoij\", \"eventCharge\": \"700000000\", \"eventFee\": \"-28000000\" }, { \"eventRequestId\": \"Ggghvh78200PQ3Yrpb\", \"paymentIntegratorEventId\": \"iasdf23dSdfijSDfoij\", \"eventCharge\": \"800000000\", \"eventFee\": \"-32000000\" } ], \"refundEvents\": [ { \"eventRequestId\": \"liUrreQY233839dfFFb24gaQM\", \"paymentIntegratorEventId\": \"asd3SDf3f3oijSDfoij\", \"eventCharge\": \"-200000000\", \"eventFee\": \"8000000\" }, { \"eventRequestId\": \"IIghhhUrreQY233839II9qM==\", \"paymentIntegratorEventId\": \"DFjidoso12FSDFSDE\", \"eventCharge\": \"-150000000\", \"eventFee\": \"6000000\" } ] } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/RemittanceStatementDetailsRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/RemittanceStatementDetailsResponse"
            }
          }
        }
      }
    },
    "/korea-e-wallets-v1/acceptRemittanceStatement": {
      "post": {
        "tags": ["vgw"],
        "operationId": "AcceptRemittanceStatement",
        "description": "Tells Google that the statement indicated in this request will be paid. If the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type `ErrorResponse` or contain a generic error (e.g. a message similar to \"There was an error. Please try again later.\"). The generic error is used in situations where an `ErrorResponse` with a clear description could be used to help an attacker understand the payment integrator account identifier of other integrators. In these situations, where either the signing key doesn't match, the payment integrator identifier was not found, or the encryption key was unknown, this method will return a generic error. If the request signature could be verified, additional information regarding the error will be returned in an `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"0123434-abc\", \"requestTimestamp\": \"1502545413098\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"statementId\": \"0123434-statement-abc\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1519996752221\" }, \"acceptRemittanceStatementResultCode\": \"SUCCESS\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/AcceptRemittanceStatementRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/AcceptRemittanceStatementResponse"
            }
          }
        }
      }
    },
    "/korea-e-wallets-v1/acceptRemittanceStatementWithModifications": {
      "post": {
        "tags": ["vgw"],
        "operationId": "AcceptRemittanceStatementWithModifications",
        "description": "Tells Google that the statement indicated in this request will be paid after modifications are made to the statement such as fee to VAT reclassification. If the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type `ErrorResponse` or contain a generic error (e.g. a message similar to \"There was an error. Please try again later.\"). The generic error is used in situations where an `ErrorResponse` with a clear description could be used to help an attacker understand the payment integrator account identifier of other integrators. In these situations, where either the signing key doesn't match, the payment integrator identifier was not found, or the encryption key was unknown, this method will return a generic error. If the request signature could be verified, additional information regarding the error will be returned in an `ErrorResponse`. An example request looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"0123434-abc\", \"requestTimestamp\": \"1502545413098\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"statementId\": \"0123434-statement-abc\", \"feeToVatModification\": { \"vatToFeeRatioInMicros\": \"150000\" } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1519996752221\" }, \"acceptRemittanceStatementWithModificationsResultCode\": \"SUCCESS\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/AcceptRemittanceStatementWithModificationsRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/AcceptRemittanceStatementWithModificationsResponse"
            }
          }
        }
      }
    },
    "/korea-e-wallets-v1/captureResultNotification": {
      "post": {
        "tags": ["vgw"],
        "operationId": "CaptureResultNotification",
        "description": "Notify Google of the result of a capture after a `capture` or `asynchronousCapture` method call has been made. The `captureResult` value is idempotent for this `captureRequestId`, so its value cannot 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, \"minor\": 1, \"revision\": 0 }, \"requestId\": \"KcgwSKrV76eVNDUbsZ4UA3\", \"requestTimestamp\": \"1481852928293\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"captureRequestId\": \"awNaC510cefae3IJdNEvW2\", \"captureResult\": { \"captureResultCode\": \"SUCCESS\" } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1481852928324\" }, \"result\": \"SUCCESS\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/CaptureResultNotificationRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/CaptureResultNotificationResponse"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "InquiryNotificationRequest": {
      "description": "Request object for Google hosted InquiryNotification method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this transaction.",
          "type": "string"
        },
        "captureRequestId": {
          "description": "**REQUIRED**: A unique identifier for the capture that the inquiry is associated with. This is the `requestId` generated by Google during the `captureFundsReservation` or `capture` which this request is associated with.",
          "type": "string"
        },
        "amount": {
          "description": "**REQUIRED**: The amount associated with the inquiry, in [micros]({{glossary_path}}#micros \"What are micros?\") of the currency unit. This must be greater than zero and less than or equal to the amount in the`capture` or `captureFundsReservation` request and is in the same currency unit as the capture.",
          "type": "string",
          "format": "int64"
        },
        "reasonCode": {
          "description": "**REQUIRED**: The reason for the inquiry.",
          "type": "string",
          "enum": [
            "UNKNOWN_REASON",
            "FRAUD",
            "FAMILIAR_FRAUD",
            "SUSPICIOUS",
            "CHARGE_NOT_RECOGNIZED",
            "CREDIT_NOT_PROCESSED",
            "DUPLICATE_PAYMENT",
            "SUBSCRIPTION_CANCELED",
            "INPUT_ERROR",
            "INSUFFICIENT_FUNDS",
            "NOT_DELIVERED",
            "DEFECTIVE_OR_NOT_AS_DESCRIBED",
            "INCORRECT_MERCHANDISE",
            "UNWANTED_MERCHANDISE",
            "TRANSACTION_AMOUNT_DIFFER",
            "PAID_BY_OTHER_MEANS",
            "LATE_PRESENTMENT"
          ]
        },
        "rawResult": {
          "description": "**REQUIRED**: Raw result of the inquiry request from the issuer. Used to help inform Google's risk engine and analytics. 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 inquiry 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"
        },
        "inquiryDate": {
          "description": "**REQUIRED** Timestamp of the date that the inquiry was requested. If that date is not known then it should be the date that the payment integrator received the notification for an inquiry. It is represented as milliseconds since epoch. This is a date and therefore should be the first millisecond of the day in the America\/Los Angeles timezone. If it is not the first millisecond of the day the date will be assumed to be the day the specified millisecond falls on in the America\/Los Angeles time zone.",
          "type": "string",
          "format": "int64"
        },
        "replyByDate": {
          "description": "**REQUIRED**: Timestamp of the date by which a reply must be received by the payment integrator. It is represented as milliseconds since epoch. This is a date and therefore should be the first millisecond of the day in the America\/Los Angeles timezone. If it is not the first millisecond of the day the date will be assumed to be the day the specified millisecond falls on in the America\/Los Angeles time zone.",
          "type": "string",
          "format": "int64"
        },
        "caseId": {
          "description": "**REQUIRED**: A unique value assigned to each dispute that the issuer and payment integrator can use to identify this dispute.",
          "type": "string"
        }
      }
    },
    "RequestHeader": {
      "description": "Header object that is defined on all requests sent to the server.",
      "type": "object",
      "properties": {
        "requestId": {
          "description": "**REQUIRED**: Unique identifier of this request. This is a string that has a max length of 100 characters, and contains only the characters \"a-z\", \"A-Z\", \"0-9\", \":\", \"-\", and \"_\".",
          "type": "string"
        },
        "requestTimestamp": {
          "description": "**REQUIRED**: Timestamp of this request represented as milliseconds since epoch. The receiver should verify that this timestamp is \u00B1 60s of 'now'. This request timestamp is not idempotent upon retries.",
          "type": "string",
          "format": "int64"
        },
        "userLocale": {
          "description": "**DEPRECATED**: A two- or three-letter ISO 639-2 Alpha 3 language code optionally followed by a hyphen and an ISO 3166-1 Alpha-2 country code, e.g.'pt', 'pt-BR', 'fil', or 'fil-PH'. Use this to help drive the `userMessage` fields in the response.",
          "type": "string"
        },
        "protocolVersion": {
          "description": "**REQUIRED**: The version of this request.",
          "$ref": "#/definitions/Version"
        }
      }
    },
    "Version": {
      "description": "Version object which is a structured form of the classic `a.b.c` version structure. Major versions of the same number are guaranteed to be compatible. Note that minor and revisions can change frequently and without notice. The integrator must support all requests for the same major version.",
      "type": "object",
      "properties": {
        "major": {
          "description": "**REQUIRED**: Major version. This is marked for compatibility requests with different versions are not guaranteed to be compatible.",
          "type": "integer",
          "format": "int32"
        },
        "minor": {
          "description": "**REQUIRED**: Minor version. This denotes significant bug fixes.",
          "type": "integer",
          "format": "int32"
        },
        "revision": {
          "description": "**REQUIRED**: Minor version. This denotes minor bug fixes.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "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"
        }
      }
    },
    "InquiryNotificationResponse": {
      "description": "Response object for Google hosted InquiryNotification method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Result of this call.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS"
          ]
        }
      }
    },
    "ResponseHeader": {
      "description": "Header object that is defined on all responses sent from the server.",
      "type": "object",
      "properties": {
        "responseTimestamp": {
          "description": "**REQUIRED**: Timestamp of this response represented as milliseconds since epoch. The receiver should verify that this timestamp is \u00B1 60s of 'now'.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "ErrorResponse": {
      "description": "Error Response object for all methods.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "errorResponseCode": {
          "description": "**OPTIONAL**: A code that captures the type of error that occurred.",
          "type": "string",
          "enum": [
            "UNKNOWN_ERROR_RESPONSE_CODE",
            "INVALID_API_VERSION",
            "INVALID_PAYLOAD_SIGNATURE",
            "INVALID_PAYLOAD_ENCRYPTION",
            "REQUEST_TIMESTAMP_OUT_OF_RANGE",
            "INVALID_IDENTIFIER",
            "IDEMPOTENCY_VIOLATION",
            "INVALID_FIELD_VALUE",
            "MISSING_REQUIRED_FIELD",
            "PRECONDITION_VIOLATION",
            "USER_ACTION_IN_PROGRESS",
            "INVALID_DECRYPTED_REQUEST",
            "FORBIDDEN"
          ]
        },
        "errorDescription": {
          "description": "**OPTIONAL**: Provide a description of this status for support reps to debug errors. Note that this is never shown to users. It can contain descriptive, non-sensitive text used for debugging. Note that some values for errorResponseCode should be accompanied by additional detail in this field. For example, `INVALID_IDENTIFIER` should be accompanied by information in this field as to which type of identifier was invalid. Warning: Do not include any tokens in this message unless they are defined as public.",
          "type": "string"
        },
        "paymentIntegratorErrorIdentifier": {
          "description": "**OPTIONAL**: This identifier is specific to the integrator and is generated by the integrator. It is used for debugging purposes only in order to identify this call. This is the identifier that the integrator knows this call by.",
          "type": "string"
        }
      }
    },
    "ChargebackNotificationRequest": {
      "description": "Request object for Google hosted ChargebackNotification method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this transaction.",
          "type": "string"
        },
        "captureRequestId": {
          "description": "**REQUIRED**: A unique identifier for the capture that the chargeback is associated with. This is the `requestId` generated by Google during the `captureFundsReservation` or `capture` which this request is associated with.",
          "type": "string"
        },
        "amount": {
          "description": "**REQUIRED**: The amount of the chargeback, in [micros]({{glossary_path}}#micros \"What are micros?\") of the currency unit. This must be greater than zero and less than or equal to the amount in the `capture` or `captureFundsReservation` request and is in the same currency unit as the capture.",
          "type": "string",
          "format": "int64"
        },
        "chargebackStage": {
          "description": "**REQUIRED**: This represents whether this was the first or second chargeback event for this capture. A second chargeback, also known as Second Presentment or Pre-arbitration is when the result of an initial chargeback was challenged. The second chargeback is a separate event that can also be reversed. Once a second chargeback event has occurred the payment is in a terminal state and no subsequent chargeback events can be added.",
          "type": "string",
          "enum": [
            "UNKNOWN_STAGE",
            "FIRST",
            "SECOND"
          ]
        },
        "reasonCode": {
          "description": "**REQUIRED**: The reason the transaction is being charged back.",
          "type": "string",
          "enum": [
            "UNKNOWN_REASON",
            "FRAUD",
            "FAMILIAR_FRAUD",
            "SUSPICIOUS",
            "CHARGE_NOT_RECOGNIZED",
            "CREDIT_NOT_PROCESSED",
            "DUPLICATE_PAYMENT",
            "SUBSCRIPTION_CANCELED",
            "INPUT_ERROR",
            "INSUFFICIENT_FUNDS",
            "NOT_DELIVERED",
            "DEFECTIVE_OR_NOT_AS_DESCRIBED",
            "INCORRECT_MERCHANDISE",
            "UNWANTED_MERCHANDISE",
            "TRANSACTION_AMOUNT_DIFFER",
            "PAID_BY_OTHER_MEANS",
            "LATE_PRESENTMENT"
          ]
        },
        "rawResult": {
          "description": "**REQUIRED**: Raw result of the chargeback request from the issuer. 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 chargeback 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"
        },
        "chargebackDate": {
          "description": "**REQUIRED** Timestamp of the date that the chargeback was requested. If that date is not known then the date that the payment integrator received the notification for a chargeback. It is represented as milliseconds since epoch. This is a date and therefore should be the first millisecond of the day in the America\/Los Angeles timezone. If it is not the first millisecond of the day the date will be assumed to be the day the specified millisecond falls on in the America\/Los Angeles time zone.",
          "type": "string",
          "format": "int64"
        },
        "replyByDate": {
          "description": "**REQUIRED**: Timestamp of the date by which a reply must be received by the payment integrator if Google chooses to represent the transaction and challenge the chargeback. It is represented as milliseconds since epoch. This is a date and therefore should be the first millisecond of the day in the America\/Los Angeles timezone. If it is not the first millisecond of the day the date will be assumed to be the day the specified millisecond falls on in the America\/Los Angeles time zone.",
          "type": "string",
          "format": "int64"
        },
        "caseId": {
          "description": "**REQUIRED**: A unique value assigned to each chargeback that the issuer and payment integrator can use to identify this chargeback.",
          "type": "string"
        }
      }
    },
    "ChargebackNotificationResponse": {
      "description": "Response object for Google hosted ChargebackNotification method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Result of this call.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS"
          ]
        }
      }
    },
    "ChargebackReversedNotificationRequest": {
      "description": "Request object for Google hosted ChargebackReversedNotification method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this transaction.",
          "type": "string"
        },
        "chargebackRequestId": {
          "description": "**REQUIRED**: A unique identifier for the chargeback that is being reversed. This is the `requestId` generated by the integrator during the `ChargebackNotification` this request is associated with.",
          "type": "string"
        },
        "amount": {
          "description": "**REQUIRED**: The amount being reversed, in [micros]({{glossary_path}}#micros \"What are micros?\") of the currency unit. This must be greater than zero and less than or equal to the amount in the`ChargebackNotification`. It is in same currency unit as the `captureFundsReservation` or `capture`.",
          "type": "string",
          "format": "int64"
        },
        "rawResult": {
          "description": "**REQUIRED**: The raw result from the network on why the chargeback is being reversed. Used for informational purposes.",
          "$ref": "#/definitions/RawResult"
        },
        "chargebackReversalDate": {
          "description": "**REQUIRED** Timestamp of the date that the chargeback was reversed. If the date is not known, then this is the date that the payment integrator received the notification for the reversal. It is represented as milliseconds since epoch. This is a date and therefore should be the first millisecond of the day in the America\/Los Angeles timezone. If it is not the first millisecond of the day the date will be assumed to be the day the specified millisecond falls on in the America\/Los Angeles time zone.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "ChargebackReversedNotificationResponse": {
      "description": "Response object for Google hosted ChargebackReversedNotification method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Result of this call.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS"
          ]
        }
      }
    },
    "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"
        }
      }
    },
    "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"
        }
      }
    },
    "GetDisputeInquiryReportRequest": {
      "description": "Request payload for the `getDisputeInquiryReport` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: The payment integrator account identifier that identifies the caller and associated contractual constraints for this interaction.",
          "type": "string"
        },
        "paymentLookupCriteria": {
          "description": "**REQUIRED**: Criteria indicating the payment that is to be looked up for this inquiry.",
          "$ref": "#/definitions/PaymentLookupCriteria"
        },
        "existingGoogleClaimId": {
          "description": "**OPTIONAL**: A Google-generated string returned by a previous call to `getDisputeInquiryReport` that uniquely identifies this customer dispute claim. If this is not present, a new claim ID will be be generated. The caller may provide a `googleClaimId` that was returned by a previous call to `getDisputeInquiryReport` if it is a continuation of the same customer dispute. The claim ID that is populated here or generated will be returned in the response's `googleClaimId` field. It is not valid to provide a `googleClaimId` that wasn't returned by a previous call to `getDisputeInquiryReport`. If this occurs, HTTP 400 Bad Request will be returned.",
          "type": "string"
        },
        "requestOriginator": {
          "description": "**REQUIRED**: Information about the organization or organizational sub-group that originated this request.",
          "$ref": "#/definitions/RequestOriginator"
        }
      }
    },
    "PaymentLookupCriteria": {
      "description": "Container for criteria that can uniquely lookup a payment. One (and only one) member field must be populated.",
      "type": "object",
      "properties": {
        "arnCriteria": {
          "description": "Lookup based on Acquirer Reference Number (ARN).",
          "$ref": "#/definitions/PaymentLookupCriteriaArnCriteria"
        },
        "googleTransactionReferenceNumberCriteria": {
          "description": "Lookup based on the Google Transaction Reference Number.",
          "$ref": "#/definitions/PaymentLookupCriteriaGoogleTransactionReferenceNumberCriteria"
        },
        "captureRequestCriteria": {
          "description": "Lookup based on the Capture Request ID.",
          "$ref": "#/definitions/PaymentLookupCriteriaCaptureRequestCriteria"
        }
      }
    },
    "PaymentLookupCriteriaArnCriteria": {
      "description": "Payment lookup criteria based on Acquirer Reference Number (ARN).",
      "type": "object",
      "properties": {
        "acquirerReferenceNumber": {
          "description": "**REQUIRED**: The Acquirer Reference Number (ARN) that uniquely identifies the payment. Must be 23 digits long.",
          "type": "string"
        },
        "authorizationCode": {
          "description": "**REQUIRED**: The Authorization Code for the transaction.",
          "type": "string"
        }
      }
    },
    "PaymentLookupCriteriaGoogleTransactionReferenceNumberCriteria": {
      "description": "Payment lookup criteria based on the Google-generated Transaction Reference Number.",
      "type": "object",
      "properties": {
        "googleTransactionReferenceNumber": {
          "description": "**REQUIRED**: The Google-generated Transaction Reference Number that uniquely identifies the payment.",
          "type": "string"
        },
        "authorizationCode": {
          "description": "**REQUIRED**: The Authorization Code for the transaction.",
          "type": "string"
        }
      }
    },
    "PaymentLookupCriteriaCaptureRequestCriteria": {
      "description": "Payment lookup criteria based on Capture Request ID",
      "type": "object",
      "properties": {
        "captureRequestId": {
          "description": "**REQUIRED**: A unique identifier for this transaction. This is the `requestId` generated by Google during the `capture` call which is being looked up.",
          "type": "string"
        }
      }
    },
    "RequestOriginator": {
      "description": "Information about the organization or organizational sub-group, and optionally the employee, from which this request originated. This allows Google to identify issues or abuse and implement controls at a finer-grained level than the `paymentIntegratorAccountId`. It is especially valuable when the caller is an intermediary service provider that sources requests from multiple external clients.",
      "type": "object",
      "properties": {
        "organizationId": {
          "description": "**REQUIRED**: An identifier of the company, organization, or organizational group from which this request originated. Must be unique within this `paymentIntegratorAccountId`.",
          "type": "string"
        },
        "organizationDescription": {
          "description": "**REQUIRED**: A human-readable name or description of the organization that can be used to ease communication between employees of Google and the integrator regarding that organization.",
          "type": "string"
        },
        "agentId": {
          "description": "**OPTIONAL**: A unique identifier for the specific agent (employee) of the organization identified by `organizationId` from whom this request originated. Must be unique within this `organizationId`.",
          "type": "string"
        }
      }
    },
    "GetDisputeInquiryReportResponse": {
      "description": "Response payload for the `getDisputeInquiryReport` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Result of this call.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS",
            "PAYMENT_NOT_FOUND",
            "PAYMENT_TOO_OLD",
            "ORDER_CANNOT_BE_RETURNED",
            "NO_ADDITIONAL_DETAILS"
          ]
        },
        "googleClaimId": {
          "description": "**OPTIONAL**: A Google-generated string that uniquely identifies this customer dispute. (Present if and only if `result` is SUCCESS.) If `existingGoogleClaimId` was populated in the request, this will be the same value. Otherwise, it will be a newly generated value. This value can be provided in future `getDisputeInquiryReport` requests if they are part of the same customer dispute.",
          "type": "string"
        },
        "report": {
          "description": "**OPTIONAL**: Details relevant to the dispute of the payment identified in the request. (Present if and only if `result` is SUCCESS.)",
          "$ref": "#/definitions/PurchaseReport"
        }
      }
    },
    "PurchaseReport": {
      "description": "A report containing relevant details of the purchase associated with the requested payment.",
      "type": "object",
      "properties": {
        "customerAccount": {
          "description": "**REQUIRED**: Information regarding the customer and their account.",
          "$ref": "#/definitions/PurchaseReportCustomerAccount"
        },
        "order": {
          "description": "**REQUIRED**: Information regarding the order on which the payment was made.",
          "$ref": "#/definitions/PurchaseReportOrder"
        },
        "payment": {
          "description": "**OPTIONAL**: Information regarding the payment. Note: Multiple payments are possible on a single order, but this will only contain info for the payment that was identified in the original request. Not available for all order types.",
          "$ref": "#/definitions/PurchaseReportPayment"
        }
      }
    },
    "PurchaseReportCustomerAccount": {
      "description": "Information about the customer's account",
      "type": "object",
      "properties": {
        "customerEmail": {
          "description": "**REQUIRED**: The email address associated with the customer\u2019s Google account.",
          "type": "string"
        },
        "customerName": {
          "description": "**REQUIRED**: The customer\u2019s name.",
          "type": "string"
        }
      }
    },
    "PurchaseReportOrder": {
      "description": "Information about the order.",
      "type": "object",
      "properties": {
        "timestamp": {
          "description": "**OPTIONAL**: Timestamp of when the order was made, represented as milliseconds since epoch. Not available for all order types.",
          "type": "string",
          "format": "int64"
        },
        "orderId": {
          "description": "**OPTIONAL**: A string uniquely identifying this order. Not available for all order types.",
          "type": "string"
        },
        "currencyCode": {
          "description": "**OPTIONAL**: ISO 4217 3-letter currency code for all amounts in this order. Not available for all order types.",
          "type": "string"
        },
        "subTotalAmount": {
          "description": "**OPTIONAL**: Total amount of this order before tax, represented as [micros]({{glossary_path}}#micros \"What are micros?\") of the currency specified in `order.currencyCode`. This is equal to `SUM(items.totalPrice)`. Not available for all order types.",
          "type": "string",
          "format": "int64"
        },
        "totalAmount": {
          "description": "**OPTIONAL**: Total amount of this order including tax, represented as [micros]({{glossary_path}}#micros \"What are micros?\") of the currency specified in `order.currencyCode`. This is equal to `subTotalAmount + SUM(taxes.amount)`. Not available for all order types.",
          "type": "string",
          "format": "int64"
        },
        "shippingAddress": {
          "description": "**OPTIONAL**: Shipping address for physical items in this order.",
          "$ref": "#/definitions/Address"
        },
        "items": {
          "description": "**REQUIRED**: List of items that were part of this order.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PurchaseReportOrderItem"
          }
        },
        "taxes": {
          "description": "**REQUIRED**: List of items that were part of this order. This list may be empty.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PurchaseReportOrderTax"
          }
        }
      }
    },
    "Address": {
      "description": "Structure holding information about an address.",
      "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"
        }
      }
    },
    "PurchaseReportOrderItem": {
      "description": "Information about an item in the order.",
      "type": "object",
      "properties": {
        "description": {
          "description": "**OPTIONAL**: A description of the item that was purchased. Not available for all order types.",
          "type": "string"
        },
        "merchant": {
          "description": "**REQUIRED**: The seller, artist, or maker of the item.",
          "type": "string"
        },
        "quantity": {
          "description": "**OPTIONAL**: The quantity that were ordered of this item. This field will be omitted if integer quantities are not applicable to the product (metered products may have fractional quantities for example).",
          "type": "string",
          "format": "int64"
        },
        "totalPrice": {
          "description": "**OPTIONAL**: The total price of this item, represented as [micros]({{glossary_path}}#micros \"What are micros?\") of the currency specified in `order.currencyCode`. If `quantity` is populated, this reflects the total price of the entire quantity. Not available for all order types.",
          "type": "string",
          "format": "int64"
        },
        "googleProductName": {
          "description": "**REQUIRED**: Name of Google product service for the item.",
          "type": "string"
        }
      }
    },
    "PurchaseReportOrderTax": {
      "description": "Information about a tax that applies to this order.",
      "type": "object",
      "properties": {
        "description": {
          "description": "**REQUIRED**: A description of the tax.",
          "type": "string"
        },
        "amount": {
          "description": "**REQUIRED**: The amount of the tax, represented as [micros]({{glossary_path}}#micros \"What are micros?\") of the currency specified in `order.currencyCode`.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "PurchaseReportPayment": {
      "description": "Information about the payment.",
      "type": "object",
      "properties": {
        "billingAddress": {
          "description": "**REQUIRED**: Billing address for this payment.",
          "$ref": "#/definitions/Address"
        },
        "amount": {
          "description": "**REQUIRED**: Amount of this payment, represented as [micros]({{glossary_path}}#micros \"What are micros?\") of the currency specified in `order.currencyCode`. Note: This may not match the `order.totalAmount` if the order was paid by way of multiple payments.",
          "type": "string",
          "format": "int64"
        },
        "refunds": {
          "description": "**REQUIRED**: List of refunds made to this payment. This list may be empty.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PurchaseReportPaymentRefund"
          }
        },
        "cardDetails": {
          "description": "Payment details specific to credit & debit card FoPs.",
          "$ref": "#/definitions/PurchaseReportPaymentPaymentCardDetails"
        }
      }
    },
    "PurchaseReportPaymentRefund": {
      "description": "Information about a refund made on a payment.",
      "type": "object",
      "properties": {
        "amount": {
          "description": "**REQUIRED**: The amount refunded, a positive number of [micros]({{glossary_path}}#micros \"What are micros?\") of the currency specified in `order.currencyCode`.",
          "type": "string",
          "format": "int64"
        },
        "initiatedTimestamp": {
          "description": "**REQUIRED**: Timestamp of when the refund was initiated, represented as milliseconds since epoch.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "PurchaseReportPaymentPaymentCardDetails": {
      "description": "Payment details specific to credit & debit cards.",
      "type": "object",
      "properties": {
        "authResult": {
          "description": "**REQUIRED**: Result of payment auth.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "APPROVED",
            "DENIED",
            "NOT_ATTEMPTED"
          ]
        }
      }
    },
    "RemittanceStatementDetailsRequest": {
      "description": "Request object for the remittance statement detail method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this statement.",
          "type": "string"
        },
        "statementId": {
          "description": "**REQUIRED**: Request ID of the statement notification.",
          "type": "string"
        },
        "eventOffset": {
          "description": "**OPTIONAL**: Return events starting at this offset. This should be set to the `nextEventOffset` if one was returned or left unspecified if this is the first request. If `eventOffset` is zero, events will be returned starting with the first event. If this is two, events will be returned starting with the third event. If unspecified, `eventOffset` will be assumed to be zero. *Note:* If `eventOffset` exceeds the total number of events (i.e. `eventOffset` >= `totalEvents`) then no events will be returned. ",
          "type": "integer",
          "format": "int32"
        },
        "numberOfEvents": {
          "description": "**OPTIONAL**: Number of events to show per page. If unspecified or greater than 1000, this will be 1000.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "RemittanceStatementDetailsResponse": {
      "description": "Response object for the remittance statement detail method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "remittanceStatementSummary": {
          "description": "**REQUIRED**: Summary of this remittance statement.",
          "$ref": "#/definitions/RemittanceStatementSummary"
        },
        "eventOffset": {
          "description": "**REQUIRED**: The event offset of this response.",
          "type": "integer",
          "format": "int32"
        },
        "nextEventOffset": {
          "description": "**OPTIONAL**: The offset of the next event to return. If unspecified there are no more events to retrieve for this statement.",
          "type": "integer",
          "format": "int32"
        },
        "totalEvents": {
          "description": "**REQUIRED**: Total number of events in this statement.",
          "type": "integer",
          "format": "int32"
        },
        "totalWithholdingTaxes": {
          "description": "**REQUIRED**: The sum of all taxes withheld for this statement. This value is in [micros]({{glossary_path}}#micros \"What are micros?\").",
          "type": "string",
          "format": "int64"
        },
        "captureEvents": {
          "description": "**REQUIRED**: Set of capture events. *Note:* this is a set, it has no defined order. ",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RemittanceStatementDetailsResponseEvent"
          }
        },
        "refundEvents": {
          "description": "**REQUIRED**: Set of refund events. *Note:* this is a set, it has no defined order. ",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RemittanceStatementDetailsResponseEvent"
          }
        },
        "reverseRefundEvents": {
          "description": "**OPTIONAL**: Set of reverse refund events. *Note:* this is a set, it has no defined order. ",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RemittanceStatementDetailsResponseEvent"
          }
        },
        "chargebackEvents": {
          "description": "**OPTIONAL**: Set of chargeback events. *Note:* this is a set, it has no defined order. ",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RemittanceStatementDetailsResponseEvent"
          }
        },
        "reverseChargebackEvents": {
          "description": "**OPTIONAL**: Set of reverse chargeback events. *Note:* this is a set, it has no defined order. ",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RemittanceStatementDetailsResponseEvent"
          }
        },
        "adjustmentEvents": {
          "description": "**OPTIONAL**: Set of adjustment events. Adjustment events may be added at Google's discretion to reconcile billing discrepancies, for example if fees were undercomputed for a set of prior transactions, an adjustment may be used to make the integrator whole. *Note:* this is a set, it has no defined order. ",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RemittanceStatementDetailsResponseEvent"
          }
        }
      }
    },
    "RemittanceStatementSummary": {
      "description": "Summary object about a remittance statement.",
      "type": "object",
      "properties": {
        "statementDate": {
          "description": "**REQUIRED**: Date (in America\/Los Angeles) that this statement was created.",
          "type": "string",
          "format": "int64"
        },
        "billingPeriod": {
          "description": "**REQUIRED**: The billing period this statement covers.",
          "$ref": "#/definitions/BillingPeriod"
        },
        "dateDue": {
          "description": "**OPTIONAL**: The date that the remittance is due. This is represented as milliseconds from epoch. It is a date (and therefore will always start at the first millisecond of the day in the billing timezone). This is set as long as the `totalDueByIntegrator` is greater than 0.",
          "type": "string",
          "format": "int64"
        },
        "currencyCode": {
          "description": "**REQUIRED**: ISO 4217 3-letter currency code.",
          "type": "string"
        },
        "totalDueByIntegrator": {
          "description": "**REQUIRED**: This value is in micros in the currency of `currencyCode`. This value is always positive.",
          "type": "string",
          "format": "int64"
        },
        "remittanceInstructions": {
          "description": "**REQUIRED**: Details on how to remit payment",
          "$ref": "#/definitions/RemittanceInstructions"
        },
        "totalPresentmentAmounts": {
          "description": "**REQUIRED**: This is the total amount presented to the customer. There will be one entry for each presentment currency.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Amount"
          }
        }
      }
    },
    "BillingPeriod": {
      "description": "Billing period of this statement.",
      "type": "object",
      "properties": {
        "startDate": {
          "description": "**REQUIRED**: The start date of the billing period. This is represented as milliseconds from epoch. It is a date (and therefore will always start at the first millisecond of the day in the billing timezone). This is the first millisecond of the day of the billing period, 00:00:00.000",
          "type": "string",
          "format": "int64"
        },
        "endDate": {
          "description": "**REQUIRED**: The end date of the billing period. This is represented as milliseconds from epoch. This is the last millisecond of the last day of the billing period, 23:59:59.999",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "RemittanceInstructions": {
      "description": "Structure holding information about how to pay this remittance notification.",
      "type": "object",
      "properties": {
        "memoLineId": {
          "description": "**REQUIRED**: Identifier that is mandatory to be put on the memo line for the payment for remittance identification.",
          "type": "string"
        }
      }
    },
    "Amount": {
      "description": "Associates an amount in micros with a currency code.",
      "type": "object",
      "properties": {
        "amountMicros": {
          "description": "**REQUIRED**: An amount in [micros]({{glossary_path}}#micros \"What are micros?\").",
          "type": "string",
          "format": "int64"
        },
        "currencyCode": {
          "description": "**REQUIRED**: ISO 4217 3-letter currency code",
          "type": "string"
        }
      }
    },
    "RemittanceStatementDetailsResponseEvent": {
      "description": "Structure representing a single event included in a remittance statement.",
      "type": "object",
      "properties": {
        "eventRequestId": {
          "description": "**REQUIRED**: For capture or refund events, this will be the `requestId` that Google sends with the request. For reverse refund, chargeback and reverse chargeback events, this will be the `requestId` that the Payment Integrator sends with the notification of that event. For adjustments, this will be a unique ID assigned by Google to the adjustment event.",
          "type": "string"
        },
        "paymentIntegratorEventId": {
          "description": "**REQUIRED**: ID the payment integrator returned for this event. For a capture this is the `paymentIntegratorTransactionId` from the response to a `capture` call, for a refund this is the `paymentIntegratorRefundId` from the response to a `refund` call. This field is of variable length, as an integrator whatever ID you supply for this event will be reflected here. If a value was not provided by the integrator for the corresponding event, this field will contain the same value as the `eventRequestId` field. For reverse refund, chargeback and reverse chargeback events this will be the `requestId` that the Payment Integrator sent with the notification of the event. The length and format of this field depends on the source field for each ID. Refer to the documentation for each of the source fields for details about length and character set requirements. In particular, note that this field can sometimes contain Google-generated IDs which may have different max length requirements than integrator-generated IDs.",
          "type": "string"
        },
        "eventCharge": {
          "description": "**REQUIRED**: In currency code defined by the statement. If this value is negative then this represents monetary value moving from Google to the payment integrator. If this is positive it is money from the payment integrator due to Google. For example, capture transactions will always be positive, and refund transactions will always be negative. Reverse refund and reverse chargeback events will always be positive. Chargeback events will always be negative. This value is in [micros]({{glossary_path}}#micros \"What are micros?\").",
          "type": "string",
          "format": "int64"
        },
        "eventFee": {
          "description": "**REQUIRED**: In currency code defined by the statement. If this value is negative then this represents monetary value moving from Google to the payment integrator. If this is positive it is money from the payment integrator due to Google. For example, if an agreement says that Google will pay 1% of the `transactionCharge` to the payment integrator, and will reverse that 1% upon refund of that transaction, then the capture fee will be negative and upon refund the refund fee will be positive. This value is in [micros]({{glossary_path}}#micros \"What are micros?\").",
          "type": "string",
          "format": "int64"
        },
        "presentmentChargeAmount": {
          "description": "**OPTIONAL**: Transaction amount in the presentment (aka transaction) currency prior to foreign exchange. This field follows the same sign convention as the `eventCharge` field. This value is in [micros]({{glossary_path}}#micros \"What are micros?\"). *Note:* This will be required in version 1.1 ",
          "type": "string",
          "format": "int64"
        },
        "presentmentCurrencyCode": {
          "description": "**OPTIONAL**: ISO 4217 3-letter currency code denominating the presentment (transaction) currency. *Note:* This will be required in version 1.1 ",
          "type": "string"
        },
        "exchangeRate": {
          "description": "**DEPRECATED**: The exchange rate used in converting the presentment amount to the settlement (invoice) amount. This value is in *micro* basis points (1 basis point = .0001 = .01%). That is, to get the exchange rate, divide this field by 10^10.",
          "type": "string",
          "format": "int64"
        },
        "nanoExchangeRate": {
          "description": "**OPTIONAL**: The exchange rate used in converting the presentment amount to the settlement (invoice) amount, expressed in nano basis points. This value is in *nano* basis points (1 basis point = .0001 = .01%). That is, to get the exchange rate, divide this field by 10^13. Both this field and exchange_rate will be populated. They are equivalent exchange rates expressed with different precision. In future versions, exchange_rate will be removed in favor of nano_exchange_rate. *Note:* This will be required in version 1.1 ",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "AcceptRemittanceStatementRequest": {
      "description": "Request object for the `acceptRemittanceStatement` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this statement.",
          "type": "string"
        },
        "statementId": {
          "description": "**REQUIRED**: Request ID of the statement notification.",
          "type": "string"
        }
      }
    },
    "AcceptRemittanceStatementResponse": {
      "description": "Response object for the `acceptRemittanceStatement` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "acceptRemittanceStatementResultCode": {
          "description": "**REQUIRED**: Result of the AcceptRemittanceStatement call.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS"
          ]
        }
      }
    },
    "AcceptRemittanceStatementWithModificationsRequest": {
      "description": "Request object for the `acceptRemittanceStatementWithModifications` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this statement.",
          "type": "string"
        },
        "statementId": {
          "description": "**REQUIRED**: Request ID of the statement notification this request modifies.",
          "type": "string"
        },
        "feeToVatModification": {
          "description": "Requested modification to reattribute a portion of fees to value-added-tax (VAT).",
          "$ref": "#/definitions/FeeToVATModification"
        },
        "settlementExchangeRateModification": {
          "description": "Requested modification to adjust the exchange rate on the statement to use a different exchange rate, where permitted.",
          "$ref": "#/definitions/SettlementExchangeRateModification"
        },
        "feeToVatAndSettlementExchangeRateModification": {
          "description": "Requested modification to both reattribute a portion of fees to value-added-tax (VAT) and adjust the exchange rate on the statement to use a different exchange rate, where permitted.",
          "$ref": "#/definitions/AcceptRemittanceStatementWithModificationsRequestFeeToVATAndSettlementExchangeRateModification"
        }
      }
    },
    "FeeToVATModification": {
      "description": "This object provides tax modifications to be applied to remittance statements.",
      "type": "object",
      "properties": {
        "vatToFeeRatioInMicros": {
          "description": "**REQUIRED**: Ratio of VAT to Fee amount in micros. This is the percentage of the fees to reattribute to VAT and must be greater than or equal to zero. Rounding should be \"half even\" or \"banker's\" rounding, meaning round to the even neighbor in the case that both numbers are equidistant (e.g. 2.5 -> 2, 5.5 -> 6). A sample for calculating tax is as follows: - Tax-inclusive processing fee collected by payment integrator: 1000 USD - Tax rate: 10% - Thus, 1000 USD = (processing fee) + (10% * processing fee) - Processing fee (sans tax) = 1000 \/ 1.1 = 909.090909 USD - Tax paid by payment integrator = 1000 - 909.090909 = 90.909091 USD - `vatToFeeRatioInMicros` = (90.909091 \/ 1000) * 1000000 = 90909.091 - Half-even rounding on 90909.091 = 90909 ",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "SettlementExchangeRateModification": {
      "description": "If permitted for the payment integrator, this object provides the ability to report a different exchange rate than what is on the statement.",
      "type": "object",
      "properties": {
        "actualNanoExchangeRate": {
          "description": "**REQUIRED**: The actual exchange rate that the payment integrator is planning to settle with. The exchange rate represents the value that the presentment amount is multiplied by to convert to the settlement amount. This value is in *nano* basis points (1 basis point = .0001 = .01%). That is, to get the exchange rate, divide this field by 10^13.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "AcceptRemittanceStatementWithModificationsRequestFeeToVATAndSettlementExchangeRateModification": {
      "description": "Object used for modifications that both reattributes a portion of fees to value-added-tax (VAT) and also adjusts the exchange rate on the statement to use a different exchange rate, where permitted.",
      "type": "object",
      "properties": {
        "feeToVatModification": {
          "description": "**REQUIRED**: Requested modification to reattribute a portion of fees to value-added-tax (VAT).",
          "$ref": "#/definitions/FeeToVATModification"
        },
        "settlementExchangeRateModification": {
          "description": "** REQUIRED **: Requested modification to adjust the exchange rate on the statement to use a different exchange rate, where permitted.",
          "$ref": "#/definitions/SettlementExchangeRateModification"
        }
      }
    },
    "AcceptRemittanceStatementWithModificationsResponse": {
      "description": "Response object for the `acceptRemittanceStatementWithModifications` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "acceptRemittanceStatementWithModificationsResultCode": {
          "description": "**REQUIRED**: Result of the AcceptRemittanceStatement call.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS",
            "INVALID_VAT_MODIFICATION"
          ]
        },
        "modifiedTotalDueByIntegrator": {
          "description": "**OPTIONAL**: If the amount of the remittance modification changed the amount due (for example, due to an exchange rate modification), this field will be populated with the new total due.",
          "$ref": "#/definitions/Amount"
        }
      }
    },
    "CaptureResultNotificationRequest": {
      "description": "Request object for the `captureResultNotification` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: Payment integrator account identifier on which the capture occurred.",
          "type": "string"
        },
        "captureRequestId": {
          "description": "**REQUIRED**: A unique identifier for this transaction. This is the `requestId` generated by Google during the `capture` or `asynchronousCapture` call which this request is associated with. This is a string with a max length of 100 characters and contains only the characters \"a-z\", \"A-Z\", \"0-9\", \":\", \"-\", and \"_\".",
          "type": "string"
        },
        "captureResult": {
          "description": "**REQUIRED**: Result of this capture.",
          "$ref": "#/definitions/CaptureResult"
        },
        "paymentIntegratorTransactionId": {
          "description": "**OPTIONAL**: This identifier is specific to the integrator and is generated by the integrator. This is the identifier that the integrator knows this transaction by. For convenience, this identifier is included with in the remittance details",
          "type": "string"
        }
      }
    },
    "CaptureResult": {
      "description": "Information about the final result of a capture.",
      "type": "object",
      "properties": {
        "captureResultCode": {
          "description": "**REQUIRED**: Result code of this capture.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS",
            "CHARGE_UNDER_TRANSACTION_LIMIT",
            "CHARGE_EXCEEDS_TRANSACTION_LIMIT",
            "CHARGE_EXCEEDS_DAILY_LIMIT",
            "CHARGE_EXCEEDS_MONTHLY_LIMIT",
            "INSUFFICIENT_FUNDS",
            "SUSPECTED_FRAUD",
            "ACCOUNT_CLOSED",
            "ACCOUNT_CLOSED_ACCOUNT_TAKEN_OVER",
            "ACCOUNT_CLOSED_FRAUD",
            "ACCOUNT_ON_HOLD",
            "OTP_NOT_MATCHED",
            "OTP_ALREADY_USED",
            "CAPTURE_REQUEST_EXPIRED",
            "INVALID_PIN",
            "OS_LOCK_FAILED",
            "PIN_ENTRY_ATTEMPTS_EXHAUSTED",
            "USER_EXITED_PAYMENT_FLOW",
            "MONTHLY_FREQUENCY_LIMIT_EXCEEDED",
            "DECLINED_BY_ISSUER",
            "GOOGLE_PAYMENT_TOKEN_INVALIDATED_BY_USER",
            "PAYMENT_CANCELLED_BY_THE_USER",
            "ENROLLMENT_CANCELLED_BY_THE_USER"
          ]
        },
        "transactionMaxLimit": {
          "description": "If `captureResultCode` is `CHARGE_EXCEEDS_TRANSACTION_LIMIT` then this is the value of the maximum allowable transaction. This is used for structured, user facing messaging and decline rate analysis. This amount is [micros]({{glossary_path}}#micros \"What are micros?\") of the same `currencyCode` as the original `capture` or `asynchronousCapture` method call.",
          "type": "string",
          "format": "int64"
        },
        "transactionMinLimit": {
          "description": "If `captureResultCode` is `CHARGE_UNDER_TRANSACTION_LIMIT` then this is the value of the minimum allowable transaction. This is used for structured, user facing messaging and decline rate analysis. This amount is [micros]({{glossary_path}}#micros \"What are micros?\") of the same `currencyCode` as the original `capture` or `asynchronousCapture` method call.",
          "type": "string",
          "format": "int64"
        },
        "currentBalance": {
          "description": "If Result is `INSUFFICIENT_FUNDS`, then this is the current available balance in the user's account (in [micros]({{glossary_path}}#micros \"What are micros?\")). This is used for structured, user facing messaging. This value must be in the same currency as the `currencyCode` on the request.",
          "type": "string",
          "format": "int64"
        },
        "rawResult": {
          "description": "**OPTIONAL**: Raw result of this capture. 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. This value is **required** if the `result` is not `SUCCESS`.",
          "$ref": "#/definitions/RawResult"
        }
      }
    },
    "CaptureResultNotificationResponse": {
      "description": "Response object for the `captureResultNotification` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: Result of this call.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS"
          ]
        }
      }
    }
  }
}
