Method: defendChargeback

This method is called by Google to defend an Inquiry or a Chargeback.

If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type ErrorResponse.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 0,
      "revision": 0
    },
    "requestId": "G1MQ0YERJ0Q7LPM",
    "requestTimestamp": "1481899949606"
  },
  "paymentIntegratorAccountId": "InvisiCashUSA_USD",
  "captureRequestId": "G664529173",
  "defenseMaterialDocument" : {
     "mimeType": "APPLICATION_PDF",
     "payload": "ZGFzZGFkYXNkc2Rhc2Rhc2Rhc2Zhc2Y="
  }
}

An example response looks like:


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

HTTP request

POST https://www.integratorhost.example.com/integrator-base-path/v1/payment-integrator-dispute-api/defendChargeback

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "paymentIntegratorAccountId": string,
  "defenseMaterialDocument": {
    object (DefenseMaterialDocument)
  },

  // Union field criteria can be only one of the following:
  "captureRequestId": string,
  "mrnPaymentDetails": {
    object (MrnPaymentDetails)
  }
  // End of list of possible types for union field criteria.
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

paymentIntegratorAccountId

string

REQUIRED: This is the payment integrator account identifier that identifies contractual constraints around this transaction.

defenseMaterialDocument

object (DefenseMaterialDocument)

REQUIRED: Present when the chargeback is defended using a PDF document.

Union field criteria. REQUIRED: Details which identify the transaction and/or dispute. criteria can be only one of the following:
captureRequestId

string

A unique identifier for the payment that is being defended. This is the requestId generated by Google during the captureFundsReservation or capture which this request is associated with.

mrnPaymentDetails

object (MrnPaymentDetails)

Details to lookup payments that originated outside of GSP.

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 (DefendChargebackResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

MrnPaymentDetails

Details to lookup payments which originated outside of GSP.

JSON representation
{
  "disputeCaseId": string,
  "merchantReferenceNumber": string,
  "merchantId": string
}
Fields
disputeCaseId

string

REQUIRED: The ID which identifies the dispute being represented.

merchantReferenceNumber

string

REQUIRED: The merchant reference number of the original transaction.

merchantId

string

REQUIRED: The MID for the payment processor that handled the original transaction.

DefenseMaterialDocument

A chargeback defense in the form of a PDF document.

JSON representation
{
  "mimeType": enum (MimeType),
  "payload": string
}
Fields
mimeType

enum (MimeType)

REQUIRED: The MIME type of the document. Only the listed subset of IANA published MIME types are valid.

payload

string

REQUIRED: The raw bytes of the PDF document encoded using base64url.

MimeType

The MIME type of a document.

Enums
MIME_TYPE_UNSPECIFIED DO NOT USE
IMAGE_PNG Equivalent of IANA published MIME type image/png.
IMAGE_JPEG Equivalent of IANA published MIME type image/jpeg.
IMAGE_GIF Equivalent of IANA published MIME type image/gif.
APPLICATION_PDF Equivalent of IANA published MIME type application/pdf.

DefendChargebackResponse

Response object for the payment integrator hosted card-fop-v1.defendChargeback method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": enum (DefendChargebackResultCode)
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

enum (DefendChargebackResultCode)

REQUIRED: Result of this call.

DefendChargebackResultCode

Result codes for the defendChargeback method.

Enums
DEFEND_CHARGEBACK_RESULT_CODE_UNSPECIFIED Do not ever set this default value!
SUCCESS The defense was successfully submitted.
CAPTURE_REQUEST_ID_NOT_FOUND The captureRequestId is not known to the recipient of the request.
INVALID_DOCUMENT_FORMAT The document payload is malformed.
CHARGEBACK_NOT_DEFENDABLE There is no recourse to defend this chargeback.