Skip to content

Capture a charge

Request

Capture an authorized charge.

Security
bearerAuth or basicAuth
Path
charge_idstringrequired

ID of the charge to capture

Bodyapplication/json

Fields used while capturing a charge.

amountnumber, (double), >= 0

Amount to capture. If omitted, full charge amount is captured.

Example:1000
order_numberstring

Optional order number override applied during capture.

Example:"5055"
po_numberstring

Optional PO number override applied during capture.

Example:"PO-555"
curl -i -X POST \
  'https://docs.resolvepay.com/_mock/merchant-api/openapi/charges/{charge_id}/capture' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 1000,
    "order_number": "5055",
    "po_number": "PO-555"
  }'

Responses

An object representing a charge.

Bodyapplication/json
idstring

Unique identifier for the charge.

Example:"PMMlaE5wbg0"
amountnumber, (double)

Authorized amount of the charge in USD.

Example:1000
customer_idstring

Unique identifier of the customer.

Example:"X50sgfRd"
amount_refundednumber, (double)

Total refunded amount for the charge in USD.

Example:0
canceledboolean

Indicates whether the charge is canceled.

Example:false
canceled_atstring, (date-time)

Date the charge was canceled.

Example:null
capturedboolean

Indicates whether the charge has been captured.

Example:true
captured_atstring, (date-time)

Date the charge was captured.

Example:"2020-01-02T00:00:00.730Z"
created_atstring, (date-time)

Date the charge was created.

Example:"2020-01-01T00:00:00.730Z"
invoice_urlstring, (uri)

URL of the invoice document associated with this charge.

Example:"https://example.com/invoice.pdf"
metadataobject

Custom metadata attached to the charge.

Example:
{ "source": "checkout" }
numberstring

Charge number identifier.

Example:"ch_100001"
termsstring

Payment terms associated with the charge.

Enum:"due_upon_receipt""net7""net10""net10th""net15""net20""net30""net45""net60""net75"
Example:"net30"
updated_atstring, (date-time)

Date the charge was last updated.

Example:"2020-01-02T00:00:00.730Z"
merchant_invoice_idstring

ID of the merchant invoice associated with the charge.

Example:"INabc123"
order_numberstring

Order number associated with the charge.

Example:"5055"
po_numberstring

PO number associated with the charge.

Example:"PO-555"
feenumber, (double)

Fee amount associated with the charge in USD.

Example:25.5
fee_refundednumber, (double)

Refunded fee amount for the charge in USD.

Example:0
Response
{ "id": "PMMlaE5wbg0", "amount": 1000, "customer_id": "X50sgfRd", "amount_refunded": 0, "canceled": false, "canceled_at": null, "captured": true, "captured_at": "2020-01-02T00:00:00.730Z", "created_at": "2020-01-01T00:00:00.730Z", "invoice_url": "https://example.com/invoice.pdf", "metadata": { "source": "checkout" }, "number": "ch_100001", "terms": "net30", "updated_at": "2020-01-02T00:00:00.730Z", "merchant_invoice_id": "INabc123", "order_number": "5055", "po_number": "PO-555", "fee": 25.5, "fee_refunded": 0 }