Capture of the order

A capture must be made when the product or products are sent with the import of the total price of the sale. The amount of the capture must be the total amount of the order less total amount of the canceled items.

{
    "amount": 10050,
    "id": "cf04aa87a6364f14b164e48a84e99936",
    "created": "2019-06-21T16:51:19.494155+02:00",
    "refunds": [],
    "refunded_amount": 0,
    "remaining_amount": 0
}
Parameter Type Required Description
amount decimal yes Capture amount
id string yes Your capture ID
created string yes Date of the capture
refunds object no Refunds on capture done
refunded_amount decimal yes Refunded capture amount
remaining_amount decimal yes Remaining capture amount (It will always be 0)

01. Capture detail

GET /orders/:orderId/captures HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
Parameter Type Required Description
:orderId string yes Order ID.

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Aplazame-Media-Type: aplazame.v1

{
    "remaining_capture_amount": 60020,
    "results": [
        {
            "amount": 10050,
            "id": "cf04aa87a6364f14b164e48a84e99936",
            "created": "2019-06-21T16:51:19.494155+02:00",
            "refunds": [],
            "refunded_amount": 0,
            "remaining_amount": 10050
        }
    ]
}
Parameter Type Description
remaining_capture_amount decimal Remaining order amount without capture (It will always be 0)
results object Captures of order

02. Request capture

POST /orders/:orderId/captures HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com

{
  "amount": 10050
}
Parameter Type Required Description
:orderId string yes Order ID.
amount decimal yes Amount to capture

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Aplazame-Media-Type: aplazame.v1

{
    "remaining_capture_amount": 49970,
    "amount": 10050,
    "id": "cf04aa87a6364f14b164e48a84e99936",
    "created": "2019-06-21T16:51:19.494155+02:00",
    "refunds": [],
    "refunded_amount": 0,
    "remaining_amount": 10050
}
Parameter Type Description
remaining_capture_amount decimal Remaining order amount without capture (It will always be 0)
amount decimal Capture amount
id string Your capture ID
created string Date of the capture
refunds object Refunds on capture done
refunded_amount decimal Refunded capture amount
remaining_amount decimal Remaining capture amount (It will always be 0)