{
  "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": "v1"
  },
  "host": "www.integratorhost.example.com",
  "basePath": "/integrator-base-path",
  "schemes": ["https"],
  "paths": {
    "/refundable-one-time-payment-code-v1/echo": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "Echo",
        "description": "Echos back the `clientMessage` that is passed in. The purpose of this method is to test basic connectivity between the payment integrator and Google. This method may be called by Google multiple times per minute with valid or invalid parameters in order to test that security constraints are being held properly. Google also calls this method ad-hoc at the integrator's direction as well as at Google's direction. Google will never call this faster than once every 10s, and never more than 30 times in a 15 minute window. Examples of security constraint tests are (but not limited to): - Test to ensure payment integrator's endpoint doesn't negotiate to weak cipher suites. - Test to ensure payment integrator's endpoint doesn't negotiate to anything but TLS 1.2 - Test to ensure payment integrator's endpoint doesn't support HTTP. - Test to ensure payment integrator's endpoint mandates at least one known PGP signing key. - Test to ensure payment integrator's endpoint supports multiple PGP key signatures, both known and unknown, both expired and active. - Test to ensure payment integrator only support strict JSON parsing. 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\": 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"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v1/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 combination of the `paymentIntegratorAccountId` from the request and the `referenceNumber` from the response form a unique key that identifies the transaction for subsequent operations on this transaction. The `amount` field is defined in *micro currency units* (micros), which means that $2 would be represented with the digit `2` followed by six digits `0`, resulting in `2000000`. 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\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ\", \"requestTimestamp\": \"1502220196077\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"transactionDescription\": \"Google - Music\", \"userInfo\": { \"noUserInfo\": {} }, \"currencyCode\": \"USD\", \"amount\": \"2000000\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1502220197000\" }, \"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-v1/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. An example requests looks like: { \"requestHeader\": { \"protocolVersion\": { \"major\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ\", \"requestTimestamp\": \"1502223797000\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"referenceNumber\": \"aW50ZWdyYXRvciB0cmFuc2FjdGlvbiBpZA\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1502223798000\" }, \"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-v1/asynchronousCapture": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "AsynchronousCapture",
        "description": "Triggers the start of a money movement operation between a customer's account and the integrator. The integrator should acknowledge the request and perform whatever actions need to happen in order to complete the capture (e.g., collect a PIN from the user). The integrator will inform Google of the capture's final result by calling the `captureResultNotification` API. The `requestId` within the header is the idempotency key and uniquely identifies this transaction. All mutations on this transaction (refunds) populate the `requestId` value in the `captureRequestId` 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\": 1, \"minor\": 1, \"revision\": 0 }, \"requestId\": \"bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ\", \"requestTimestamp\": \"1502220196077\" }, \"paymentIntegratorAccountId\": \"InvisiCashIN_INR\", \"transactionDescription\": \"Google - Music\", \"transactionDateInMillis\": \"1402220196077\", \"currencyCode\": \"INR\", \"amount\": \"728000000\", \"mandateDetails\": { \"mandateId\": \"Gbsdfju4bnQgdHJXPFWSDhgdka4\" } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1481900013178\" }, \"result\": \"ACKNOWLEDGED\", \"paymentIntegratorTransactionId\": \"aW50ZWdyYXRvciB0cmFuc2FjdGlvbiBpZA\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/AsynchronousCaptureRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/AsynchronousCaptureResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v1/createMandateWithOptionalInstantPayment": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "CreateMandateWithOptionalInstantPayment",
        "description": "Initiates a mandate creation on the user's account with the integrator. An instant payment is optional, but if the instant payment amount is provided in the request, the payment must be successfully completed to activate the mandate. The `requestId` within the header is the idempotency key and uniquely identifies this transaction. All subsequent operations on this mandate will populate the `mandateId` field from the request. 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\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"GWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ\", \"requestTimestamp\": \"1502220196077\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"mandateName\": \"Google - Music\", \"mandateDescription\": \"Monthly subscription for Google - Music\", \"startDate\": { \"epochMillis\": \"1502220194077\" }, \"endDate\": { \"epochMillis\": \"1502220196000\" }, \"maximumAmount\": { \"amountMicros\": \"728000000\", \"currencyCode\": \"USD\" }, \"firstPaymentDetails\": { \"instant_payment_amount\": { \"amountMicros\": \"728000000\", \"currencyCode\": \"USD\" } }, \"frequency\": \"MONTHLY\", \"userInfo\": { \"brazilUserInfo\": { \"fullName\": \"John Doe\", \"legalAddress\": { \"addressLine\": [ \"123 Main St\" ], \"localityName\": \"San Francisco\", \"administrativeAreaName\": \"CA\", \"postalCodeNumber\": \"94105\", \"countryCode\": \"US\" }, \"cpf\": \"12345678909\" } } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1481900013178\" }, \"displayableReferenceNumber\": { \"barcodeWithPrintableString\": { \"printableString\": \"1122334455\", \"barcodeContents\": \"aW50ZWdyYXRvciB0cmFuc2FjdGlvbiBpZA\" } }, \"result\": { \"acknowledged\": {} } } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/CreateMandateWithOptionalInstantPaymentRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/CreateMandateWithOptionalInstantPaymentResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v1/cancelMandate": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "CancelMandate",
        "description": "Initiates a mandate cancellation on the user's account with the integrator. This cancels the existing mandate on the user's account. The `mandateId` identifies which mandate is being cancelled. This is the `requestId` of the `createMandateWithOptionalInstantPayment` call. If the mandate has expired or is already cancelled, consider it a successful cancel rather than an error. Therefore, return a `success` response code. The `requestId` within the header is the idempotency key and 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\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ\", \"requestTimestamp\": \"1502220196078\" }, \"paymentIntegratorAccountId\": \"InvisiCashIN_INR\", \"mandateId\": \"Gbsdfju4bnQgdHJXPFWSDhgdka4\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1502220196079\" }, \"result\": \"SUCCESS\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/CancelMandateRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/CancelMandateResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v1/asynchronousRefund": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "AsynchronousRefund",
        "description": "Refunds a portion of or the entire transaction initiated through `generateReferenceNumber`. 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\": 1, \"minor\": 3, \"revision\": 0 }, \"requestId\": \"G18FCDTLD5B0SR4\", \"requestTimestamp\": \"1482489410000\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"generateReferenceNumberRequestId\": \"bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ\", \"refundAmount\": { \"amountMicros\": \"728000000\", \"currencyCode\": \"INR\" } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1482489412366\" }, \"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-v1/refund": {
      "post": {
        "tags": ["payment_integrator_refundable_one_time_payment_code_api"],
        "operationId": "Refund",
        "description": "Refunds a portion of or the entire transaction initiated through `generateReferenceNumber`. 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\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ\", \"requestTimestamp\": \"1502223797000\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"generateReferenceNumberRequestId\": \"aW50ZWdyYXRvciB0cmFuc2FjdGlvbiBpZA\", \"currencyCode\": \"USD\", \"refundAmount\": \"10000000\", \"pixEndToEndIdToRefund\": \"E28315987135981735987351\", \"refundId\": \"006\" } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1481900013178\" }, \"result\": \"SUCCESS\", \"paymentIntegratorRefundId\": \"cmVmdW5kIGlkZW50aWZpZXINCg\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/RefundRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/RefundResponse"
            }
          }
        }
      }
    },
    "/refundable-one-time-payment-code-v1/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 everytime 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\": 1, \"minor\": 0, \"revision\": 0 }, \"requestId\": \"0123434-statement-abc\", \"requestTimestamp\": \"1502632800000\" }, \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\", \"remittanceStatementSummary\": { \"statementDate\": \"1502607600000\", \"billingPeriod\": { \"startDate\": \"1502434800000\", \"endDate\": \"1502521199000\" }, \"dateDue\": \"1503212400000\", \"currencyCode\": \"INR\", \"totalDueByIntegrator\": \"1076000000\", \"totalPresentmentAmounts\": [ { \"amountMicros\": \"1076000000\", \"currencyCode\": \"INR\" } ], \"remittanceInstructions\": { \"memoLineId\": \"stmt-1AB-pp0-invisi\" } } } An example response looks like: { \"responseHeader\": { \"responseTimestamp\": \"1502632802000\" }, \"paymentIntegratorStatementId\": \"334a\", \"result\": \"ACCEPTED\" } ",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/RemittanceStatementNotificationRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/RemittanceStatementNotificationResponse"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "EchoRequest": {
      "description": "Request object for the echo method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "clientMessage": {
          "description": "**REQUIRED**: Message to echo in the response.",
          "type": "string"
        }
      }
    },
    "RequestHeader": {
      "description": "Header object that is defined on all requests sent to the server.",
      "type": "object",
      "properties": {
        "requestId": {
          "description": "**REQUIRED**: Unique identifier of this request. This is a string that has a max length of 100 characters, and contains only the characters \"a-z\", \"A-Z\", \"0-9\", \":\", \"-\", and \"_\".",
          "type": "string"
        },
        "requestTimestamp": {
          "description": "**REQUIRED**: Timestamp of this request represented as milliseconds since epoch. The receiver should verify that this timestamp is \u00B1 60s of 'now'. This request timestamp is not idempotent upon retries.",
          "type": "string",
          "format": "int64"
        },
        "userLocale": {
          "description": "**DEPRECATED**: A two- or three-letter ISO 639-2 Alpha 3 language code optionally followed by a hyphen and an ISO 3166-1 Alpha-2 country code, e.g.'pt', 'pt-BR', 'fil', or 'fil-PH'. Use this to help drive the `userMessage` fields in the response.",
          "type": "string"
        },
        "protocolVersion": {
          "description": "**REQUIRED**: The version of this request.",
          "$ref": "#/definitions/Version"
        }
      }
    },
    "Version": {
      "description": "Version object which is a structured form of the classic `a.b.c` version structure. Major versions of the same number are guaranteed to be compatible. Note that minor and revisions can change frequently and without notice. The integrator must support all requests for the same major version.",
      "type": "object",
      "properties": {
        "major": {
          "description": "**REQUIRED**: Major version. This is marked for compatibility requests with different versions are not guaranteed to be compatible.",
          "type": "integer",
          "format": "int32"
        },
        "minor": {
          "description": "**REQUIRED**: Minor version. This denotes significant bug fixes.",
          "type": "integer",
          "format": "int32"
        },
        "revision": {
          "description": "**REQUIRED**: Minor version. This denotes minor bug fixes.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "EchoResponse": {
      "description": "Response object for the echo method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "clientMessage": {
          "description": "**REQUIRED**: Message received in the request.",
          "type": "string"
        },
        "serverMessage": {
          "description": "**OPTIONAL**: Server message, independent of the `clientMessage` being echoed.",
          "type": "string"
        }
      }
    },
    "ResponseHeader": {
      "description": "Header object that is defined on all responses sent from the server.",
      "type": "object",
      "properties": {
        "responseTimestamp": {
          "description": "**REQUIRED**: Timestamp of this response represented as milliseconds since epoch. The receiver should verify that this timestamp is \u00B1 60s of 'now'.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "ErrorResponse": {
      "description": "Error Response object for all methods.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "errorResponseCode": {
          "description": "**OPTIONAL**: A code that captures the type of error that occurred.",
          "type": "string",
          "enum": [
            "UNKNOWN_ERROR_RESPONSE_CODE",
            "INVALID_API_VERSION",
            "INVALID_PAYLOAD_SIGNATURE",
            "INVALID_PAYLOAD_ENCRYPTION",
            "REQUEST_TIMESTAMP_OUT_OF_RANGE",
            "INVALID_IDENTIFIER",
            "IDEMPOTENCY_VIOLATION",
            "INVALID_FIELD_VALUE",
            "MISSING_REQUIRED_FIELD",
            "PRECONDITION_VIOLATION",
            "USER_ACTION_IN_PROGRESS",
            "INVALID_DECRYPTED_REQUEST",
            "FORBIDDEN"
          ]
        },
        "errorDescription": {
          "description": "**OPTIONAL**: Provide a description of this status for support reps to debug errors. Note that this is never shown to users. It can contain descriptive, non-sensitive text used for debugging. Note that some values for errorResponseCode should be accompanied by additional detail in this field. For example, `INVALID_IDENTIFIER` should be accompanied by information in this field as to which type of identifier was invalid. Warning: Do not include any tokens in this message unless they are defined as public.",
          "type": "string"
        },
        "paymentIntegratorErrorIdentifier": {
          "description": "**OPTIONAL**: This identifier is specific to the integrator and is generated by the integrator. It is used for debugging purposes only in order to identify this call. This is the identifier that the integrator knows this call by.",
          "type": "string"
        }
      }
    },
    "GenerateReferenceNumberRequest": {
      "description": "Request object for the generate reference number 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"
        },
        "transactionDescription": {
          "description": "**REQUIRED**: This is the description of the transaction that can be put on the customer's statement. Localized to the userLocale found in the `requestHeader`. This format can be changed without notice and must never be parsed.",
          "type": "string"
        },
        "currencyCode": {
          "description": "**REQUIRED**: ISO 4217 3-letter currency code.",
          "type": "string"
        },
        "amount": {
          "description": "**REQUIRED**: The amount of the purchase, in [micros]({{glossary_path}}#micros \"What are micros?\") of the currency unit.",
          "type": "string",
          "format": "int64"
        },
        "userInfo": {
          "description": "**REQUIRED**: Information about the user making the request.",
          "$ref": "#/definitions/UserInfo"
        }
      }
    },
    "UserInfo": {
      "description": "Information about the user making the request.",
      "type": "object",
      "properties": {
        "noUserInfo": {
          "description": "No user information is provided.",
          "$ref": "#/definitions/Empty"
        },
        "brazilUserInfo": {
          "description": "Information about a Brazil user.",
          "$ref": "#/definitions/UserInfoBrazilUserInfo"
        }
      }
    },
    "Empty": {
      "description": " This object is used for extensibility because booleans and enumerations often need to be extended with extra data. The implementer uses it to determine presence. The enumeration this represents may be extended to contain data in future versions. The JSON representation for `Empty` is empty JSON object `{}`.",
      "type": "object",
      "properties": {
      }
    },
    "UserInfoBrazilUserInfo": {
      "description": "Information about a Brazil user.",
      "type": "object",
      "properties": {
        "fullName": {
          "description": "**REQUIRED**: The user's full name.",
          "type": "string"
        },
        "noLegalAddress": {
          "description": "No legal address is provided.",
          "$ref": "#/definitions/Empty"
        },
        "legalAddress": {
          "description": "The user's legal address.",
          "$ref": "#/definitions/Address"
        },
        "cpf": {
          "description": "The CPF number (Cadastro de Pessoas F\u00EDsicas, Portuguese for \"Natural Persons Register\") is the Brazilian individual taxpayer registry identification.",
          "type": "string"
        },
        "cnpj": {
          "description": "CNPJ (short for Cadastro Nacional da Pessoa Jur\u00EDdica in Portuguese, or National Registry of Legal Entities) is an identification number issued to Brazilian companies by the Department of Federal Revenue of Brazil (in Portuguese, Secretaria da Receita Federal).",
          "type": "string"
        }
      }
    },
    "Address": {
      "description": "Structure holding information about a physical address.",
      "type": "object",
      "properties": {
        "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"
        }
      }
    },
    "GenerateReferenceNumberResponse": {
      "description": "Response object for the generate reference number method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "referenceNumber": {
          "description": "**DEPRECATED**: Reference number created by the integrator.",
          "type": "string"
        },
        "displayableReferenceNumber": {
          "description": "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"
        }
      }
    },
    "CancelReferenceNumberRequest": {
      "description": "Request object for the cancel reference number 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"
        },
        "referenceNumber": {
          "description": "**REQUIRED**: The reference number that should be cancelled.",
          "type": "string"
        }
      }
    },
    "CancelReferenceNumberResponse": {
      "description": "Response object for the cancel reference number method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: The result of this call",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS",
            "REFERENCE_NUMBER_ALREADY_PAID",
            "REFERENCE_NUMBER_PENDING_TRANSACTION"
          ]
        }
      }
    },
    "AsynchronousCaptureRequest": {
      "description": "Request object for the capture 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"
        },
        "transactionDescription": {
          "description": "**REQUIRED**: This is the description of the transaction that can be put on the customer's statement. This format can be changed without notice and must never be parsed.",
          "type": "string"
        },
        "transactionDateInMillis": {
          "description": "**REQUIRED**: The date for the transaction to be executed. This is represented as a Timestamp. This is the first millisecond of the day (in UTC) of the mandate start, 00:00:00.000",
          "type": "string",
          "format": "int64"
        },
        "currencyCode": {
          "description": "**REQUIRED**: ISO 4217 3-letter currency code",
          "type": "string"
        },
        "amount": {
          "description": "**REQUIRED**: The amount of the purchase, in [micros]({{glossary_path}}#micros \"What are micros?\") of the currency unit.",
          "type": "string",
          "format": "int64"
        },
        "mandateDetails": {
          "description": "**OPTIONAL**: Payment details specific to mandates.",
          "$ref": "#/definitions/AsynchronousCaptureRequestMandateDetails"
        }
      }
    },
    "AsynchronousCaptureRequestMandateDetails": {
      "description": "Details about the mandate to capture from.",
      "type": "object",
      "properties": {
        "mandateId": {
          "description": "**REQUIRED**: The mandate id that was generated during the `createMandate` call.",
          "type": "string"
        }
      }
    },
    "AsynchronousCaptureResponse": {
      "description": "Response object for the capture method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "paymentIntegratorTransactionId": {
          "description": "**REQUIRED**: 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"
        },
        "result": {
          "description": "**REQUIRED**: The result of the asynchronous capture call.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "ACKNOWLEDGED",
            "ACCOUNT_CLOSED",
            "ACCOUNT_CLOSED_ACCOUNT_TAKEN_OVER",
            "ACCOUNT_ON_HOLD",
            "ACCOUNT_CLOSED_FRAUD",
            "MULTIPLE_PAYMENTS_IN_PAYMENT_CYCLE"
          ]
        }
      }
    },
    "CreateMandateWithOptionalInstantPaymentRequest": {
      "description": "Request object for the create mandate method with optional instant payment.",
      "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"
        },
        "mandateName": {
          "description": "**REQUIRED**: The name of the mandate to be displayed to the user. This could be treated like a title of the mandate for the user. This format can be changed without notice and must never be parsed.",
          "type": "string"
        },
        "mandateDescription": {
          "description": "**REQUIRED**: A description of the mandate that can be displayed to the user. This would be an informative explanation of the mandate for the user. This format can be changed without notice and must never be parsed.",
          "type": "string"
        },
        "startDate": {
          "description": "**REQUIRED**: The start date of the mandate to be created. This is represented as a Timestamp. This is the first millisecond of the day (in UTC) of the mandate start, 00:00:00.000",
          "$ref": "#/definitions/Timestamp"
        },
        "endDate": {
          "description": "**OPTIONAL**: The end date of the mandate to be created. This is represented as a Timestamp. This is the first millisecond of the day (in UTC) of the mandate end, 00:00:00.000 If provided, the mandate will expire on this date. If not provided, the mandate will not have a specific expiration date.",
          "$ref": "#/definitions/Timestamp"
        },
        "fixedAmount": {
          "description": "A fixed amount that would be deducted on every recurrence. Every subsequent transaction on this mandate will be for this amount.",
          "$ref": "#/definitions/Amount"
        },
        "maximumAmount": {
          "description": "A maximum amount up to which can be deducted on every recurrence. Subsequent transactions on this mandate could be of any amount less than or equal to this amount.",
          "$ref": "#/definitions/Amount"
        },
        "firstPaymentDetails": {
          "description": "**OPTIONAL**: Details about the first payment for the mandate. If this field is provided, an initial payment must be made to activate the mandate.",
          "$ref": "#/definitions/FirstPaymentDetails"
        },
        "frequency": {
          "description": "**REQUIRED**: The frequency at which the mandate will be executed.",
          "type": "string",
          "enum": [
            "FREQUENCY_UNSPECIFIED",
            "WEEKLY",
            "MONTHLY",
            "QUARTERLY",
            "HALF_YEARLY",
            "YEARLY"
          ]
        },
        "userInfo": {
          "description": "**REQUIRED**: Information about the user making the request.",
          "$ref": "#/definitions/UserInfo"
        }
      }
    },
    "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"
        }
      }
    },
    "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"
        }
      }
    },
    "FirstPaymentDetails": {
      "description": "Details about the first payment for the mandate.",
      "type": "object",
      "properties": {
        "instantPaymentAmount": {
          "description": "**OPTIONAL**: The amount of the instant payment that the user must pay at the time of mandate creation. This amount is immediately payable and will be processed as part of the mandate setup. If not provided, it's assumed that no instant payment is required.",
          "$ref": "#/definitions/Amount"
        }
      }
    },
    "CreateMandateWithOptionalInstantPaymentResponse": {
      "description": "Response object for the create mandate with optional instant payment method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "displayableReferenceNumber": {
          "description": "**REQUIRED**: Reference number created by the integrator.",
          "$ref": "#/definitions/DisplayableReferenceNumber"
        },
        "result": {
          "description": "**REQUIRED**: The result of the create mandate call.",
          "$ref": "#/definitions/CreateMandateWithOptionalInstantPaymentResponseCreateMandateWithOptionalInstantPaymentResult"
        }
      }
    },
    "CreateMandateWithOptionalInstantPaymentResponseCreateMandateWithOptionalInstantPaymentResult": {
      "description": "Result codes for `CreateMandateWithOptionalInstantPayment` method call.",
      "type": "object",
      "properties": {
        "acknowledged": {
          "description": "The mandate creation has been requested and the integrator will do additional steps to determine if the mandate creation was successful or declined. Once the integrator knows the result of the creation, they will inform Google of the result by calling the `createMandateResultNotification` API.",
          "$ref": "#/definitions/Empty"
        }
      }
    },
    "CancelMandateRequest": {
      "description": "Request object for the `cancelMandate` method call.",
      "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"
        },
        "mandateId": {
          "description": "**REQUIRED**: The Google generated ID of the mandate to cancel.",
          "type": "string"
        }
      }
    },
    "CancelMandateResponse": {
      "description": "Response object for the `cancelMandate` method call.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "result": {
          "description": "**REQUIRED**: The result of the cancel mandate call.",
          "type": "string",
          "enum": [
            "CANCEL_MANDATE_RESULT_CODE_UNSPECIFIED",
            "SUCCESS"
          ]
        }
      }
    },
    "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"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: This is the payment integrator account ID that defines contractual constraints around this transaction.",
          "type": "string"
        },
        "generateReferenceNumberRequestId": {
          "description": "The `requestId` of the initial payment event to be refunded. This is used for: 1. Refunds of one-time reference number payments. 2. Refunds of the initial mandate payment. This ID corresponds to the `requestId` in the `requestHeader` of the `generateReferenceNumber` or `createMandateWithOptionalInstantPayment` call for the payment being refunded.",
          "type": "string"
        },
        "captureRequestId": {
          "description": "The `requestId` of the capture event to be refunded. This is used for refunds of subsequent\/recurring payments made against a mandate. This ID corresponds to the `requestId` in the `requestHeader` of the `capture` call for the payment being refunded.",
          "type": "string"
        },
        "refundAmount": {
          "description": "**REQUIRED**: The amount of the refund, this will be a positive number, and should always be less-than or equal-to the remaining balance for the cash payment.",
          "$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 of this asynchronous refund.",
      "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/Empty"
        }
      }
    },
    "RefundRequest": {
      "description": "Request object for the `refund` method.",
      "type": "object",
      "properties": {
        "requestHeader": {
          "description": "**REQUIRED**: Common header for all requests.",
          "$ref": "#/definitions/RequestHeader"
        },
        "paymentIntegratorAccountId": {
          "description": "**REQUIRED**: This is the payment integrator account identifier on which the reference number was created.",
          "type": "string"
        },
        "generateReferenceNumberRequestId": {
          "description": "**REQUIRED**: Request ID of the `generateReferenceNumber` request to be refunded.",
          "type": "string"
        },
        "currencyCode": {
          "description": "**REQUIRED**: ISO 4217 3-letter currency code.",
          "type": "string"
        },
        "refundAmount": {
          "description": "**REQUIRED**: The amount of the refund, a positive number of [micros]({{glossary_path}}#micros \"What are micros?\") of the currency unit.",
          "type": "string",
          "format": "int64"
        },
        "pixEndToEndIdToRefund": {
          "description": "This ID was created by Banco Central do Brasil (BCB) for the Brazilian instant payment ecosystem (Pix). This ID is used to identify the payment that needs to be refunded.",
          "type": "string"
        },
        "refundId": {
          "description": "**OPTIONAL**: Identifies this particular refund request since multiple partial refunds are possible. This ID is 1:1 with the `requestId` in the `requestHeader`, but is shorter and structured. Format: three numerical digits (e.g. \"001\", \"004\", \"999\"). *Note:* This field will transition to be required once it is being set in all cases. ",
          "type": "string"
        }
      }
    },
    "RefundResponse": {
      "description": "Response object for the `refund` method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "paymentIntegratorRefundId": {
          "description": "**OPTIONAL**: This identifier is specific to the integrator and is generated by the integrator. This is the identifier that the integrator knows this refund by. For convenience, this identifier is included with in the remittance details",
          "type": "string"
        },
        "pixEndToEndId": {
          "description": "This ID is created by Banco Central do Brasil (BCB) for the Brazilian instant payment ecosystem (Pix). This ID is used to identify the operation on a transaction, in this case it identifies the refund operation.",
          "type": "string"
        },
        "result": {
          "description": "**REQUIRED**: Result of this refund.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "SUCCESS",
            "NO_MONEY_LEFT_ON_TRANSACTION",
            "ACCOUNT_CLOSED",
            "ACCOUNT_CLOSED_ACCOUNT_TAKEN_OVER",
            "ACCOUNT_CLOSED_FRAUD",
            "ACCOUNT_ON_HOLD",
            "REFUND_EXCEEDS_MAXIMUM_BALANCE",
            "REFUND_WINDOW_EXCEEDED",
            "CAPTURE_USED_PROMOTIONAL_BALANCE",
            "ISSUER_DOES_NOT_SUPPORT_REFUND",
            "GOOGLE_PAYMENT_TOKEN_INVALIDATED_BY_USER"
          ]
        },
        "rawResult": {
          "description": "**OPTIONAL**: Raw result of this refund. 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"
        }
      }
    },
    "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"
        }
      }
    },
    "RemittanceStatementNotificationRequest": {
      "description": "Request object for the remittance statement notification 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"
        },
        "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.",
          "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"
        }
      }
    },
    "RemittanceStatementNotificationResponse": {
      "description": "Response object for the remittance statement notification method.",
      "type": "object",
      "properties": {
        "responseHeader": {
          "description": "**REQUIRED**: Common header for all responses.",
          "$ref": "#/definitions/ResponseHeader"
        },
        "paymentIntegratorStatementId": {
          "description": "**REQUIRED**: Identifier the integrator knows this statement as. This is integrator generated.",
          "type": "string"
        },
        "result": {
          "description": "**REQUIRED**: Result of this statement notification.",
          "type": "string",
          "enum": [
            "UNKNOWN_RESULT",
            "ACCEPTED"
          ]
        }
      }
    }
  }
}
