Captures API

Capture an authorized payment.

Some payment methods allow you to first collect a customer's authorization, and capture the amount at a later point.

By default, Mollie captures payments automatically. If however you configured your payment with captureMode: manual, you can capture the payment using this endpoint after having collected the customer's authorization.

🔑 Access with

API key

Advanced access token with payments.write

OAuth access with payments.write

post/payments/{paymentId}/captures

Request

  • Base URL
    https://api.mollie.com/v2
  • URL
    https://api.mollie.com/v2/payments/{paymentId}/captures
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or OAuth 2
      Authorization code: https://my.mollie.com/oauth2/authorize
      Token URL: https://api.mollie.com/oauth2/tokens scopes: payments.write

Request body

resourcestring

Indicates the response contains a capture object. Will always contain the string capture for this endpoint.

idstring

The identifier uniquely referring to this capture. Example: cpt_mNepDkEtco6ah3QNPUGYH.

modestring

Whether this entity was created in live mode or in test mode.

Possible values: live test

descriptionstring

The description of the capture.

statusstring

The capture's status.

Possible values: pending succeeded failed

paymentIdstring

The unique identifier of the payment this capture was created for. For example: tr_5B8cwPMGnU6qLbRvo7qEZo. The full payment object can be retrieved via the payment URL in the _links object.

shipmentIdstring nullable

The unique identifier of the shipment that triggered the creation of this capture, if applicable. For example: shp_gNapNy9qQTUFZYnCrCF7J.

settlementIdstring nullable

The identifier referring to the settlement this capture was settled with. For example, stl_BkEjN2eBb. This field is omitted if the capture is not settled (yet).

createdAtstring

The entity's date and time of creation, in ISO 8601 format.

testmodeboolean nullable

Whether to create the entity in test mode or live mode.

Most API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting testmode to true.

Example request

{
  "resource": "capture",
  "id": "cpt_vytxeTZskVKR7C7WgdSP3d",
  "mode": "live",
  "description": "Capture for cart #12345",
  "amount": {
    "currency": "EUR",
    "value": "10.00"
  },
  "settlementAmount": {
    "currency": "EUR",
    "value": "10.00"
  },
  "status": "succeeded",
  "paymentId": "tr_5B8cwPMGnU",
  "shipmentId": "shp_5x4xQJDWGNcY3tKGL7X5J",
  "settlementId": "stl_5B8cwPMGnU",
  "createdAt": "2024-03-20T09:13:37+00:00",
  "_links": {
    "self": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "payment": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "settlement": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "shipment": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "documentation": {
      "href": "https://...",
      "type": "application/hal+json"
    }
  }
}

Response

The newly created capture object. For a complete reference of the capture object, refer to the Get capture endpoint documentation.

resourcestring required

Indicates the response contains a capture object. Will always contain the string capture for this endpoint.

idstring required

The identifier uniquely referring to this capture. Example: cpt_mNepDkEtco6ah3QNPUGYH.

modestring required

Whether this entity was created in live mode or in test mode.

Possible values: live test

descriptionstring

The description of the capture.

statusstring required

The capture's status.

Possible values: pending succeeded failed

paymentIdstring required

The unique identifier of the payment this capture was created for. For example: tr_5B8cwPMGnU6qLbRvo7qEZo. The full payment object can be retrieved via the payment URL in the _links object.

shipmentIdstring nullable

The unique identifier of the shipment that triggered the creation of this capture, if applicable. For example: shp_gNapNy9qQTUFZYnCrCF7J.

settlementIdstring nullable

The identifier referring to the settlement this capture was settled with. For example, stl_BkEjN2eBb. This field is omitted if the capture is not settled (yet).

createdAtstring required

The entity's date and time of creation, in ISO 8601 format.

testmodeboolean nullable

Whether to create the entity in test mode or live mode.

Most API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting testmode to true.

Example response

{
  "resource": "capture",
  "id": "cpt_vytxeTZskVKR7C7WgdSP3d",
  "mode": "live",
  "description": "Capture for cart #12345",
  "amount": {
    "currency": "EUR",
    "value": "10.00"
  },
  "settlementAmount": {
    "currency": "EUR",
    "value": "10.00"
  },
  "status": "succeeded",
  "paymentId": "tr_5B8cwPMGnU",
  "shipmentId": "shp_5x4xQJDWGNcY3tKGL7X5J",
  "settlementId": "stl_5B8cwPMGnU",
  "createdAt": "2024-03-20T09:13:37+00:00",
  "_links": {
    "self": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "payment": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "settlement": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "shipment": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "documentation": {
      "href": "https://...",
      "type": "application/hal+json"
    }
  }
}

Changes

    • info

      added the new optional request property

    • info

      added the optional write-only property allOf[subschema #1]/testmode to the response with the status