Method: referenceNumberPaidNotification

Notify Google that a customer completed payment of a reference number.

It is expected that this will be called within milliseconds of the user paying. While this call can be enqueued if the network is down, Google expects the user will typically receive notification that their payment has been paid by the time they are leaving the store.

If the endpoint encounters an error while processing the request, the response from this endpoint will be of type ErrorResponse.

Responses to this query may be empty if this method does not return an HTTP 200. The response body is empty 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 an HTTP 404 with an empty body. If the request signature could be verified, additional information regarding the error will be returned in the response body.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 0,
      "revision": 0
    },
    "requestId": "ZWNobyB0cmFuc2FjdGlvbg",
    "requestTimestamp": "1481855969503"
  },
  "paymentIntegratorAccountId": "InvisiCashUSA_USD",
  "paymentIntegratorTransactionId": "abc-e34-21343",
  "referenceNumber": "a1234567",
  "paymentTimestamp": "1481855969203",
  "paymentLocation": {
    "brandName": "ExampleMart",
    "locationId": "7783"
  }
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": "1481855970403"
  },
  "result": "SUCCESS"
}

HTTP request

POST https://vgw.googleapis.com/gsp/refundable-one-time-payment-code-v1/referenceNumberPaidNotification/:PIAID

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "paymentIntegratorAccountId": string,
  "paymentIntegratorTransactionId": string,
  "referenceNumber": string,
  "paymentTimestamp": string,
  "paymentLocation": {
    object (PaymentLocation)
  },
  "paidAmount": {
    object (Amount)
  },

  // Union field end_to_end_network_identifier can be only one of the following:
  "pixEndToEndId": string
  // End of list of possible types for union field end_to_end_network_identifier.
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

paymentIntegratorAccountId

string

REQUIRED: This is the payment integrator account identifier on which the reference number was created.

paymentIntegratorTransactionId

string

OPTIONAL: This identifier is specific to the integrator and is generated by the integrator. This is the identifier by which the integrator knows this transaction.

For convenience, this identifier is included when the payment integrator requests remittanceStatementDetails.

referenceNumber

string

REQUIRED: Reference number that the user has paid.

For legacy integrations, it is the referenceNumber of the generateReferenceNumber call for this transaction.

For new integrations, it is the printableString of the generateReferenceNumber call for this transaction. If the generateReferenceNumber call doesn't contains printableString, it falls back to the barcodeContents of the same call.

paymentTimestamp

string (int64 format)

REQUIRED: Timestamp recorded by the integrator when the user paid this reference number (milliseconds since epoch).

paymentLocation

object (PaymentLocation)

REQUIRED: Information about the physical location where the user paid.

paidAmount

object (Amount)

TO-BE-REQUIRED: The amount actually paid by the user.

The user should not be allowed to pay a different amount than the amount sent in the generateReferenceNumber call, and any cases of the amount mismatching will be treated as a bug requiring investigation. This field supports accurate accounting of how much the user actually paid, independent of what the user should have paid.

Union field end_to_end_network_identifier. Identifier speicific for a newwork. end_to_end_network_identifier can be only one of the following:
pixEndToEndId

string

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, either a payment or a refund.

Response body

This method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an ErrorResponse, consult the ErrorResponse object and HTTP status codes documentation.

Possible response messages
HTTP 200 Status

object (ReferenceNumberPaidNotificationResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

PaymentLocation

Information about the physical location where the user paid.

JSON representation
{
  "brandName": string,
  "locationId": string
}
Fields
brandName

string

REQUIRED: The brand name of the location where the user paid (for example, the brand name of the store chain).

locationId

string

REQUIRED: A unique name, number, or other identifier for the specific location where the user paid (for example a number representing the particular store within a brand of stores).

ReferenceNumberPaidNotificationResponse

Response object for the referenceNumberPaidNotification method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": enum (ReferenceNumberPaidNotificationResultCode),
  "googlePaymentTransactionId": string
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

enum (ReferenceNumberPaidNotificationResultCode)

REQUIRED: Result of the call.

googlePaymentTransactionId

string

OPTIONAL: Populated if result is SUCCESS, otherwise not populated. A Google-generated identifier for this transaction that is included when the payment integrator requests remittanceStatementDetails.

ReferenceNumberPaidNotificationResultCode

Result codes for the payReferenceNumber method.

Enums
UNKNOWN_RESULT Do not ever set this default value!
SUCCESS The reference number was successfully recorded as paid.
INVALID_REFERENCE_NUMBER The reference number was not found.