- [HTTP request](https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#body.request_body)
  - [JSON representation](https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#body.response_body)
- [ChargebackStage](https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#ChargebackStage)
- [ChargebackNotificationResponse](https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#ChargebackNotificationResponse)
  - [JSON representation](https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#ChargebackNotificationResponse.SCHEMA_REPRESENTATION)
- [ChargebackNotificationResultCode](https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#ChargebackNotificationResultCode)

Notifies Google that a chargeback is being issued for a payment.

This signifies a user is contesting a payment and the issuer has decided to issue a chargeback. When the request is made it signifies that the user is being reimbursed by the issuer and will recover those funds either from the integrator or from Google.

<br />

> [!IMPORTANT]
> **Key Point:** These chargebacks can be challenged by Google through the documented representment process.

<br />

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`](https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/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`](https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/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`](https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/ErrorResponse).

An example request looks like:


    {
      "requestHeader": {
        "protocolVersion": {
          "major": 1,
          "minor": 0,
          "revision": 0
        },
        "requestId": "fe640ae3-d9af-4075-90a1-7b90f436b3c0",
        "requestTimestamp": "1484584747000"
      },
      "paymentIntegratorAccountId": "SpeedyPaymentsIndia_INR",
      "captureRequestId": "G112YZH4XPDV88J",
      "amount": "728000000",
      "chargebackStage": "FIRST",
      "reasonCode": "INCORRECT_MERCHANDISE",
      "rawResult": {
        "scope": "VISA",
        "rawCode": "04"
      },
      "chargebackDate": "1483574400000",
      "replyByDate": "1491350400000",
      "caseId": "G-7832-13512"
    }

An example response looks like:


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

### HTTP request

`POST https://vgw.googleapis.com/gsp/e-wallets-v1/chargebackNotification/https://developers.google.com/pay/e-wallets-v1/reference/glossary#payment_integrator_account_id`

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "requestHeader": { object (https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/RequestHeader) }, "paymentIntegratorAccountId": string, "captureRequestId": string, "amount": string, "chargebackStage": enum (`https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#ChargebackStage`), "reasonCode": enum (`https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/PaymentDisputeReasonCode`), "rawResult": { object (https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/RawResult) }, "chargebackDate": string, "replyByDate": string, "caseId": string } ``` |

| Fields ||
|---|---|
| `requestHeader` | `object (https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/RequestHeader)` **REQUIRED**: Common header for all requests. |
| `paymentIntegratorAccountId` | `string` **REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this transaction. |
| `captureRequestId` | `string` **REQUIRED** : A unique identifier for the capture that the chargeback is associated with. This is the `requestId` generated by Google during the `captureFundsReservation` or `capture` which this request is associated with. |
| `amount` | `string (https://developers.google.com/discovery/v1/type-format format)` **REQUIRED** : The amount of the chargeback, in [micros](https://developers.google.com/pay/e-wallets-v1/reference/glossary#micros "What are micros?") of the currency unit. This must be greater than zero and less than or equal to the amount in the `capture` or `captureFundsReservation` request and is in the same currency unit as the capture. |
| `chargebackStage` | ``enum (`https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#ChargebackStage`)`` **REQUIRED**: This represents whether this was the first or second chargeback event for this capture. A second chargeback, also known as Second Presentment or Pre-arbitration is when the result of an initial chargeback was challenged. The second chargeback is a separate event that can also be reversed. Once a second chargeback event has occurred the payment is in a terminal state and no subsequent chargeback events can be added. |
| `reasonCode` | ``enum (`https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/PaymentDisputeReasonCode`)`` **REQUIRED**: The reason the transaction is being charged back. |
| `rawResult` | `object (https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/RawResult)` **REQUIRED** : Raw result of the chargeback request from the issuer. 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 chargeback code that was received from the VISA network. In that case, the `scope` would be "visa" and the `rawCode` would be whatever the VISA network returned. |
| `chargebackDate` | `string (https://developers.google.com/discovery/v1/type-format format)` **REQUIRED** Timestamp of the date that the chargeback was requested. If that date is not known then the date that the payment integrator received the notification for a chargeback. It is represented as milliseconds since epoch. This is a date and therefore should be the first millisecond of the day in the America/Los Angeles timezone. If it is not the first millisecond of the day the date will be assumed to be the day the specified millisecond falls on in the America/Los Angeles time zone. |
| `replyByDate` | `string (https://developers.google.com/discovery/v1/type-format format)` **REQUIRED**: Timestamp of the date by which a reply must be received by the payment integrator if Google chooses to represent the transaction and challenge the chargeback. It is represented as milliseconds since epoch. This is a date and therefore should be the first millisecond of the day in the America/Los Angeles timezone. If it is not the first millisecond of the day the date will be assumed to be the day the specified millisecond falls on in the America/Los Angeles time zone. |
| `caseId` | `string` **REQUIRED**: A unique value assigned to each chargeback that the issuer and payment integrator can use to identify this chargeback. |

### 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](https://developers.google.com/pay/e-wallets-v1/guides/connectivity/protocol-standards#http_status_codes).

| Possible response messages ||
|---|---|
| HTTP 200 Status | ``object (`https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#ChargebackNotificationResponse`)`` |
| HTTP 4XX / 5XX Status | `object (https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/ErrorResponse)` |
| End of mutually exclusive fields. ||

## ChargebackStage

The reason the transaction is being charged back.

| Enums ||
|---|---|
| `UNKNOWN_STAGE` | Do not ever set this default value! |
| `FIRST` | This is the first chargeback request for this capture. |
| `SECOND` | This is the second chargeback request for this capture. This is used when a chargeback has already been attempted but was reversed and the issuer is requesting a second chargeback for a different amount or for a different reason. |

## ChargebackNotificationResponse

Response object for Google hosted e-wallets-v1.chargebackNotification method.

| JSON representation |
|---|
| ``` { "responseHeader": { object (https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/ResponseHeader) }, "result": enum (`https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#ChargebackNotificationResultCode`) } ``` |

| Fields ||
|---|---|
| `responseHeader` | `object (https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/ResponseHeader)` **REQUIRED**: Common header for all responses. |
| `result` | ``enum (`https://developers.google.com/pay/e-wallets-v1/google-e-wallets-api/chargebackNotification#ChargebackNotificationResultCode`)`` **REQUIRED**: Result of this call. |

## ChargebackNotificationResultCode

Result codes for the `chargebackNotification` method.

| Enums ||
|---|---|
| `UNKNOWN_RESULT` | Do not ever set this default value! |
| `SUCCESS` | Chargeback notification was successfully processed. |