Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially ‘dismissing’ the dispute, acknowledging it as lost
curl https://api.stripe.com/v1/disputes/dp_1BnETJGswQrCoh0Xefx4zP2a/close \
-u STRIPE_SECRET_KEY: \
-X POST
#include <C_CkRest.h>
#include <C_CkStringBuilder.h>
#include <C_CkJsonObject.h>
void ChilkatSample(void)
{
HCkRest rest;
BOOL success;
BOOL bTls;
int port;
BOOL bAutoReconnect;
HCkStringBuilder sbResponseBody;
HCkJsonObject jsonResponse;
const char *id;
const char *object;
int amount;
const char *balance_transaction;
const char *charge;
int created;
const char *currency;
BOOL evidenceAccess_activity_log;
BOOL evidenceBilling_address;
BOOL evidenceCancellation_policy;
BOOL evidenceCancellation_policy_disclosure;
BOOL evidenceCancellation_rebuttal;
BOOL evidenceCustomer_communication;
BOOL evidenceCustomer_email_address;
BOOL evidenceCustomer_name;
BOOL evidenceCustomer_purchase_ip;
BOOL evidenceCustomer_signature;
BOOL evidenceDuplicate_charge_documentation;
BOOL evidenceDuplicate_charge_explanation;
BOOL evidenceDuplicate_charge_id;
BOOL evidenceProduct_description;
BOOL evidenceReceipt;
BOOL evidenceRefund_policy;
BOOL evidenceRefund_policy_disclosure;
BOOL evidenceRefund_refusal_explanation;
BOOL evidenceService_date;
BOOL evidenceService_documentation;
BOOL evidenceShipping_address;
BOOL evidenceShipping_carrier;
BOOL evidenceShipping_date;
BOOL evidenceShipping_documentation;
BOOL evidenceShipping_tracking_number;
BOOL evidenceUncategorized_file;
BOOL evidenceUncategorized_text;
int evidence_detailsDue_by;
BOOL evidence_detailsHas_evidence;
BOOL evidence_detailsPast_due;
int evidence_detailsSubmission_count;
BOOL is_charge_refundable;
BOOL livemode;
const char *reason;
const char *status;
int i;
int count_i;
rest = CkRest_Create();
// URL: https://api.stripe.com/v1/disputes/dp_1BnETJGswQrCoh0Xefx4zP2a/close
bTls = TRUE;
port = 443;
bAutoReconnect = TRUE;
success = CkRest_Connect(rest,"api.stripe.com",port,bTls,bAutoReconnect);
if (success != TRUE) {
printf("ConnectFailReason: %d\n",CkRest_getConnectFailReason(rest));
printf("%s\n",CkRest_lastErrorText(rest));
CkRest_Dispose(rest);
return;
}
CkRest_SetAuthBasic(rest,"STRIPE_SECRET_KEY","");
sbResponseBody = CkStringBuilder_Create();
success = CkRest_FullRequestNoBodySb(rest,"POST","/v1/disputes/dp_1BnETJGswQrCoh0Xefx4zP2a/close",sbResponseBody);
if (success != TRUE) {
printf("%s\n",CkRest_lastErrorText(rest));
CkRest_Dispose(rest);
CkStringBuilder_Dispose(sbResponseBody);
return;
}
jsonResponse = CkJsonObject_Create();
CkJsonObject_LoadSb(jsonResponse,sbResponseBody);
id = CkJsonObject_stringOf(jsonResponse,"id");
object = CkJsonObject_stringOf(jsonResponse,"object");
amount = CkJsonObject_IntOf(jsonResponse,"amount");
balance_transaction = CkJsonObject_stringOf(jsonResponse,"balance_transaction");
charge = CkJsonObject_stringOf(jsonResponse,"charge");
created = CkJsonObject_IntOf(jsonResponse,"created");
currency = CkJsonObject_stringOf(jsonResponse,"currency");
evidenceAccess_activity_log = CkJsonObject_IsNullOf(jsonResponse,"evidence.access_activity_log");
evidenceBilling_address = CkJsonObject_IsNullOf(jsonResponse,"evidence.billing_address");
evidenceCancellation_policy = CkJsonObject_IsNullOf(jsonResponse,"evidence.cancellation_policy");
evidenceCancellation_policy_disclosure = CkJsonObject_IsNullOf(jsonResponse,"evidence.cancellation_policy_disclosure");
evidenceCancellation_rebuttal = CkJsonObject_IsNullOf(jsonResponse,"evidence.cancellation_rebuttal");
evidenceCustomer_communication = CkJsonObject_IsNullOf(jsonResponse,"evidence.customer_communication");
evidenceCustomer_email_address = CkJsonObject_IsNullOf(jsonResponse,"evidence.customer_email_address");
evidenceCustomer_name = CkJsonObject_IsNullOf(jsonResponse,"evidence.customer_name");
evidenceCustomer_purchase_ip = CkJsonObject_IsNullOf(jsonResponse,"evidence.customer_purchase_ip");
evidenceCustomer_signature = CkJsonObject_IsNullOf(jsonResponse,"evidence.customer_signature");
evidenceDuplicate_charge_documentation = CkJsonObject_IsNullOf(jsonResponse,"evidence.duplicate_charge_documentation");
evidenceDuplicate_charge_explanation = CkJsonObject_IsNullOf(jsonResponse,"evidence.duplicate_charge_explanation");
evidenceDuplicate_charge_id = CkJsonObject_IsNullOf(jsonResponse,"evidence.duplicate_charge_id");
evidenceProduct_description = CkJsonObject_IsNullOf(jsonResponse,"evidence.product_description");
evidenceReceipt = CkJsonObject_IsNullOf(jsonResponse,"evidence.receipt");
evidenceRefund_policy = CkJsonObject_IsNullOf(jsonResponse,"evidence.refund_policy");
evidenceRefund_policy_disclosure = CkJsonObject_IsNullOf(jsonResponse,"evidence.refund_policy_disclosure");
evidenceRefund_refusal_explanation = CkJsonObject_IsNullOf(jsonResponse,"evidence.refund_refusal_explanation");
evidenceService_date = CkJsonObject_IsNullOf(jsonResponse,"evidence.service_date");
evidenceService_documentation = CkJsonObject_IsNullOf(jsonResponse,"evidence.service_documentation");
evidenceShipping_address = CkJsonObject_IsNullOf(jsonResponse,"evidence.shipping_address");
evidenceShipping_carrier = CkJsonObject_IsNullOf(jsonResponse,"evidence.shipping_carrier");
evidenceShipping_date = CkJsonObject_IsNullOf(jsonResponse,"evidence.shipping_date");
evidenceShipping_documentation = CkJsonObject_IsNullOf(jsonResponse,"evidence.shipping_documentation");
evidenceShipping_tracking_number = CkJsonObject_IsNullOf(jsonResponse,"evidence.shipping_tracking_number");
evidenceUncategorized_file = CkJsonObject_IsNullOf(jsonResponse,"evidence.uncategorized_file");
evidenceUncategorized_text = CkJsonObject_IsNullOf(jsonResponse,"evidence.uncategorized_text");
evidence_detailsDue_by = CkJsonObject_IntOf(jsonResponse,"evidence_details.due_by");
evidence_detailsHas_evidence = CkJsonObject_BoolOf(jsonResponse,"evidence_details.has_evidence");
evidence_detailsPast_due = CkJsonObject_BoolOf(jsonResponse,"evidence_details.past_due");
evidence_detailsSubmission_count = CkJsonObject_IntOf(jsonResponse,"evidence_details.submission_count");
is_charge_refundable = CkJsonObject_BoolOf(jsonResponse,"is_charge_refundable");
livemode = CkJsonObject_BoolOf(jsonResponse,"livemode");
reason = CkJsonObject_stringOf(jsonResponse,"reason");
status = CkJsonObject_stringOf(jsonResponse,"status");
i = 0;
count_i = CkJsonObject_SizeOfArray(jsonResponse,"balance_transactions");
while (i < count_i) {
CkJsonObject_putI(jsonResponse,i);
i = i + 1;
}
CkRest_Dispose(rest);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jsonResponse);
}
{
"id": "dp_1BnETJGswQrCoh0Xefx4zP2a",
"object": "dispute",
"amount": 1000,
"balance_transaction": "txn_1BnETJGswQrCoh0XPNBs9uW2",
"balance_transactions": [
],
"charge": "ch_1BnETJGswQrCoh0XlANDK278",
"created": 1516662781,
"currency": "usd",
"evidence": {
"access_activity_log": null,
"billing_address": null,
"cancellation_policy": null,
"cancellation_policy_disclosure": null,
"cancellation_rebuttal": null,
"customer_communication": null,
"customer_email_address": null,
"customer_name": null,
"customer_purchase_ip": null,
"customer_signature": null,
"duplicate_charge_documentation": null,
"duplicate_charge_explanation": null,
"duplicate_charge_id": null,
"product_description": null,
"receipt": null,
"refund_policy": null,
"refund_policy_disclosure": null,
"refund_refusal_explanation": null,
"service_date": null,
"service_documentation": null,
"shipping_address": null,
"shipping_carrier": null,
"shipping_date": null,
"shipping_documentation": null,
"shipping_tracking_number": null,
"uncategorized_file": null,
"uncategorized_text": null
},
"evidence_details": {
"due_by": 1518307199,
"has_evidence": false,
"past_due": false,
"submission_count": 0
},
"is_charge_refundable": false,
"livemode": false,
"metadata": {},
"reason": "general",
"status": "lost"
}