Docs
DocsAPI ExplorerChangelog

Chargeback Management API

Updated on June 25, 2026
View as Markdown

The Chargeback Management API lets merchants programmatically retrieve, manage, and respond to chargebacks. It replaces manual workflows (email or the chargeback portal) so you can integrate chargeback handling directly into your own internal systems.

This guide covers the merchant API endpoints for chargeback requests:

  • GET /api/v1/chargeback_requests — list chargeback requests
  • GET /api/v1/chargeback_requests/{id} — get a chargeback request's details
  • POST /api/v1/chargeback_requests/{id}/accept — accept a chargeback
  • POST /api/v1/chargeback_requests/{id}/defend — defend a chargeback
Caution

Feature gate

All chargeback endpoints are guarded by chargeback feature enablement for your merchant account. If the feature is not enabled, these endpoints return 404 Not Found. Contact KOMOJU support to enable it.

Authentication

Use your merchant secret key with Authentication. Send the secret key as the HTTP Basic Auth username and leave the password blank. You can find your secret key on the API key page of your merchant dashboard.

Shell
curl -u YOUR_SECRET_KEY: \
  https://komoju.com/api/v1/chargeback_requests

Common behavior

  • Date/time inputs must be ISO 8601 date-time strings (for example 2026-05-01T00:00:00Z).
  • List endpoints use the standard pagination format: resource, total, page, per_page, last_page, data.
  • per_page defaults to 10, with a maximum of 100.

Chargeback statuses

StatusDescription
pendingAwaiting your response (accept or defend).
acceptedYou accepted the chargeback.
defendedYou submitted a defense.
cancelledThe chargeback was cancelled.
expiredThe response window passed without a response.
lostThe chargeback was decided against you.

List chargeback requests

Retrieves a paginated list of chargeback requests for the authenticated merchant.

AuthenticationMethodEndpoint
Secret keyGEThttps://komoju.com/api/v1/chargeback_requests

Returns 200 OK on success.

Query ParameterTypeDescription
statusstringFilter by status. One of pending, accepted, cancelled, expired, defended, lost.
payment_idstringFilter by the associated payment ID.
start_timestring date-timeLower bound (inclusive) on the chargeback's created time.
end_timestring date-timeUpper bound (inclusive) on the chargeback's created time.
due_date_startstring date-timeLower bound (inclusive) on the chargeback's due date.
due_date_endstring date-timeUpper bound (inclusive) on the chargeback's due date.
per_pageintegerResults per page. Defaults to 10, max 100.
pageintegerPage number. Defaults to 1.
Note

Ordering

Results are returned with pending chargebacks first, followed by non-pending chargebacks. There is no request sort parameter.

Example request

Shell
curl -X GET "https://komoju.com/api/v1/chargeback_requests?status=pending&start_time=2026-05-01T00:00:00Z&end_time=2026-05-31T23:59:59Z&per_page=10&page=1" \
  -u YOUR_SECRET_KEY: \
  -H "Content-Type: application/json"

Example response

JSON
{
  "resource": "list",
  "total": 2,
  "page": 1,
  "per_page": 10,
  "last_page": 1,
  "data": [
    {
      "id": "igqcsinacgl9iwz7ii3bknwpr",
      "payment_id": "enj2pugqquwjlb1slvk3pikr8",
      "amount": 1000,
      "currency": "JPY",
      "payment_method": {
        "type": "credit_card",
        "brand": "visa",
        "last_four_digits": "4242"
      },
      "reason_code": "CB_Fraud",
      "reason": "Fraud",
      "created_at": "2026-05-06T02:49:18Z",
      "due_date": "2026-05-22T02:49:18Z",
      "status": "pending"
    }
  ]
}

Get a chargeback request

Retrieves the details of a single chargeback request, including its timeline, payment, customer, and defense (if one exists).

AuthenticationMethodEndpoint
Secret keyGEThttps://komoju.com/api/v1/chargeback_requests/{id}

Returns 200 OK on success.

Path ParameterTypeDescription
idstringThe chargeback request UUID.

Example request

Shell
curl -X GET "https://komoju.com/api/v1/chargeback_requests/igqcsinacgl9iwz7ii3bknwpr" \
  -u YOUR_SECRET_KEY: \
  -H "Content-Type: application/json"

Example response

JSON
{
  "id": "2sqtcy1hpq0y3f3sos0l1zrww",
  "status": "defended",
  "reason_code": "CB_Fraud",
  "reason": "Fraud / Unauthorized Transaction",
  "created_at": "2026-05-28T04:21:21Z",
  "due_date": "2026-06-07T14:59:59Z",
  "last_updated_at": "2026-05-28T04:59:18Z",
  "timeline": [
    {
      "type": "created",
      "occurred_at": "2026-05-28T04:21:21Z"
    },
    {
      "type": "defended",
      "occurred_at": "2026-05-28T04:59:18Z"
    },
    {
      "type": "response_due",
      "occurred_at": "2026-06-07T14:59:59Z"
    }
  ],
  "payment": {
    "id": "7zk4ecpe4xbzzoyhyzd5hszus",
    "amount": 1864,
    "currency": "JPY",
    "created_at": "2026-04-23T02:18:57Z",
    "captured_at": "2026-04-23T02:18:57Z",
    "payment_method": {
      "type": "web_money",
      "brand": null,
      "last_four_digits": null
    },
    "masked_card_number": null
  },
  "customer": {
    "name": "freeman gordon",
    "email": "gordon@example.com"
  },
  "defense": {
    "product_name": "Premium Plan",
    "reason": "Customer received the product as agreed.",
    "shipping_info": {
      "company_name": "DHL",
      "shipping_date": "2026-05-20",
      "tracking_number": "TRACK-12345",
      "shipping_address": "1-2-3 Tokyo"
    },
    "recipient_info": {
      "name": "Jane Doe",
      "phone": "090-1234-5678",
      "email": "jane@example.com"
    },
    "documents": [
      {
        "file_name": "evidence.pdf",
        "content_type": "application/pdf",
        "file_size": 63,
        "uploaded_at": "2026-05-28T04:59:18Z",
        "url": "https://example-uploads.s3.ap-northeast-1.amazonaws.com/chargeback_defense/...pdf"
      }
    ]
  }
}

When a defense exists, the defense object contains:

AttributeDescription
product_nameName of the product or service.
reasonThe merchant's defense reason.
shipping_infocompany_name, shipping_date, tracking_number, shipping_address.
recipient_infoname, phone, email.
documentsArray of file_name, content_type, file_size, uploaded_at, url.

Accept a chargeback request

Accepts a chargeback, agreeing to the dispute. This endpoint takes no request body and returns 204 No Content (empty body) on success.

AuthenticationMethodEndpoint
Secret keyPOSThttps://komoju.com/api/v1/chargeback_requests/{id}/accept
Caution

Rules

  • You can only accept a chargeback while its status is pending.
  • If the due date has passed, the request returns an error.
  • Accepting an already-accepted chargeback returns 204 (idempotent).

Example request

Shell
curl -X POST "https://komoju.com/api/v1/chargeback_requests/igqcsinacgl9iwz7ii3bknwpr/accept" \
  -u YOUR_SECRET_KEY: \
  -H "Content-Type: application/json"

Defend a chargeback request

Submits a defense against a chargeback, including supporting documentation. Returns 204 No Content (empty body) on success.

AuthenticationMethodEndpoint
Secret keyPOSThttps://komoju.com/api/v1/chargeback_requests/{id}/defend

* = required

Request AttributeTypeDescription
description *stringExplanation of your defense.
document *objectSupporting document. See below.
product_namestringName of the product or service.
shipping_infoobjectcompany_name, shipping_date (e.g. 2026-05-20), tracking_number, shipping_address.
recipient_infoobjectname, phone, email.

The document object:

Request AttributeTypeDescription
document_base64 *stringBase64-encoded file contents.
filenamestringOriginal file name.
content_typestringMIME type of the file.
Note

Document requirements

  • The base64 payload must be 15 MB or less.
  • Supported types: PDF, JPG/JPEG, PNG, GIF.
  • The file type is inferred from the file's bytes, not the filename. Other types are rejected with a validation error.

Example request

Shell
curl -X POST "https://komoju.com/api/v1/chargeback_requests/igqcsinacgl9iwz7ii3bknwpr/defend" \
  -u YOUR_SECRET_KEY: \
  -H "Content-Type: application/json" \
  -d '{
    "product_name": "Premium Plan",
    "description": "Customer received the product as agreed.",
    "document": {
      "document_base64": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCiUlRU9G",
      "filename": "evidence.pdf",
      "content_type": "application/pdf"
    },
    "shipping_info": {
      "company_name": "DHL",
      "shipping_date": "2026-05-20",
      "tracking_number": "TRACK-12345",
      "shipping_address": "1-2-3 Tokyo"
    },
    "recipient_info": {
      "name": "Jane Doe",
      "phone": "090-1234-5678",
      "email": "jane@example.com"
    }
  }'
Caution

Rules

  • You can only defend a chargeback while its status is pending.
  • If the due date has passed, the request returns an error.
  • Defending an already-defended chargeback returns 204 (idempotent).
  • Duplicate defenses are prevented; only one defense can be created per chargeback request.

Errors

Chargeback endpoints return standard API error objects. Common cases:

StatusWhen
401 UnauthorizedThe secret key is missing or invalid.
404 Not FoundThe feature is disabled for your merchant, or the chargeback ID does not exist for the authenticated merchant.
400 Bad RequestOnly pending chargebacks can be accepted. / Only pending chargebacks can be defended. / Chargeback due date has passed and can no longer be responded to. / invalid or oversized base64 document payload.
422 Unprocessable EntityMissing required defend parameters (for example description or document), or invalid date-time format in query params.

Error body shape

JSON
{
  "error": {
    "code": "bad_request",
    "message": "Only pending chargebacks can be defended.",
    "param": null,
    "details": {}
  }
}

Page Navigation

Ctrl←Ctrl→Ctrl↑Ctrl↓