- HTTP request
- Request body
- Response body
- RequestHeader
- Version
- RemittanceStatementSummary
- BillingPeriod
- RemittanceInstructions
- ResponseHeader
- StatementNotificationResultCode
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 combination of requestId
within the header and paymentIntegratorAccountId
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",
"remittanceInstructions": {
"memoLineId": "stmt-1AB-pp0-invisi"
}
}
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": "1502632802000"
},
"paymentIntegratorStatementId": "334a",
"result": "ACCEPTED"
}
HTTP request
POST https://www.integratorhost.example.com/v1/remittanceStatementNotification
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "requestHeader": { object ( |
Fields | |
---|---|
requestHeader |
REQUIRED: Common header for all requests. |
paymentIntegratorAccountId |
REQUIRED: This is the payment integrator account identifier that identifies contractual constraints around this statement. |
remittanceStatementSummary |
REQUIRED: Summary of this remittance statement. |
Response body
Response object for the remittance statement notification method.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "responseHeader": { object ( |
Fields | |
---|---|
responseHeader |
REQUIRED: Common header for all responses. |
paymentIntegratorStatementId |
REQUIRED: Identifier the integrator knows this statement as. This is integrator generated. |
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": string,
"userLocale": string,
"protocolVersion": {
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 represented as milliseconds since epoch. The receiver should verify that this timestamp is ± 60s of 'now'. This request timestamp is not idempotent upon retries. |
userLocale |
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 |
protocolVersion |
REQUIRED: The version of this request. |
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, "minor": integer, "revision": integer } |
Fields | |
---|---|
major |
REQUIRED: Major version. This is marked for compatibility requests with different versions are not guaranteed to be compatible. |
minor |
REQUIRED: Minor version. This denotes significant bug fixes. |
revision |
REQUIRED: Minor version. This denotes minor bug fixes. |
RemittanceStatementSummary
Summary object about a remittance statement.
JSON representation |
---|
{ "statementDate": string, "billingPeriod": { 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 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 |
currencyCode |
REQUIRED: ISO 4217 3-letter currency code. |
totalDueByIntegrator |
REQUIRED: This value is in micros in the currency of |
remittanceInstructions |
REQUIRED: Details on how to remit payment |
BillingPeriod
Billing period of this statement.
JSON representation |
---|
{ "startDate": string, "endDate": string } |
Fields | |
---|---|
startDate |
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 |
endDate |
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 |
RemittanceInstructions
Structure holding information about how to pay this remittance notification.
JSON representation |
---|
{ "memoLineId": string } |
Fields | |
---|---|
memoLineId |
REQUIRED: Identifier that is mandatory to be put on the memo line for the payment for remittance identification. |
ResponseHeader
Header object that is defined on all responses sent from the server.
JSON representation |
---|
{ "responseTimestamp": string } |
Fields | |
---|---|
responseTimestamp |
REQUIRED: Timestamp of this response represented as milliseconds since epoch. The receiver should verify that this timestamp is ± 60s of 'now'. |
StatementNotificationResultCode
Result codes for statement notification.
Enums | |
---|---|
UNKNOWN_RESULT |
Do not ever set this default value! |
ACCEPTED |
Integrator has accepted this statement. |