v1

latestOpenAPI 3.1.02026-07-24270180.3 KB

Capture a payment

Capture an authorised charge

post/v1/charges/{id}/capture

Path parameters

idstring required

The charge _id returned at creation stage

Headers

x-user-secret-keystring required

Your PowerBoard API secret key

Content-Typestring required

Request body

amountstring

The amount to capture

referencestring

The manually created reference for the capture

Response

200

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

Example response

{
  "status": 201,
  "resource": {
    "type": "charge",
    "data": {
      "schedule": {
        "authorised_pended_at": "2025-02-04T05:52:45.555Z"
      },
      "statistics": {
        "need_sync": true
      },
      "customer": {
        "payment_source": {
          "vault_token": "23acb061-fb09-4a9c-b523-51802afb05bf",
          "type": "card",
          "card_name": "test",
          "card_number_bin": "41111111",
          "card_number_last4": "1111",
          "card_scheme": "visa",
          "card_funding_method": "DEBIT",
          "expire_month": 1,
          "expire_year": 39,
          "gateway_id": "6788443942e960f9aa2f9ed4",
          "gateway_type": "MasterCard",
          "gateway_name": "MasterCard",
          "vault_type": "session"
        }
      },
      "_id": "67a18f01fc9d687b999142fc",
      "type": "financial",
      "amount": 10,
      "currency": "AUD",
      "status": "complete",
      "company_id": "678842c71cd4d8d8488a83f3",
      "capture": true,
      "authorization": true,
      "one_off": true,
      "_source_ip_address": "130.41.2.210",
      "transactions": [
        {
          "created_at": "2025-02-04T03:52:33.275Z",
          "type": "sale",
          "status": "complete",
          "amount": 10,
          "currency": "AUD",
          "_source_ip_address": "130.41.2.210",
          "include_authorization": true,
          "initialization_source": "internet",
          "first_payment": true,
          "_id": "67a18f01fc9d687b999142fd",
          "authorization_code": "027087",
          "external_id": "3571569b-c24f-4a84-9be7-d02944b9bea1:d7e74e7d-712b-409c-82dd-9d21abc58f29",
          "external_reference": "503503027087",
          "pended_at": "2025-02-04T05:52:45.555Z",
          "processed_at": "2025-02-04T03:52:34.539Z",
          "updated_at": "2025-02-04T03:52:45.589Z"
        }
      ],
      "updated_at": "2025-02-04T03:54:40.640Z",
      "created_at": "2025-02-04T03:52:33.286Z",
      "__v": 1,
      "external_id": "3571569b-c24f-4a84-9be7-d02944b9bea1:d7e74e7d-712b-409c-82dd-9d21abc58f29"
    }
  }
}