Disputes

Keep track of and act on your open disputes (also known as chargebacks) to submit the best possible response.

Get disputes

Returns a list of all disputes against your business. The results will be returned in reverse chronological order, showing the last modified dispute (for example, where you've recently added a piece of evidence) first. You can use the optional parameters below to skip or limit results.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
query Parameters
limit
integer [ 1 .. 250 ]
Default: 50

The numbers of results to return

skip
integer >= 0
Default: 0

The number of results to skip

from
string <date-time>

The date and time from which to filter disputes, based on the dispute's last_update field

to
string <date-time>

The date and time until which to filter disputes, based on the dispute's last_update field

id
string

The unique identifier of the dispute

entity_ids
string

One or more comma-separated client entities. This works like a logical OR operator

Example: entity_ids=ent_wxglze3wwywujg4nna5fb7ldli,ent_vkb5zcy64zoe3cwfmaqvqyqyku
sub_entity_ids
string

One or more comma-separated sub-entities. This works like a logical OR operator

Example: sub_entity_ids=ent_uzm3uxtssvmuxnyrfdffcyjxeu,ent_hy5wtzwzeuwefmsnjtdhw4scfi
processing_channel_ids
string

One or more comma-separated processing channels. This works like a logical OR operator.

Example: processing_channel_ids=pc_uzm3uxtssvmuxnyrfdffcyjxeu,pc_hy5wtzwzeuwefmsnjtdhw4scfi
segment_ids
string

One or more comma-separated segments. This works like a logical OR operator.

statuses
string

One or more comma-separated statuses. This works like a logical OR operator

Example: statuses=evidence_required,evidence_under_review
payment_id
string

The unique identifier of the payment

payment_reference
string

An optional reference (such as an order ID) that you can use later to identify the payment. Previously known as TrackId

payment_arn
string

The acquirer reference number (ARN) that you can use to query the issuing bank

payment_mcc
string

The merchant category code (MCC) of the payment (ISO 18245)

this_channel_only
boolean

If true, only returns disputes of the specific channel that the secret key is associated with. Otherwise, returns all disputes for that business

Responses
200

Disputes retrieved successfully

401

Unauthorized

422

Unprocessable paging

get/disputes
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Disputes;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Disputes)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

DisputesQueryFilter request = new DisputesQueryFilter
{
    Limit = 250,
    To = DateTime.Now,
};

try
{
    DisputesQueryResponse response = await api.DisputesClient().Query(request);
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
{
  • "limit": 10,
  • "skip": 10,
  • "from": "2018-08-12T01:15:56Z",
  • "to": "2018-08-13T11:09:01Z",
  • "id": "dsp_rbhwd2qrg13uhrp2newfcd",
  • "entity_ids": "ent_wxglze3wwywujg4nna5fb7ldli,ent_vkb5zcy64zoe3cwfmaqvqyqyku",
  • "sub_entity_ids": "ent_uzm3uxtssvmuxnyrfdffcyjxeu,ent_hy5wtzwzeuwefmsnjtdhw4scfi",
  • "processing_channel_ids": "pc_uzm3uxtssvmuxnyrfdffcyjxeu,pc_hy5wtzwzeuwefmsnjtdhw4scfi",
  • "segment_ids": "string",
  • "statuses": "evidence_required,evidence_under_review",
  • "payment_id": "pay_lzmo6p0i3612judj754w1ngtil",
  • "payment_reference": "th7zxa1kcnqmes8",
  • "payment_arn": "74548998294293193445538",
  • "payment_mcc": "5021",
  • "this_channel_only": true,
  • "total_count": 1,
  • "data": [
    ]
}

Get dispute details

Returns all the details of a dispute using the dispute identifier.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
dispute_id
required
string^(dsp)_(\\w{22,26})$

The dispute identifier

Responses
200

Dispute retrieved successfully

401

Unauthorized

404

Dispute not found

get/disputes/{dispute_id}
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Disputes;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Disputes)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    DisputeDetailsResponse response = await api.DisputesClient().GetDisputeDetails("disputes_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
{
  • "id": "dsp_rbhwd2qrg13uhrp2newfarfder",
  • "entity_id": "ent_wxglze3wwywujg4nna5fb7ldli",
  • "sub_entity_id": "ent_uzm3uxtssvmuxnyrfdffcyjxeu",
  • "reference": "dispute-09",
  • "category": "fraudulent",
  • "amount": 999,
  • "currency": "GBP",
  • "reason_code": "10.4",
  • "status": "evidence_required",
  • "resolved_reason": "already_refunded",
  • "relevant_evidence": [
    ],
  • "evidence_required_by": "2018-08-21T00:00:00Z",
  • "received_on": "2018-08-01T04:00:10Z",
  • "last_update": "2018-08-04T10:53:13Z",
  • "is_ce_candidate": true,
  • "payment": {
    },
  • "evidence_list": [
    ],
  • "evidence_bundle": [
    ],
  • "segment_id": "string",
}

Accept dispute

If a dispute is legitimate, you can choose to accept it. This will close it for you and remove it from your list of open disputes. There are no further financial implications.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
dispute_id
required
string^(dsp)_(\w{26})$

The dispute identifier

Responses
204

Dispute accepted successfully

401

Unauthorized

404

Dispute not found

post/disputes/{dispute_id}/accept
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Disputes)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    EmptyResponse response = await api.DisputesClient().Accept("disputes_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}

Provide dispute evidence

Adds supporting evidence to a dispute. Before using this endpoint, you first need to upload your files using the file uploader. You will receive a file id (prefixed by file_) which you can then use in your request. Note that this only attaches the evidence to the dispute, it does not send it to us. Once ready, you will need to submit it. You must provide at least one evidence type in the body of your request.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
dispute_id
required
string^(dsp)_(\w{26})$

The dispute identifier.

Request Body schema: application/json
proof_of_delivery_or_service_file
string

A file containing proof of delivery of goods or services.

proof_of_delivery_or_service_text
string <= 500

A brief description of the file provided in proof_of_delivery_or_service_file.

Alternatively, you can provide a link to an externally-hosted file containing the description.

proof_of_delivery_or_service_date_file
string

A file showing the delivery date of the provided service or merchandise.

proof_of_delivery_or_service_date_text
string <= 500

A brief description of the file provided in proof_of_delivery_or_service_date_file.

Alternatively, you can provide a link to an externally-hosted file containing the description.

invoice_or_receipt_file
string

A file containing an invoice or receipt.

invoice_or_receipt_text
string <= 500

A brief description of the file provided in invoice_or_receipt_file.

Alternatively, you can provide a link to an externally-hosted file containing the description.

invoice_showing_distinct_transactions_file
string

A file containing invoice showing two distinct transactions.

invoice_showing_distinct_transactions_text
string <= 500

A brief description of the file provided in invoice_showing_distinct_transactions_file.

Alternatively, you can provide a link to an externally-hosted file containing the description.

customer_communication_file
string

A file containing customer communication.

customer_communication_text
string <= 500

A brief description of the file provided in customer_communication_file.

Alternatively, you can provide a link to an externally-hosted file containing the description.

refund_or_cancellation_policy_file
string

A file containing refund/cancellation policy

refund_or_cancellation_policy_text
string <= 500

A brief description of the file provided in refund_or_cancellation_policy_file.

Alternatively, you can provide a link to an externally-hosted file containing the description.

recurring_transaction_agreement_file
string

A file containing the recurring transaction agreement

recurring_transaction_agreement_text
string <= 500

A brief description of the file provided in recurring_transaction_agreement_file.

Alternatively, you can provide a link to an externally-hosted file containing the description.

additional_evidence_file
string

A file containing additional supporting documents.

additional_evidence_text
string <= 500

A brief description of the file provided in additional_evidence_file.

Alternatively, you can provide a link to an externally-hosted file containing the description.

arbitration_no_review_files
Array of strings

The evidence to submit directly to the scheme when you escalate the dispute to arbitration.

Evidence you provide with this field is submitted directly to the scheme.

arbitration_no_review_text
string <= 500

A brief description of the file provided in arbitration_no_review_files.

Alternatively, you can provide a link to an externally-hosted file containing the description.

arbitration_review_required_files
Array of strings

The evidence to submit to the Checkout.com Dispute Resolution team for review.

You'll be advised on the likelihood of success if you choose to escalate the dispute to arbitration.

arbitration_review_required_text
string <= 500

A brief description of the file provided in arbitration_review_required_files.

Alternatively, you can provide a link to an externally-hosted file containing the description.

object

Used to resolve friendly fraud with merchant historical transactions.

object
Responses
204

Dispute evidence provided successfully

400

Unprocessable

401

Unauthorized

404

Dispute not found

422

Unprocessable entity

put/disputes/{dispute_id}/evidence
Request samples
application/json
{
  • "proof_of_delivery_or_service_file": "file_jmbfgkjromvcrn9t4qu4",
  • "proof_of_delivery_or_service_text": "Description of evidence available at: http://checkout.com/evidenceDocument.pdf",
  • "proof_of_delivery_or_service_date_file": "file_jmbfgkjromvcrn9t4qu4",
  • "proof_of_delivery_or_service_date_text": "Copy of the customer receipt showing the merchandise was delivered on 2018-12-20",
  • "invoice_or_receipt_file": "file_jmbfgkjromvcrn9t4qu4",
  • "invoice_or_receipt_text": "Copy of the invoice",
  • "invoice_showing_distinct_transactions_file": "file_jmbfgkjromvcrn9t4qu4",
  • "invoice_showing_distinct_transactions_text": "Copy of invoice #1244 showing two transactions",
  • "customer_communication_file": "file_jmbfgkjromvcrn9t4qu4",
  • "customer_communication_text": "Copy of an email exchange with the cardholder",
  • "refund_or_cancellation_policy_file": "file_jmbfgkjromvcrn9t4qu4",
  • "refund_or_cancellation_policy_text": "Copy of the refund policy",
  • "recurring_transaction_agreement_file": "file_jmbfgkjromvcrn9t4qu4",
  • "recurring_transaction_agreement_text": "Copy of the recurring transaction agreement",
  • "additional_evidence_file": "file_jmbfgkjromvcrn9t4qu4",
  • "additional_evidence_text": "Scanned document",
  • "arbitration_no_review_files": [
    ],
  • "arbitration_no_review_text": "Evidence for arbitration",
  • "arbitration_review_required_files": [
    ],
  • "arbitration_review_required_text": "Evidence for arbitration",
  • "compelling_evidence": {
    },
}
Response samples
application/json
{
  • "request_id": "string",
  • "error_type": "string",
  • "error_codes": [
    ]
}

Get dispute evidence

Retrieves a list of the evidence submitted in response to a specific dispute.

SecurityOAuth2: OAuth
Request
path Parameters
dispute_id
required
string^(dsp)_(\w{26})$

The dispute identifier.

Responses
200

Dispute evidence retrieved successfully

401

Unauthorized

404

Dispute not found

get/disputes/{dispute_id}/evidence
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Disputes;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Disputes)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    DisputeEvidenceResponse response = await api.DisputesClient().GetEvidence("disputes_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
{
  • "proof_of_delivery_or_service_file": "file_jmbfgkjromvcrn9t4qu4",
  • "proof_of_delivery_or_service_text": "Description of evidence available at: http://checkout.com/evidenceDocument.pdf",
  • "proof_of_delivery_or_service_date_file": "file_jmbfgkjromvcrn9t4qu4",
  • "proof_of_delivery_or_service_date_text": "Copy of the customer receipt showing the merchandise was delivered on 2018-12-20",
  • "invoice_or_receipt_file": "file_jmbfgkjromvcrn9t4qu4",
  • "invoice_or_receipt_text": "Copy of the invoice",
  • "invoice_showing_distinct_transactions_file": "file_jmbfgkjromvcrn9t4qu4",
  • "invoice_showing_distinct_transactions_text": "Copy of invoice #1244 showing two transactions",
  • "customer_communication_file": "file_jmbfgkjromvcrn9t4qu4",
  • "customer_communication_text": "Copy of an email exchange with the cardholder",
  • "refund_or_cancellation_policy_file": "file_jmbfgkjromvcrn9t4qu4",
  • "refund_or_cancellation_policy_text": "Copy of the refund policy",
  • "recurring_transaction_agreement_file": "file_jmbfgkjromvcrn9t4qu4",
  • "recurring_transaction_agreement_text": "Copy of the recurring transaction agreement",
  • "additional_evidence_file": "file_jmbfgkjromvcrn9t4qu4",
  • "additional_evidence_text": "Scanned document",
  • "arbitration_no_review_files": [
    ],
  • "arbitration_no_review_text": "Evidence for arbitration",
  • "arbitration_review_required_files": [
    ],
  • "arbitration_review_required_text": "Evidence for arbitration",
  • "compelling_evidence": {
    }
}

Submit dispute evidence

With this final request, you can submit the evidence that you have previously provided. Make sure you have provided all the relevant information before using this request. You will not be able to amend your evidence once you have submitted it.

SecurityOAuth2: OAuth
Request
path Parameters
dispute_id
required
string^(dsp)_(\w{26})$

The dispute identifier.

Responses
204

Dispute evidence submitted successfully

401

Unauthorized

404

Dispute not found

422

Unprocessable Entity

post/disputes/{dispute_id}/evidence
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Disputes)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    EmptyResponse response = await api.DisputesClient().SubmitEvidence("disputes_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
{
  • "request_id": "string",
  • "error_type": "string",
  • "error_codes": [
    ]
}

Submit dispute arbitration evidence

Submits the previously provided arbitration evidence to the scheme.

You cannot amend evidence after you submit with this endpoint. Ensure you have provided all of the required information.

SecurityOAuth2: OAuth
Request
path Parameters
dispute_id
required
string^(dsp)_(\w{26})$

The dispute identifier.

Responses
204

Dispute arbitration evidence submitted successfully

401

Unauthorized

404

Dispute not found

422

Unprocessable Entity

post/disputes/{dispute_id}/evidence/arbitration
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Disputes)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    EmptyResponse response = await api.DisputesClient().SubmitArbitrationEvidence("disputes_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
{
  • "request_id": "string",
  • "error_type": "string",
  • "error_codes": [
    ]
}

Get dispute submitted arbitration evidence

Retrieves the unique identifier of the PDF file containing all of the evidence submitted to escalate the dispute to arbitration.

To retrieve the file's download link, call the GET /files/{file_id} endpoint with the returned file ID.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
dispute_id
required
string^(dsp)_(\w{22,26})$

The dispute identifier.

Responses
200

Dispute retrieved successfully

403

Forbidden

404

Resource not found

500

Internal error

get/disputes/{dispute_id}/evidence/arbitration/submitted
Request samples
Response samples
application/json
{}

Get dispute submitted evidence

Retrieves the unique identifier of the PDF file containing all the evidence submitted to represent the dispute case.

To retrieve the file's download link, call the GET /files/{file_id} endpoint with the returned file ID.

Evidence submitted before February 2024 cannot be retrieved using this endpoint.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
dispute_id
required
string^(dsp)_(\w{22,26})$

The dispute identifier.

Responses
200

Dispute retrieved successfully

403

Forbidden

404

Resource not found

500

Internal error

get/disputes/{dispute_id}/evidence/submitted
Request samples
Response samples
application/json
{}

Get dispute scheme files

Returns all of the scheme files of a dispute using the dispute identifier. Currently available only for VISA disputes.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
dispute_id
required
string^(dsp)_(\w{22,26})$

The dispute identifier

Responses
200

Dispute retrieved successfully

401

Unauthorized

404

Dispute not found

get/disputes/{dispute_id}/schemefiles
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-go
import (
	"github.com/checkout/checkout-sdk-go"
	"github.com/checkout/checkout-sdk-go/configuration"
)

// API Keys
api, err := checkout.
			Builder().
			StaticKeys().
			WithSecretKey("secret_key").
			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION
                        WithEnvironmentSubdomain("{prefix}"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
			Build()
if err != nil {
	return nil, err
}

// OAuth
api, err := checkout.
			Builder().
			OAuth().
			WithClientCredentials("client_id", "client_secret").
			WithScopes([]string{configuration.Disputes}).
			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION
                        WithEnvironmentSubdomain("{prefix}"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
			Build()
if err != nil {
	return nil, err
}

response, err := api.Disputes.GetDisputeSchemeFiles("dispute_id")
if err != nil {
	return nil, err
}

return response, nil
Response samples
application/json
{}

Upload file

Upload a file to use as evidence in a dispute. Your file must be in either JPEG/JPG, PNG or PDF format, and be no larger than 4MB.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
Request Body schema: multipart/form-data
file
required
string

The path of the file to upload, and its type.
This must be a local path.

purpose
required
string

The purpose of the file upload.

If the file is a supporting document for a dispute, set this to dispute_evidence. If the file is a supporting document for arbitration, set this to arbitration_evidence.

Responses
201

File uploaded successfully

401

Unauthorized

422

Unprocessable

429

Too many requests

post/files
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Common;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Disputes)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    IdResponse response = await api.DisputesClient().SubmitFile("file_path", "dispute_evidence");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
{}

Get file information

Retrieve information about a file that was previously uploaded.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
file_id
required
string

The file identifier. It is always prefixed by file_.

Responses
200

File information retrieved successfully

401

Unauthorized

404

File not found

429

Too many requests or duplicate request detected

get/files/{file_id}
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Files;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Disputes)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    FileDetailsResponse response = await api.DisputesClient().GetFileDetails("file_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
{}