# Create dispute migration Create a migration for a Full balance or Zero balance program. After this, you can create a [dispute migration for a specific installment](ref:post-migration-installment) using the dispute ID returned here. This endpoint generates a [Dispute installment created](https://developers.pismo.io/events/docs/disputes-dispute-installment-creation-1) event. Once the dispute is migrated into the system, its status changes and a [Dispute status changed](https://developers.pismo.io/events/docs/disputes-dispute-installment-status-change-1) event is generated. # OpenAPI definition ```json { "openapi": "3.0.1", "info": { "title": "Card issuing - Disputes", "version": "1.0.0", "description": "Disputes API endpoints", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io/disputes", "description": "Sandbox API server for testing" } ], "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "Migration", "description": "Endpoints to manage dispute migration" } ], "components": { "schemas": { "InstallmentNumber": { "type": "integer", "description": "Installment number.", "example": 1 }, "CreateMigrationRequest": { "type": "object", "description": "Create dispute migration request object", "required": [ "chargeback_id", "claim_id", "disputed_amount", "network_brand_type" ], "properties": { "chargeback_id": { "type": "string", "description": "Chargeback ID, same as dispute ID for VISA.", "example": "4965860" }, "claim_id": { "type": "string", "description": "Claim ID, same as case number for VISA.", "example": "88993u748" }, "disputed_amount": { "type": "number", "format": "double", "description": "Amount under dispute", "example": 215 }, "network_brand_type": { "$ref": "#/components/schemas/NetworkBrand" }, "authorization_id": { "type": "number", "description": "Authorization ID. **REQUIRED** for Full balance integration.", "example": 8475859059 }, "account_id": { "type": "number", "description": "Account ID. **REQUIRED** for Zero balance integration.", "example": 5894887 }, "transaction_date": { "type": "string", "description": "Transaction date, format = yyyy-mm-dd. **REQUIRED** for Zero balance integration.", "example": "2023-02-23" }, "arn": { "type": "string", "description": "Acquirer reference number. **REQUIRED** for Zero balance integration.", "example": "4096860" }, "is_partial": { "type": "boolean", "description": "Is partial amount chargeback? Default is `false`.", "default": false, "example": false }, "installment_disputed_amount": { "type": "number", "description": "Installent disputed amount", "example": 678 }, "installment_number": { "$ref": "#/components/schemas/InstallmentNumber" } } }, "CreateMigrationResponse": { "type": "object", "description": "Create dispute migration request object", "properties": { "id": { "type": "number", "example": 5634, "description": "Dispute ID." }, "authorization_id": { "type": "number", "description": "Authorization ID. **REQUIRED** for Full balance integration.", "example": 8475859059 }, "account_id": { "type": "number", "description": "Account ID. **REQUIRED** for Zero balance integration." }, "comment": { "type": "string", "description": "Dispute comment" }, "reason": { "$ref": "#/components/schemas/reasonCode" }, "dispute_installment_id": { "$ref": "#/components/schemas/DisputeInstallmentId" } } }, "reasonCode": { "type": "number", "description": "Each card network, such as Visa or Mastercard, defines and maintains their own unique set of reason codes, which banks that issue credit and debit cards under their brands apply to disputes. Here's a reason code [quick reference](https://www.chargebackgurus.com/blog/a-definitive-guide-to-chargeback-reason-codes-by-card-network#chargback-reason-code-quick-reference-guide) for the major credit card networks.\n\nFor Visa, this would be either `10` (fraud - card present), `11` (authorization), `12` (processing error), or `13` (consumer dispute).\n\nFor more infomation, refer to the [Visa](https://usa.visa.com/dam/VCOM/global/support-legal/documents/chargeback-management-guidelines-for-visa-merchants-vbs-19-may-16-%20v2.pdf) or [Mastercard](https://www.mastercard.us/content/dam/public/mastercardcom/na/global-site/documents/chargeback-guide.pdf) chargeback quides.\n\nFor example - `4853` (Mastercard - cardholder dispute), `12` (Visa - processing error) or `72` (ELO - denied authorization)\n", "example": 4853 }, "NetworkBrand": { "type": "string", "example": "Visa", "description": "Network brand", "enum": [ "Visa", "Mastercard", "Elo" ] }, "DisputeInstallmentId": { "type": "integer", "description": "Dispute installment ID.", "example": 8675309 } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Account access token. Tokens can expire quickly, which can result in an \"Unauthorized\" error.", "bearerFormat": "JWT" } }, "responses": { "400BadRequest": { "description": "Bad Request" }, "401Unauthorized": { "description": "Unauthorized. Invalid or missing access token." }, "422UnprocessableEntity": { "description": "Unprocessable entity" }, "500InternalServerError": { "description": "Internal server error" } } }, "paths": { "/v1/migration": { "post": { "summary": "Create dispute migration", "operationId": "post-migration-with-auth", "description": "Create a migration for a Full balance or Zero balance program.\n\nAfter this, you can create a [dispute migration for a specific installment](https://developers.pismo.io/pismo-docs/reference/post-migration-installment) using the dispute ID returned here.\n\nThis endpoint generates a [Dispute installment created](https://developers.pismo.io/events/docs/disputes-dispute-installment-creation-1) event. Once the dispute is migrated into the system, its status changes and a [Dispute status changed](https://developers.pismo.io/events/docs/disputes-dispute-installment-status-change-1) event is generated.\n", "tags": [ "Migration" ], "requestBody": { "description": "Migration data", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateMigrationRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateMigrationResponse" } } } }, "400": { "$ref": "#/components/responses/400BadRequest" }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "422": { "$ref": "#/components/responses/422UnprocessableEntity" }, "500": { "$ref": "#/components/responses/500InternalServerError" } } } } } } ```