v1

latestOpenAPI 3.1.02026-07-24270180.3 KB

Cancel a payment

delete/v1/charges/{id}/capture

Path parameters

idstring required

the ID of the pre-authorised charge to be cancelled. _id returned at the charge creation stage

Query parameters

any_namestring

The custom fields Object allows you to add any key/value pair to the API request to be returned in the response

Headers

x-user-secret-keystring required

Your API private/secret key. This can be found in the powerboard dashboard.

Content-Typestring required

Content-Type will always be application/json

Response

200

statusinteger
{"stackTrail":"paths:/v1/charges/{id}/capture:delete:responses:200:content:application/json:schema:properties:error","oasType":"schema","type":"unknown"}

Example response

{
  "status": 200,
  "resource": {
    "type": "charge",
    "data": {
      "schedule": {
        "authorised_pended_at": "2025-02-05T06:23:59.769Z"
      },
      "statistics": {
        "need_sync": true
      },
      "customer": {
        "payment_source": {
          "source_id": "67a2a4190cc4738d7f471db7",
          "type": "card",
          "ref_token": "9285266918288881",
          "card_name": "test",
          "card_number_last4": "0008",
          "card_number_bin": "51234500",
          "card_scheme": "mastercard",
          "card_funding_method": "DEBIT",
          "expire_month": 1,
          "expire_year": 2039,
          "gateway_id": "6788443942e960f9aa2f9ed4",
          "gateway_type": "MasterCard",
          "gateway_name": "MasterCard",
          "vault_token": "bc3ccf7e-644b-4cae-8e97-5f2948c414e7",
          "vault_type": "permanent"
        },
        "customer_id": "67a2a4180cc4738d7f471db6",
        "first_name": "Minu",
        "last_name": "Customer",
        "email": "john@test.com",
        "phone": "+61111111111",
        "reference": "Customer 1"
      },
      "_id": "67a2e7d38038474b1c0f84cc",
      "type": "financial",
      "amount": 100,
      "currency": "AUD",
      "status": "cancelled",
      "company_id": "678842c71cd4d8d8488a83f3",
      "authorization": true,
      "one_off": true,
      "_source_ip_address": "130.41.2.223",
      "transactions": [
        {
          "created_at": "2025-02-05T04:23:47.708Z",
          "type": "sale",
          "status": "cancelled",
          "amount": 100,
          "currency": "AUD",
          "initialization_source": "internet",
          "_id": "67a2e7d38038474b1c0f84cd",
          "authorization_code": "025273",
          "external_id": "9b64f82d-1407-4fe5-ae41-e56985654f4c:22b799e1-8201-45ef-bdab-61fa222081b4",
          "external_reference": "503604025273",
          "pended_at": "2025-02-05T06:23:59.769Z",
          "processed_at": "2025-02-05T04:23:48.823Z",
          "updated_at": "2025-02-05T04:23:59.805Z"
        }
      ],
      "updated_at": "2025-02-05T04:25:47.545Z",
      "created_at": "2025-02-05T04:23:47.717Z",
      "__v": 1,
      "external_id": "9b64f82d-1407-4fe5-ae41-e56985654f4c:22b799e1-8201-45ef-bdab-61fa222081b4"
    }
  }
}