- HTTP request
- Request body
- Response body
- RequestHeader
- Timestamp
- Version
- RemittanceStatementSummary
- BillingPeriod
- Amount
- ResponseHeader
- StatementNotificationResult
- Empty
Notifies the integrator of a new remittance statement.
Statement notifications occur every time a new statement is raised that represents money that Google will pay the integrator or the money that the integrator owes Google.
If the integrator returns a success, then it acknowledges receipt of the statement.
The requestId
is also the statement Id (used elsewhere). The combination of requestId
and paymentIntegratorAccountId
within the header is the idempotency key and uniquely identifies this statement.
If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type
.ErrorResponse
An example request looks like:
{
"requestHeader": {
"protocolVersion": {
"major": 2
},
"requestId": "0123434-statement-abc",
"requestTimestamp": {
"epochMillis": "1502632800000"
},
"paymentIntegratorAccountId": "InvisiCashUSA_USD"
},
"remittanceStatementSummary": {
"statementDate": {
"epochMillis": "1502521200000"
},
"billingPeriod": {
"startDate": {
"epochMillis": "1502434800000"
},
"endDate": {
"epochMillis": "1502434800000"
}
},
"dateDue": {
"epochMillis": "1502348400000"
},
"totalDueByIntegrator": {
"amountMicros": "1076000000",
"currencyCode": "INR"
},
"totalEvents": 15
}
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis": "1502632802000"
}
},
"result": {
"accepted": {}
}
}
HTTP request
POST https://www.integratorhost.example.com/v2/remittanceStatementNotification
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "requestHeader": { object ( |
Fields | |
---|---|
requestHeader |
REQUIRED: Common header for all requests. |
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 ( |
Fields | |
---|---|
responseHeader |
REQUIRED: Common header for all responses. |
result |
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 ( |
Fields | |
---|---|
requestId |
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 |
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 |
REQUIRED: The version of this request. |
paymentIntegratorAccountId |
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 |
Milliseconds since the Unix epoch |
Version
Version object contains the major version of the API. Versions of the same major version are guaranteed to be compatible. The integrator must support all requests for the same major version.
JSON representation |
---|
{ "major": integer } |
Fields | |
---|---|
major |
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 ( |
Fields | |
---|---|
statementDate |
REQUIRED: Date (in America/Los Angeles) that this statement was created. |
billingPeriod |
REQUIRED: The billing period this statement covers. |
dateDue |
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 |
REQUIRED: This value is in micros in the currency of |
totalEvents |
REQUIRED: Total number of events in this statement. |
BillingPeriod
Billing period of this statement.
JSON representation |
---|
{ "startDate": { object ( |
Fields | |
---|---|
startDate |
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 |
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 |
REQUIRED: An amount in micros. |
currencyCode |
REQUIRED: ISO 4217 3-letter currency code |
ResponseHeader
Header object that is defined on all responses sent from the server.
JSON representation |
---|
{
"responseTimestamp": {
object ( |
Fields | |
---|---|
responseTimestamp |
REQUIRED: Timestamp of this response. The receiver must verify that this timestamp is ± 60s of 'now', and reject the response if it is not. |
StatementNotificationResult
Result of this statement notification.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field result . The possible results of this statement notification. result can be only one of the following: |
|
accepted |
Integrator acknowledges receipt of this notification. |
Empty
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 {}
.