---
agentTools:
  projectIndex: https://developers.commerce.busha.co/llms.txt
---

# Resolve a charge

Resolve a charge

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Commerce",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.commerce.busha.co"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/charges/{id}/resolve": {
      "post": {
        "summary": "Resolve a charge",
        "description": "Resolve a charge",
        "operationId": "resolve-a-charge",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "uuid unique identifier for a charge",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-BC-API-KEY",
            "in": "header",
            "description": "Your business secret key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "context"
                ],
                "properties": {
                  "context": {
                    "type": "string",
                    "description": "reason for the charge resolve"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"status\": \"success\",\n    \"message\": \"Charge successfully resolved\",\n    \"data\": {\n        \"id\": \"e41466c2-324e-45c5-b846-a73b5beb7f11\",\n        \"business_id\": \"6d91a156-0139-4cc4-9fbf-28172b1a2d7f\",\n        \"reference\": \"CHRG_CHK_vdkgEPCeEr\",\n        \"hosted_url\": \"https://pay.busha.co/charges/916f0b11-a31b-4df7-a53e-f1529b5424f13\",\n        \"price_fixed\": true,\n        \"callback_url\": \"https://mysite.com/success\",\n        \"meta\": {\n            \"name\": \"Sarah Shaw\",\n            \"email\": \"sarah.sahw@example.co\"\n        },        \n        \"expires_at\": \"2023-01-19T16:59:46.384394Z\",\n        \"timeline\": [\n            {\n                \"status\": \"NEW\",\n                \"created_at\": \"2023-01-19T15:59:46.385528+00:00\"\n            },\n            {\n                \"status\": \"PENDING\",\n                \"context\": \"OVERPAID\",\n                \"created_at\": \"2023-01-19T16:02:08.435969+00:00\"\n            },\n            {\n                \"status\": \"UNRESOLVED\",\n                \"context\": \"OVERPAID\",\n                \"created_at\": \"2023-01-19T16:02:08.483851+00:00\"\n            },\n            {\n                \"status\": \"RESOLVED\",\n                \"context\": \"Payment has been resolved with customer\",\n                \"created_at\": \"2023-02-24T13:45:15.612058+00:00\"\n            }  \n        ],\n        \"address\": [\n            {\n                \"currency_id\": \"BTC\",\n                \"address\": \"2N3Cp6dAPBrcRD17RHGYPrcbKMrmAMQ3Ksj\",\n                \"chain\": \"BTC\"\n            }\n        ],\n        \"payment\": [\n            {\n                \"id\": \"0f5acb41-300a-4b07-a87d-a359812007ce\",\n                \"charge_id\": \"e41466c2-324e-45c5-b846-a73b5beb7f11\",\n                \"local_amount\": \"5031.92\",\n                \"local_currency\": \"NGN\",\n                \"amount\": \"0.00032\",\n                \"currency\": \"BTC\",\n                \"transaction_id\": \"0f5acb41-300a-4b07-a87d-a359812007ce\",\n                \"transaction_hash\": \"busha_829422493b3588bd46e4df78c7d92e067cf9a2779023c7bd3150935be20ffdef\",\n                \"detected_at\": \"0001-01-01T00:00:00+00:00\",\n                \"status\": \"COMPLETED\",\n                \"traded\": false,\n                \"confirmation\": 3,\n                \"created_at\": \"2023-01-19T16:02:08.433492+00:00\",\n                \"updated_at\": \"2023-01-19T16:02:08.482475+00:00\",\n                \"reference\": \"PYOT_l6E2rpd4Cy\",\n                \"chain\": \"BTC\",\n                \"payment_threshold\": {\n                    \"overpayment_absolute_threshold\": \"0\",\n                    \"overpayment_relative_threshold\": \"0\",\n                    \"underpayment_absolute_threshold\": \"0\",\n                    \"underpayment_relative_threshold\": \"0\"\n                },\n                \"address\": \"2N3Cp6dAPBrcRD17RHGYPrcbKMrmAMQ3Ksj\",\n                \"block_url\": \"\"\n            }\n        ],\n        \"pricing\": [\n            {\n                \"currency_id\": \"BTC\",\n                \"amount\": \"0.00031797\",\n                \"rate\": \"15724984\"\n            },\n            {\n                \"currency_id\": \"NGN\",\n                \"amount\": \"5000\",\n                \"rate\": 1\n            }\n        ],\n       \"local_amount\": \"5031.92\"\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "message": {
                      "type": "string",
                      "example": "Charge successfully resolved"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "e41466c2-324e-45c5-b846-a73b5beb7f11"
                        },
                        "business_id": {
                          "type": "string",
                          "example": "6d91a156-0139-4cc4-9fbf-28172b1a2d7f"
                        },
                        "reference": {
                          "type": "string",
                          "example": "CHRG_CHK_vdkgEPCeEr"
                        },
                        "hosted_url": {
                          "type": "string",
                          "example": "https://pay.busha.co/charges/916f0b11-a31b-4df7-a53e-f1529b5424f13"
                        },
                        "price_fixed": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "callback_url": {
                          "type": "string",
                          "example": "https://mysite.com/success"
                        },
                        "meta": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "example": "Sarah Shaw"
                            },
                            "email": {
                              "type": "string",
                              "example": "sarah.sahw@example.co"
                            }
                          }
                        },
                        "expires_at": {
                          "type": "string",
                          "example": "2023-01-19T16:59:46.384394Z"
                        },
                        "timeline": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "example": "NEW"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2023-01-19T15:59:46.385528+00:00"
                              }
                            }
                          }
                        },
                        "address": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "currency_id": {
                                "type": "string",
                                "example": "BTC"
                              },
                              "address": {
                                "type": "string",
                                "example": "2N3Cp6dAPBrcRD17RHGYPrcbKMrmAMQ3Ksj"
                              },
                              "chain": {
                                "type": "string",
                                "example": "BTC"
                              }
                            }
                          }
                        },
                        "payment": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "0f5acb41-300a-4b07-a87d-a359812007ce"
                              },
                              "charge_id": {
                                "type": "string",
                                "example": "e41466c2-324e-45c5-b846-a73b5beb7f11"
                              },
                              "local_amount": {
                                "type": "string",
                                "example": "5031.92"
                              },
                              "local_currency": {
                                "type": "string",
                                "example": "NGN"
                              },
                              "amount": {
                                "type": "string",
                                "example": "0.00032"
                              },
                              "currency": {
                                "type": "string",
                                "example": "BTC"
                              },
                              "transaction_id": {
                                "type": "string",
                                "example": "0f5acb41-300a-4b07-a87d-a359812007ce"
                              },
                              "transaction_hash": {
                                "type": "string",
                                "example": "busha_829422493b3588bd46e4df78c7d92e067cf9a2779023c7bd3150935be20ffdef"
                              },
                              "detected_at": {
                                "type": "string",
                                "example": "0001-01-01T00:00:00+00:00"
                              },
                              "status": {
                                "type": "string",
                                "example": "COMPLETED"
                              },
                              "traded": {
                                "type": "boolean",
                                "example": false,
                                "default": true
                              },
                              "confirmation": {
                                "type": "integer",
                                "example": 3,
                                "default": 0
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2023-01-19T16:02:08.433492+00:00"
                              },
                              "updated_at": {
                                "type": "string",
                                "example": "2023-01-19T16:02:08.482475+00:00"
                              },
                              "reference": {
                                "type": "string",
                                "example": "PYOT_l6E2rpd4Cy"
                              },
                              "chain": {
                                "type": "string",
                                "example": "BTC"
                              },
                              "payment_threshold": {
                                "type": "object",
                                "properties": {
                                  "overpayment_absolute_threshold": {
                                    "type": "string",
                                    "example": "0"
                                  },
                                  "overpayment_relative_threshold": {
                                    "type": "string",
                                    "example": "0"
                                  },
                                  "underpayment_absolute_threshold": {
                                    "type": "string",
                                    "example": "0"
                                  },
                                  "underpayment_relative_threshold": {
                                    "type": "string",
                                    "example": "0"
                                  }
                                }
                              },
                              "address": {
                                "type": "string",
                                "example": "2N3Cp6dAPBrcRD17RHGYPrcbKMrmAMQ3Ksj"
                              },
                              "block_url": {
                                "type": "string",
                                "example": ""
                              }
                            }
                          }
                        },
                        "pricing": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "currency_id": {
                                "type": "string",
                                "example": "BTC"
                              },
                              "amount": {
                                "type": "string",
                                "example": "0.00031797"
                              },
                              "rate": {
                                "type": "string",
                                "example": "15724984"
                              }
                            }
                          }
                        },
                        "local_amount": {
                          "type": "string",
                          "example": "5031.92"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"error\": {\n        \"name\": \"bad_request\",\n        \"message\": \"only unresolved charges can be resolved\"\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "example": "bad_request"
                        },
                        "message": {
                          "type": "string",
                          "example": "only unresolved charges can be resolved"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": {\n    \"name\": \"unauthorized\",\n    \"message\": \"Invalid Authentication\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "example": "unauthorized"
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid Authentication"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "63f94c2f2017a0005783edff:63fa7c83ed18d300263e7707"
}
```