- HTTP request
- Request body
- Response body
- ReferenceNumberPaymentStatus
- SuccessDetails
- InstallmentPlanType
- AccountNotEligible
- ReferenceNumberPaymentStatusNotificationResponse
- ReferenceNumberPaymentStatusNotificationResult
- Success
RECOMMENDED: Notifies Google of the status of a reference number payment. This method supports Succeeded, Pending, and Declined statuses.
If the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type ErrorResponse or contain a generic error (e.g. a message similar to "There was an error. Please try again later.").
The generic error is used 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 a generic error. If the request signature could be verified, additional information regarding the error will be returned in an ErrorResponse.
An example request looks like:
{
"requestHeader": {
"protocolVersion": {
"major": 1,
"minor": 0,
"revision": 0
},
"requestId": "req-status-123456",
"requestTimestamp": "1778748779585"
},
"paymentIntegratorAccountId": "paidy-retail-account",
"referenceNumber": "pay_Hovihg1oLIH35LV",
"paymentStatusResult": {
"updateSequenceTimestamp": {
"epochMillis": "1778748779000"
},
"paymentIntegratorTransactionId": "paidy-tx-98765",
"success": {
"paidAmount": {
"amountMicros": "10000000",
"currencyCode": "JPY"
},
"installmentPlanType": "INSTALLMENT_PLAN_3_MONTHS",
"paymentTimestamp": {
"epochMillis": "1778748778000"
}
}
}
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": "1778748780000"
},
"result": {
"success": {
"googlePaymentTransactionId": "google-tx-123456"
}
}
}
HTTP request
POST https://vgw.googleapis.com/gsp/refundable-one-time-payment-code-v1/referenceNumberPaymentStatusNotification/:PIAID
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{
"requestHeader": {
object (RequestHeader)
},
"paymentIntegratorAccountId": string,
"referenceNumber": string,
"paymentStatusResult": {
object ( |
| Fields | |
|---|---|
requestHeader |
REQUIRED: Common header for all requests. |
paymentIntegratorAccountId |
REQUIRED: This is the payment integrator account identifier. |
referenceNumber |
REQUIRED: Reference number that this notification pertains to. For legacy integrations, it is the For new integrations, it is the |
paymentStatusResult |
REQUIRED: The current status details of the reference number payment. |
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.
| JSON representation |
|---|
{ // Union field |
| Possible response messages | |
|---|---|
| HTTP 200 Status | |
| HTTP 4XX / 5XX Status |
|
ReferenceNumberPaymentStatus
The current status of the payment.
| JSON representation |
|---|
{ "updateSequenceTimestamp": { object (Timestamp) }, "paymentIntegratorTransactionId": string, "payerInfo": { object ( |
| Fields | |
|---|---|
updateSequenceTimestamp |
REQUIRED: A timestamp (in UTC) describing when this payment status is effective at the vendor. This can be used for order handling and sequencing. |
paymentIntegratorTransactionId |
OPTIONAL: The vendor's unique identifier for this transaction. |
payerInfo |
OPTIONAL: Details about the person making the payment. This may include tax information, bank account details, etc. |
Union field result. The status details. result can be only one of the following: |
|
success |
OPTIONAL: The payment was successful. |
pendingUserAction |
OPTIONAL: The payment is pending an action from the user. |
pendingVendorProcessing |
OPTIONAL: The payment is currently being processed by the vendor or underlying payment network. |
insufficientFunds |
OPTIONAL: The payment was declined due to insufficient funds or credit. |
riskDeclined |
OPTIONAL: The payment was declined due to risk assessment by the vendor. |
userIneligible |
OPTIONAL: The user is not eligible for this payment method or terms. |
canceled |
OPTIONAL: The payment was canceled, likely due to a timeout or user action. |
Union field end_to_end_network_identifier. OPTIONAL: Identifier specific for a network. end_to_end_network_identifier can be only one of the following: |
|
pixEndToEndId |
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. |
SuccessDetails
Details for a successful payment.
| JSON representation |
|---|
{
"paidAmount": {
object (Amount)
},
"installmentPlanType": enum ( |
| Fields | |
|---|---|
paidAmount |
REQUIRED: The amount paid. |
installmentPlanType |
OPTIONAL: The type of installment plan selected by the user. |
paymentTimestamp |
REQUIRED: Timestamp of when the user physically paid. |
InstallmentPlanType
The type of the installment plan.
| Enums | |
|---|---|
INSTALLMENT_PLAN_TYPE_UNSPECIFIED |
Do not ever set this default value. |
INSTALLMENT_PLAN_NONE |
A plan with no installments, i.e. paid immediately. |
INSTALLMENT_PLAN_3_MONTHS |
An installment plan paid in 3 installments. |
INSTALLMENT_PLAN_6_MONTHS |
An installment plan paid in 6 installments. |
INSTALLMENT_PLAN_9_MONTHS |
An installment plan paid in 9 installments. |
INSTALLMENT_PLAN_12_MONTHS |
An installment plan paid in 12 installments. |
INSTALLMENT_PLAN_18_MONTHS |
An installment plan paid in 18 installments. |
INSTALLMENT_PLAN_24_MONTHS |
An installment plan paid in 24 installments. |
INSTALLMENT_PLAN_36_MONTHS |
An installment plan paid in 36 installments. |
AccountNotEligible
User's account is not eligible for this service.
| JSON representation |
|---|
{ "rawResult": { object (RawResult) } } |
| Fields | |
|---|---|
rawResult |
OPTIONAL: Raw result of this event. Used to help inform Google's risk engine and analytics. In decline code–mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the |
ReferenceNumberPaymentStatusNotificationResponse
Response object for the referenceNumberPaymentStatusNotification method.
| JSON representation |
|---|
{
"responseHeader": {
object (ResponseHeader)
},
"result": {
object ( |
| Fields | |
|---|---|
responseHeader |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Result of the call. |
ReferenceNumberPaymentStatusNotificationResult
Result of the referenceNumberPaymentStatusNotification method.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field result. The result of the call. result can be only one of the following: |
|
success |
OPTIONAL: The notification was successfully received. |
Success
Details for a successful notification ACK.
| JSON representation |
|---|
{ "googlePaymentTransactionId": string } |
| Fields | |
|---|---|
googlePaymentTransactionId |
OPTIONAL: A Google-generated identifier for this transaction that is included when the payment integrator requests |