- HTTP request
- Request body
- Response body
- RequestHeader
- Version
- MrnPaymentDetails
- DefenseMaterialDocument
- MimeType
- DefendChargebackResponse
- ResponseHeader
- DefendChargebackResultCode
- ErrorResponse
- ErrorResponseCode
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 ( |
Fields | |
---|---|
requestHeader |
REQUIRED: Common header for all requests. |
paymentIntegratorAccountId |
REQUIRED: This is the payment integrator account identifier that identifies contractual constraints around this transaction. |
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 |
A unique identifier for the payment that is being defended. This is the |
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 |
|
HTTP 4XX / 5XX Status |
|
RequestHeader
Header object that is defined on all requests sent to the server.
JSON representation |
---|
{
"requestId": string,
"requestTimestamp": string,
"userLocale": string,
"protocolVersion": {
object ( |
Fields | |
---|---|
requestId |
REQUIRED: Unique identifier of this request. This is a string that has a max length of 100 characters, and contains only the characters "a-z", "A-Z", "0-9", ":", "-", and "_". |
requestTimestamp |
REQUIRED: Timestamp of this request represented as milliseconds since epoch. The receiver should verify that this timestamp is ± 60s of 'now'. This request timestamp is not idempotent upon retries. |
userLocale |
DEPRECATED: A two- or three-letter ISO 639-2 Alpha 3 language code optionally followed by a hyphen and an ISO 3166-1 Alpha-2 country code, e.g.'pt', 'pt-BR', 'fil', or 'fil-PH'. Use this to help drive the |
protocolVersion |
REQUIRED: The version of this request. |
Version
Version object which is a structured form of the classic a.b.c
version structure. Major versions of the same number are guaranteed to be compatible. Note that minor and revisions can change frequently and without notice. The integrator must support all requests for the same major version.
JSON representation |
---|
{ "major": integer, "minor": integer, "revision": integer } |
Fields | |
---|---|
major |
REQUIRED: Major version. This is marked for compatibility requests with different versions are not guaranteed to be compatible. |
minor |
REQUIRED: Minor version. This denotes significant bug fixes. |
revision |
REQUIRED: Minor version. This denotes minor bug fixes. |
MrnPaymentDetails
Details to lookup payments which originated outside of GSP.
JSON representation |
---|
{ "disputeCaseId": string, "merchantReferenceNumber": string, "merchantId": string } |
Fields | |
---|---|
disputeCaseId |
REQUIRED: The ID which identifies the dispute being represented. |
merchantReferenceNumber |
REQUIRED: The merchant reference number of the original transaction. |
merchantId |
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 ( |
Fields | |
---|---|
mimeType |
REQUIRED: The MIME type of the document. Only the listed subset of IANA published MIME types are valid. |
payload |
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 india-cards-v1.defendChargeback method.
JSON representation |
---|
{ "responseHeader": { object ( |
Fields | |
---|---|
responseHeader |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Result of this call. |
ResponseHeader
Header object that is defined on all responses sent from the server.
JSON representation |
---|
{ "responseTimestamp": string } |
Fields | |
---|---|
responseTimestamp |
REQUIRED: Timestamp of this response represented as milliseconds since epoch. The receiver should verify that this timestamp is ± 60s of 'now'. |
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. |
ErrorResponse
Error Response object for all methods.
JSON representation |
---|
{ "responseHeader": { object ( |
Fields | |
---|---|
responseHeader |
REQUIRED: Common header for all responses. |
errorResponseCode |
OPTIONAL: A code that captures the type of error that occurred. |
errorDescription |
OPTIONAL: Provide a description of this status for support reps to debug errors. Note that this is never shown to users. It can contain descriptive, non-sensitive text used for debugging. Note that some values for errorResponseCode should be accompanied by additional detail in this field. For example, |
paymentIntegratorErrorIdentifier |
OPTIONAL: This identifier is specific to the integrator and is generated by the integrator. It is used for debugging purposes only in order to identify this call. This is the identifier that the integrator knows this call by. |
ErrorResponseCode
Error Codes
Enums | |
---|---|
UNKNOWN_ERROR_RESPONSE_CODE |
Do not ever set this default value! |
INVALID_API_VERSION |
Used if the request's API version is unsupported. Advised HTTP Code: 400 |
INVALID_PAYLOAD_SIGNATURE |
Used if the signature of the payload is to an unknown or inactive key. Advised HTTP Code: 401 |
INVALID_PAYLOAD_ENCRYPTION |
Used if the encryption of the payload is to an unknown or inactive key. Advised HTTP Code: 400 |
REQUEST_TIMESTAMP_OUT_OF_RANGE |
Used if the requestTimestamp is not ± 60s of now. Advised HTTP Code: 400 |
INVALID_IDENTIFIER |
Used if an identifier sent in the request was invalid or unknown. This may include PIAID, captureRequestId, Google Payment Token, etc. The type of the invalid identifier should be specified in the errorDescription. Advised HTTP Code: 404 |
IDEMPOTENCY_VIOLATION |
Used if the request violates the idempotency requirements for the request. Advised HTTP Code: 412 |
INVALID_FIELD_VALUE |
Used if the request contains a value for a field that isn't in the set of supported values. Advised HTTP Code: 400 |
MISSING_REQUIRED_FIELD |
Used if a field that is required is unset in the request. Advised HTTP Code: 400 |
PRECONDITION_VIOLATION |
Used if a constraint on the operation is violated (e.g. when a request for a refund amount exceeds the amount remaining on the transaction). Advised HTTP Code: 400 |
USER_ACTION_IN_PROGRESS |
Used if the request cannot be processed at this time because it would interrupt an in-process user action which effectively acts as a system lock. This code must not be used to indicate failures due to implementation-specific internal concurrency errors. Advised HTTP Code: 423 |
INVALID_DECRYPTED_REQUEST |
Used if the request payload could be decrypted, but the resulting message could not be parsed. Advised HTTP Code: 400 |
FORBIDDEN |
Access to the requested resource is foribidden. Advised HTTP Code: 403 |