Notify Google of the result of a refund after a refund
method call has been made.
Refunds should be handled synchronously during the refund
method call, but this method provides Google with a fast backup signal in case the synchronous call fails after it has performed the action but before it can return a result. This avoids the delay introduced by Google scheduling a retry for a future time.
The refundResult
value is idempotent for this refundRequestId
, so it's value can not be changed by a subsequent call to this method.
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
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.ErrorResponse
An example request looks like:
{
"requestHeader": {
"protocolVersion": {
"major": 1,
"minor": 1,
"revision": 0
},
"requestId": "HsKv5pvtQKTtz7rdcw1YqE",
"requestTimestamp": "1481855928301"
},
"paymentIntegratorAccountId": "InvisiCashUSA_USD",
"refundRequestId": "hH1T32PI86CpKwjuf6oD2r",
"paymentIntegratorRefundId": "invisi/Id::xx__1243",
"refundResult": "SUCCESS"
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": "1481855928376"
},
"result": "SUCCESS"
}
HTTP request
POST https://vgw.googleapis.com/secure-serving/gsp/v1/refundResultNotification/:PIAID
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: Payment integrator account identifier on which the refund occurred. |
refundRequestId |
REQUIRED: Unique identifier for this refund, established by the |
refundResult |
REQUIRED: Result of this refund. |
paymentIntegratorRefundId |
REQUIRED: This identifier is specific to the integrator and is generated by the integrator. This is the identifier that the integrator knows this refund by. For convenience, this identifier is included with in the remittance details |
Response body
Response object for the refundResultNotification
method.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "responseHeader": { object ( |
Fields | |
---|---|
responseHeader |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Result of this call. |
RefundResultCode
The unique result codes refunds.
Enums | |
---|---|
UNKNOWN_RESULT |
Do not ever set this default value! |
SUCCESS |
Successful refund. |
NO_MONEY_LEFT_ON_TRANSACTION |
Refund failed, there is no money left on the transaction. Typically this represents bug between the integrator and Google. Google should not ask to refund an amount greater than the original capture. |
ACCOUNT_CLOSED |
The account held with the integrator has been closed. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again. |
ACCOUNT_CLOSED_ACCOUNT_TAKEN_OVER |
The user's account with the integrator has been closed, suspected account take over. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again. |
ACCOUNT_CLOSED_FRAUD |
The user's account held with the integrator has been closed because of fraud. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again. |
ACCOUNT_ON_HOLD |
The user's account is currently on hold and cannot accept the refund, but the user's account may later be able to accept the refund. Google may request another refund in the future, but will do so with a new requestId , so this request should be considered finished. |
REFUND_EXCEEDS_MAXIMUM_BALANCE |
The refund cannot be processed at the current time, because doing so would cause the user's balance to exceed the maximum allowed amount. Google may request another refund in the future, but will do so with a new requestId , so this request should be considered finished. |
REFUND_WINDOW_EXCEEDED |
The refund cannot be processed because the request is outside of the allowed refund period. |
RefundResultNotificationResultCode
Result codes for the refundResultNotification
method.
Enums | |
---|---|
UNKNOWN_RESULT |
Do not ever set this default value! |
SUCCESS |
Refund result notification was successful. |