- HTTP request
- Request body
- Response body
- PaymentLocation
- Amount
- PayerInfo
- TaxInfo
- BrazilTaxInfo
- BankAccountIdentifier
- BrazilBankAccountInfo
- ReferenceNumberPaidNotificationResponse
- ReferenceNumberPaidNotificationResultCode
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/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 ( |
Fields | |
---|---|
request |
REQUIRED: Common header for all requests. |
payment |
REQUIRED: This is the payment integrator account identifier on which the reference number was created. |
payment |
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. |
reference |
REQUIRED: Reference number that the user has paid. For legacy integrations, it is the For new integrations, it is the |
payment |
REQUIRED: Timestamp recorded by the integrator when the user paid this reference number (milliseconds since epoch). |
payment |
REQUIRED: Information about the physical location where the user paid. |
paid |
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 |
payer |
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: |
|
pix |
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 | |
HTTP 4XX / 5XX Status |
|
PaymentLocation
Information about the physical location where the user paid.
JSON representation |
---|
{ "brandName": string, "locationId": string } |
Fields | |
---|---|
brand |
REQUIRED: The brand name of the location where the user paid (for example, the brand name of the store chain). |
location |
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). |
Amount
Associates an amount in micros with a currency code.
JSON representation |
---|
{ "amountMicros": string, "currencyCode": string } |
Fields | |
---|---|
amount |
REQUIRED: An amount in micros. |
currency |
REQUIRED: ISO 4217 3-letter currency code |
PayerInfo
Information about the person making the payment.
JSON representation |
---|
{ "payerTaxInfo": { object ( |
Fields | |
---|---|
payer |
OPTIONAL: Tax-related information about the payer, such as tax ID or orther relevant identifiers. |
payer |
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 |
Fields | |
---|---|
Union field country . Country-specific tax details for the payer. country can be only one of the following: |
|
brazil |
Specific tax details for Brazil. |
BrazilTaxInfo
Tax-related information about the payer specific to Brazil.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field tax_number . The payer's Brazilian tax ID (CNPJ or CPF). tax_number can be only one of the following: |
|
cnpj |
Cadastro Nacional da Pessoa Jurídica (CNPJ), an identification number issued to Brazilian companies. |
cpf |
Cadastro de Pessoas Físicas (CPF), the Brazilian individual taxpayer registry identification. |
BankAccountIdentifier
Unique identifier of a bank account.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field account_identifier . Country-specific bank account details. account_identifier can be only one of the following: |
|
brazil |
An account with a bank in Brazil. |
BrazilBankAccountInfo
Details of a user's bank account in Brazil.
JSON representation |
---|
{ "bankCode": string, "branchCode": string, "accountNumber": string } |
Fields | |
---|---|
bank |
The unique code identifying the bank associated with the payer's account. |
branch |
The specific code representing the branch where the payer's account is held. |
account |
The unique number identifying the payer's bank account. |
ReferenceNumberPaidNotificationResponse
Response object for the referenceNumberPaidNotification method.
JSON representation |
---|
{
"responseHeader": {
object (ResponseHeader)
},
"result": enum ( |
Fields | |
---|---|
response |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Result of the call. |
google |
OPTIONAL: Populated if |
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. |