v1

latestOpenAPI 3.1.02026-07-2419077.8 KB

Update a Charge

This endpoint updates the required details for a specified charge.

put/{charge_id}

Path parameters

charge_idstring required

The unique charge.id that was returned from your previous charge request.

Request body

descriptionstring

An arbitrary string which you can attach to a charge object. It is displayed in the web interface alongside the charge.

Response

200

idstring
objectstring
live_modeboolean
api_versionstring
methodstring
statusstring
amountinteger
currencystring
threeDSecureboolean
card_threeDSecureboolean
save_cardboolean
merchant_idstring
productstring
descriptionstring
auto_reversedboolean

Example response

{
  "id": "chg_TS050120220958Bk240709704",
  "object": "charge",
  "api_version": "V2",
  "method": "UPDATE",
  "status": "CAPTURED",
  "amount": 1,
  "currency": "KWD",
  "product": "GOSELL",
  "description": "Test Description",
  "metadata": {
    "udf1": "Metadata 1"
  },
  "transaction": {
    "authorization_id": "321387",
    "timezone": "UTC+03:00",
    "created": "1662544753039",
    "expiry": {
      "period": 30,
      "type": "MINUTE"
    },
    "amount": 1.03,
    "currency": "KWD"
  },
  "reference": {
    "track": "tck_TS050120220958Xx440709704",
    "payment": "1707220958097045920",
    "gateway": "123456789",
    "acquirer": "225006321387",
    "transaction": "txn_01",
    "order": "ord_01"
  },
  "response": {
    "code": "000",
    "message": "Captured"
  },
  "acquirer": {
    "response": {
      "code": "00",
      "message": "Approved"
    }
  },
  "gateway": {
    "response": {
      "code": "0",
      "message": "Transaction Approved"
    }
  },
  "card": {
    "object": "card",
    "first_six": "511111",
    "scheme": "MASTERCARD",
    "brand": "MASTERCARD",
    "last_four": "1118"
  },
  "receipt": {
    "id": "202007220958092921",
    "email": true,
    "sms": true
  },
  "customer": {
    "id": "cus_TS051320220959Di9e0709722",
    "first_name": "test",
    "last_name": "test",
    "email": "test@test.com",
    "phone": {
      "country_code": "965",
      "number": "51234567"
    }
  },
  "merchant": {
    "country": "KW",
    "currency": "KWD",
    "id": "599424"
  },
  "source": {
    "object": "token",
    "type": "CARD_NOT_PRESENT",
    "payment_type": "DEBIT",
    "payment_method": "MASTERCARD",
    "channel": "INTERNET",
    "id": "tok_Xx1e922659l00Z7gI8b577"
  },
  "redirect": {
    "status": "SUCCESS",
    "url": "http://your_website.com/redirect_url"
  },
  "post": {
    "status": "SUCCESS",
    "url": "https://eo9y4shdh3frsms.m.pipedream.net"
  },
  "activities": [
    {
      "id": "activity_TS061320220959h2J50709738",
      "object": "activity",
      "created": 1662544753039,
      "status": "INITIATED",
      "currency": "KWD",
      "amount": 1,
      "remarks": "charge - created"
    }
  ]
}