Submit evidence for a dispute with the given ID.
curl -X POST https://api.stripe.com/v1/disputes/dp_1BnETJGswQrCoh0Xefx4zP2a \
-u STRIPE_SECRET_KEY: \
-d evidence[customer_name]="Isabella Williams" \
-d evidence[product_description]="Comfortable cotton t-shirt" \
-d evidence[shipping_documentation]=file_1BnEEuGswQrCoh0XqB3XkqAg
#include <C_CkRest.h>
#include <C_CkJsonObject.h>
void ChilkatSample(void)
{
HCkRest rest;
BOOL success;
BOOL bTls;
int port;
BOOL bAutoReconnect;
const char *strResponseBody;
HCkJsonObject jsonResponse;
const char *id;
const char *object;
int amount;
const char *balance_transaction;
const char *charge;
int created;
const char *currency;
const char *evidenceProduct_description;
const char *evidenceCustomer_name;
BOOL evidenceCustomer_email_address;
BOOL evidenceBilling_address;
BOOL evidenceCustomer_purchase_ip;
BOOL evidenceShipping_address;
BOOL evidenceShipping_date;
BOOL evidenceShipping_carrier;
BOOL evidenceShipping_tracking_number;
BOOL evidenceService_date;
BOOL evidenceAccess_activity_log;
BOOL evidenceDuplicate_charge_id;
BOOL evidenceDuplicate_charge_explanation;
BOOL evidenceRefund_policy_disclosure;
BOOL evidenceRefund_refusal_explanation;
BOOL evidenceCancellation_policy_disclosure;
BOOL evidenceCancellation_rebuttal;
BOOL evidenceUncategorized_text;
BOOL evidenceCustomer_signature;
BOOL evidenceReceipt;
const char *evidenceShipping_documentation;
BOOL evidenceService_documentation;
BOOL evidenceDuplicate_charge_documentation;
BOOL evidenceRefund_policy;
BOOL evidenceCancellation_policy;
BOOL evidenceCustomer_communication;
BOOL evidenceUncategorized_file;
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
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","");
CkRest_AddQueryParam(rest,"evidence[customer_name]","Isabella Williams");
CkRest_AddQueryParam(rest,"evidence[product_description]","Comfortable cotton t-shirt");
CkRest_AddQueryParam(rest,"evidence[shipping_documentation]","file_1BnEEuGswQrCoh0XqB3XkqAg");
strResponseBody = CkRest_fullRequestFormUrlEncoded(rest,"POST","/v1/disputes/dp_1BnETJGswQrCoh0Xefx4zP2a");
if (CkRest_getLastMethodSuccess(rest) != TRUE) {
printf("%s\n",CkRest_lastErrorText(rest));
CkRest_Dispose(rest);
return;
}
jsonResponse = CkJsonObject_Create();
CkJsonObject_Load(jsonResponse,strResponseBody);
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");
evidenceProduct_description = CkJsonObject_stringOf(jsonResponse,"evidence.product_description");
evidenceCustomer_name = CkJsonObject_stringOf(jsonResponse,"evidence.customer_name");
evidenceCustomer_email_address = CkJsonObject_IsNullOf(jsonResponse,"evidence.customer_email_address");
evidenceBilling_address = CkJsonObject_IsNullOf(jsonResponse,"evidence.billing_address");
evidenceCustomer_purchase_ip = CkJsonObject_IsNullOf(jsonResponse,"evidence.customer_purchase_ip");
evidenceShipping_address = CkJsonObject_IsNullOf(jsonResponse,"evidence.shipping_address");
evidenceShipping_date = CkJsonObject_IsNullOf(jsonResponse,"evidence.shipping_date");
evidenceShipping_carrier = CkJsonObject_IsNullOf(jsonResponse,"evidence.shipping_carrier");
evidenceShipping_tracking_number = CkJsonObject_IsNullOf(jsonResponse,"evidence.shipping_tracking_number");
evidenceService_date = CkJsonObject_IsNullOf(jsonResponse,"evidence.service_date");
evidenceAccess_activity_log = CkJsonObject_IsNullOf(jsonResponse,"evidence.access_activity_log");
evidenceDuplicate_charge_id = CkJsonObject_IsNullOf(jsonResponse,"evidence.duplicate_charge_id");
evidenceDuplicate_charge_explanation = CkJsonObject_IsNullOf(jsonResponse,"evidence.duplicate_charge_explanation");
evidenceRefund_policy_disclosure = CkJsonObject_IsNullOf(jsonResponse,"evidence.refund_policy_disclosure");
evidenceRefund_refusal_explanation = CkJsonObject_IsNullOf(jsonResponse,"evidence.refund_refusal_explanation");
evidenceCancellation_policy_disclosure = CkJsonObject_IsNullOf(jsonResponse,"evidence.cancellation_policy_disclosure");
evidenceCancellation_rebuttal = CkJsonObject_IsNullOf(jsonResponse,"evidence.cancellation_rebuttal");
evidenceUncategorized_text = CkJsonObject_IsNullOf(jsonResponse,"evidence.uncategorized_text");
evidenceCustomer_signature = CkJsonObject_IsNullOf(jsonResponse,"evidence.customer_signature");
evidenceReceipt = CkJsonObject_IsNullOf(jsonResponse,"evidence.receipt");
evidenceShipping_documentation = CkJsonObject_stringOf(jsonResponse,"evidence.shipping_documentation");
evidenceService_documentation = CkJsonObject_IsNullOf(jsonResponse,"evidence.service_documentation");
evidenceDuplicate_charge_documentation = CkJsonObject_IsNullOf(jsonResponse,"evidence.duplicate_charge_documentation");
evidenceRefund_policy = CkJsonObject_IsNullOf(jsonResponse,"evidence.refund_policy");
evidenceCancellation_policy = CkJsonObject_IsNullOf(jsonResponse,"evidence.cancellation_policy");
evidenceCustomer_communication = CkJsonObject_IsNullOf(jsonResponse,"evidence.customer_communication");
evidenceUncategorized_file = CkJsonObject_IsNullOf(jsonResponse,"evidence.uncategorized_file");
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);
CkJsonObject_Dispose(jsonResponse);
}
{
"id": "dp_1BnETJGswQrCoh0Xefx4zP2a",
"object": "dispute",
"amount": 1000,
"balance_transaction": "txn_1BnETJGswQrCoh0XPNBs9uW2",
"balance_transactions": [
],
"charge": "ch_1BnETJGswQrCoh0XlANDK278",
"created": 1516662781,
"currency": "usd",
"evidence": {
"product_description": "Comfortable cotton t-shirt",
"customer_name": "Isabella Williams",
"customer_email_address": null,
"billing_address": null,
"customer_purchase_ip": null,
"shipping_address": null,
"shipping_date": null,
"shipping_carrier": null,
"shipping_tracking_number": null,
"service_date": null,
"access_activity_log": null,
"duplicate_charge_id": null,
"duplicate_charge_explanation": null,
"refund_policy_disclosure": null,
"refund_refusal_explanation": null,
"cancellation_policy_disclosure": null,
"cancellation_rebuttal": null,
"uncategorized_text": null,
"customer_signature": null,
"receipt": null,
"shipping_documentation": "file_1BnEEuGswQrCoh0XqB3XkqAg",
"service_documentation": null,
"duplicate_charge_documentation": null,
"refund_policy": null,
"cancellation_policy": null,
"customer_communication": null,
"uncategorized_file": 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": "needs_response"
}