Method: remittanceStatementNotification

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 is assumed that the statement has been accepted and will be paid.

The requestId is also the statement Id (used elsewhere). The combination of requestId within the header and paymentIntegratorAccountId is the idempotency key and uniquely identifies this statement.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1
    },
    "requestId": "0123434-statement-abc",
    "requestTimestamp": {
      "epochMillis": "1502632800000"
    },
    "paymentIntegratorAccountId": "InvisiCashUSA_USD"
  },
  "remittanceStatementSummary": {
    "statementDate": {
      "epochMillis": "1502521200000"
    },
    "billingPeriod": {
      "startDate": {
        "epochMillis": "1502434800000"
      },
      "endDate": {
        "epochMillis": "1502434800000"
      }
    },
    "dateDue": {
      "epochMillis": "1502348400000"
    },
    "totalDueByIntegrator": {
      "amountMicros": "1076000000",
      "currencyCode": "INR"
    }
  }
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": {
      "epochMillis": "1502632802000"
    },
    "requestId": "0123434-statement-abc"
  },
  "result": {
    "accepted": {}
  }
}

HTTP request

POST https://www.integratordomain.com/v1/remittanceStatementNotification

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "remittanceStatementSummary": {
    object (RemittanceStatementSummary)
  }
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

remittanceStatementSummary

object (RemittanceStatementSummary)

REQUIRED: Summary of this remittance statement.

Response body

If successful, the response body contains data with the following structure:

Response object for the remittance statement notification method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": {
    object (StatementNotificationResult)
  }
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (StatementNotificationResult)

REQUIRED: Result of this statement notification.

RequestHeader

Header object that is defined on all requests sent to the server.

JSON representation
{
  "requestId": string,
  "requestTimestamp": {
    object (Timestamp)
  },
  "protocolVersion": {
    object (Version)
  },
  "paymentIntegratorAccountId": string
}
Fields
requestId

string

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 "_".

requestTimestamp

object (Timestamp)

REQUIRED: Timestamp of this request. The receiver must verify that this timestamp is ± 60s of 'now', and reject the request if it is not. This request timestamp is not idempotent upon retries.

protocolVersion

object (Version)

REQUIRED: The version of this request.

paymentIntegratorAccountId

string

REQUIRED: Identifies a unique account with contractual constraints.

Timestamp

A timestamp object representing a point on the ISO timeline in milliseconds since the Unix epoch.

JSON representation
{
  "epochMillis": string
}
Fields
epochMillis

string (Int64Value format)

Milliseconds since the Unix epoch

Version

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.

JSON representation
{
  "major": integer
}
Fields
major

integer

REQUIRED: Major version. This is marked for compatibility requests with different versions are not guaranteed to be compatible.

RemittanceStatementSummary

Summary object about a remittance statement.

JSON representation
{
  "statementDate": {
    object (Timestamp)
  },
  "billingPeriod": {
    object (BillingPeriod)
  },
  "dateDue": {
    object (Timestamp)
  },
  "totalDueByIntegrator": {
    object (Amount)
  }
}
Fields
statementDate

object (Timestamp)

REQUIRED: Date (in America/Los Angeles) that this statement was created.

billingPeriod

object (BillingPeriod)

REQUIRED: The billing period this statement covers.

dateDue

object (Timestamp)

OPTIONAL: The date that the remittance is due. This is represented as a Timestamp. It is a date (and therefore will always start at the first millisecond of the day in the billing timezone).

This is set as long as the totalDueByIntegrator is greater than 0.

totalDueByIntegrator

object (Amount)

REQUIRED: This value is in micros in the currency of currencyCode. This value is always positive.

BillingPeriod

Billing period of this statement.

JSON representation
{
  "startDate": {
    object (Timestamp)
  },
  "endDate": {
    object (Timestamp)
  }
}
Fields
startDate

object (Timestamp)

REQUIRED: The start date of the billing period. This is represented as a Timestamp. It is a date (and therefore will always start at the first millisecond of the day in the billing timezone).

This is the first millisecond of the day of the billing period, 00:00:00.000

endDate

object (Timestamp)

REQUIRED: The end date of the billing period. This is represented as a Timestamp.

This is the last millisecond of the last day of the billing period, 23:59:59.999

Amount

Associates an amount in micros with a currency code.

JSON representation
{
  "amountMicros": string,
  "currencyCode": string
}
Fields
amountMicros

string (Int64Value format)

REQUIRED: An amount in micros.

currencyCode

string

REQUIRED: ISO 4217 3-letter currency code

ResponseHeader

Header object that is defined on all responses sent from the server.

JSON representation
{
  "responseTimestamp": {
    object (Timestamp)
  },
  "requestId": string
}
Fields
responseTimestamp

object (Timestamp)

REQUIRED: Timestamp of this response. The receiver must verify that this timestamp is ± 60s of 'now', and reject the response if it is not.

requestId

string

REQUIRED: The requestId of the request that this response is a reply to. Receiver must verify this matches the requestId they sent, and reject the response message if it doesn't match.

StatementNotificationResult

JSON representation
{
  "accepted": {
    object (Empty)
  }
}
Fields
accepted

object (Empty)

Integrator has accepted this statement.

Empty

A generic empty message that can be re-used to require information that is not always available to be explicitly empty or included. Empty messages will also be used in places where the (moneta.presence) of the message is indicative of some behavior or data, but there is no additional data inside the message yet. Typically this is done to avoid using booleans fields since booleans are not extensible.

e.x. oneof important_information { option (moneta.oneof_presence) = REQUIRED; Empty information_not_available = 2; ImportantInformationDetails important_information_details = 3; }

The JSON representation for Empty is empty JSON object {}.