Get capture

Captures API v2
GEThttps://api.mollie.com/v2/payments/*paymentId*/captures/*id*

Retrieve a single capture by its ID. Note the original payment’s ID is needed as well.

Captures are used for payments that have the authorize-then-capture flow. The only payment methods at the moment that have this flow are Klarna Pay later and Klarna Slice it.

Parameters

Replace paymentId in the endpoint URL by the payment’s ID, and replace id by the capture’s ID. For example: /v2/payments/tr_7UhSN1zuXS/captures/cpt_4qqhO89gsT.

Access token parameters

If you are using organization access tokens or are creating an OAuth app, the testmode query string parameter is also available.

testmode

boolean
optional
Set this to true to retrieve a test mode capture.

Response

200 application/hal+json

resource

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

id

string
The capture’s unique identifier, for example cpt_4qqhO89gsT.

mode

string

The mode used to create this capture.

Possible values: live test

amount

amount object
The amount captured.

settlementAmount

amount object
This optional field will contain the amount that will be settled to your account, converted to the currency your account is settled in. It follows the same syntax as the amount property.

paymentId

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

shipmentId

string
optional
The unique identifier of the shipment that triggered the creation of this capture, for example: shp_3wmsgCJN4U. The full shipment object can be retrieved via the shipment URL in the _links object.

settlementId

string
optional
The unique identifier of the settlement this capture was settled with, for example: stl_jDk30akdN. The full settlement object can be retrieved via the capture URL in the _links object.

createdAt

datetime
The capture’s date and time of creation, in ISO 8601 format.

_links

object

An object with several URL objects relevant to the capture. Every URL object will contain an href and a type field.

self

URL object
The API resource URL of the capture itself.

payment

URL object
The API resource URL of the payment the capture belongs to.

shipment

URL object
optional
The API resource URL of the shipment that triggered the capture to be created.

settlement

URL object
optional
The API resource URL of the settlement this capture has been settled with. Not present if not yet settled.

documentation

URL object
The URL to the capture retrieval endpoint documentation.

Example

cURLPHPPythonRubyNode.js
1
2
 curl -X GET https://api.mollie.com/v2/payments/tr_WDqYK6vllg/captures/cpt_4qqhO89gsT \
     -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"
1
2
3
4
5
6
<?php
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");

$payment = $mollie->payments->get("tr_WDqYK6vllg");
$capture = $payment->getCapture("cpt_4qqhO89gsT");
1
2
3
4
We don't have a Python code example for this API call yet.

If you have some time to spare, feel free to open a pull request at:
https://github.com/mollie/api-documentation
1
2
3
4
We don't have a Ruby code example for this API call yet.

If you have some time to spare, feel free to open a pull request at:
https://github.com/mollie/api-documentation
1
2
3
4
We don't have a Node.js code example for this API call yet.

If you have some time to spare, feel free to open a pull request at:
https://github.com/mollie/api-documentation

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
HTTP/1.1 200 OK
Content-Type: application/hal+json

{
    "resource": "capture",
    "id": "cpt_4qqhO89gsT",
    "mode": "live",
    "amount": {
        "value": "1027.99",
        "currency": "EUR"
    },
    "settlementAmount": {
        "value": "399.00",
        "currency": "EUR"
    },
    "paymentId": "tr_WDqYK6vllg",
    "shipmentId": "shp_3wmsgCJN4U",
    "settlementId": "stl_jDk30akdN",
    "createdAt": "2018-08-02T09:29:56+00:00",
    "_links": {
        "self": {
            "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg/captures/cpt_4qqhO89gsT",
            "type": "application/hal+json"
        },
        "payment": {
            "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg",
            "type": "application/hal+json"
        },
        "shipment": {
            "href": "https://api.mollie.com/v2/orders/ord_8wmqcHMN4U/shipments/shp_3wmsgCJN4U",
            "type": "application/hal+json"
        },
        "settlement": {
            "href": "https://api.mollie.com/v2/settlements/stl_jDk30akdN",
            "type": "application/hal+json"
        },
        "documentation": {
            "href": "https://docs.mollie.com/reference/v2/captures-api/get-capture",
            "type": "text/html"
        }
    }
}