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)
  },
  "payerInfo": {
    object (PayerInfo)
  },

  // 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.

payerInfo

object (PayerInfo)

OPTIONAL: Details about the person making the payment. This may include tax information, bank account details, etc.

Providing this information enhances our ability to detect and prevent fraudulent activity by adding Risk checks, making the payment system more secure for cash FOPs. If this information is not provided, the payment system will still function normally but may not be as secure.

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).

PayerInfo

Information about the person making the payment.

JSON representation
{
  "payerTaxInfo": {
    object (TaxInfo)
  },
  "payerBankAccountIdentifier": {
    object (BankAccountIdentifier)
  }
}
Fields
payerTaxInfo

object (TaxInfo)

OPTIONAL: Tax-related information about the payer, such as tax ID or orther relevant identifiers.

payerBankAccountIdentifier

object (BankAccountIdentifier)

OPTIONAL: Banking details of the payer, potentially including bank name, account number, or other identifying information.

TaxInfo

Tax-related information about the payer.

JSON representation
{

  // Union field country can be only one of the following:
  "brazil": {
    object (BrazilTaxInfo)
  }
  // End of list of possible types for union field country.
}
Fields
Union field country. Country-specific tax details for the payer. country can be only one of the following:
brazil

object (BrazilTaxInfo)

Specific tax details for Brazil.

BrazilTaxInfo

Tax-related information about the payer specific to Brazil.

JSON representation
{

  // Union field tax_number can be only one of the following:
  "cnpj": string,
  "cpf": string
  // End of list of possible types for union field tax_number.
}
Fields
Union field tax_number. The payer's Brazilian tax ID (CNPJ or CPF). tax_number can be only one of the following:
cnpj

string

Cadastro Nacional da Pessoa Jurídica (CNPJ), an identification number issued to Brazilian companies.

cpf

string

Cadastro de Pessoas Físicas (CPF), the Brazilian individual taxpayer registry identification.

BankAccountIdentifier

Unique identifier of a bank account.

JSON representation
{

  // Union field account_identifier can be only one of the following:
  "bazilBankAccount": {
    object (BazilBankAccountInfo)
  }
  // End of list of possible types for union field account_identifier.
}
Fields
Union field account_identifier. Country-specific bank account details. account_identifier can be only one of the following:
bazilBankAccount

object (BazilBankAccountInfo)

An account with a bank in Brazil.

BazilBankAccountInfo

Details of a user's bank account in Bazil.

JSON representation
{
  "bankCode": string,
  "branchCode": string,
  "accountNumber": string
}
Fields
bankCode

string

The unique code identifying the bank associated with the payer's account.

branchCode

string

The specific code representing the branch where the payer's account is held.

accountNumber

string

The unique number identifying the payer's bank account.

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.