Capture of the order
caution
We only accept requests for a catch for the product paid in 15 days and the order must be confirmed.
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
- http
- shell
- python
- php
- C#
GET /orders/:orderId/captures HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
$ curl "https://api.aplazame.com/orders/:orderId/captures" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
import aplazame_sdk
client = aplazame_sdk.Client('api_private_key')
response = client.get_capture_refund(':orderId')
<?php
use Aplazame\Api\Client as AplazameClient;
$aplazameClient = new AplazameClient("https://api.aplazame.com", AplazameClient::ENVIRONMENT_PRODUCTION, " api_private_key");
$result = $aplazameClient->get("/orders/{$orderId}/captures");
using Aplazame.Api;
Client client = new Client("https://api.aplazame.com", Client.EnvironmentProduction, " api_private_key");
dynamic result = client.Get($"/orders/{orderId}/captures");
| 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 | Required | Description |
|---|---|---|---|
| remaining_capture_amount | decimal | Remaining order amount without capture (It will always be 0). | |
| results | object | Captures of order. |
02 - Request capture
- http
- shell
- python
- php
- C#
POST /orders/:orderId/captures HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
{
"amount": 10050
}
$ curl "https://api.aplazame.com/orders/:orderId/captures" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key" \
-X POST \
-d "amount=10050"
import aplazame_sdk
client = aplazame_sdk.Client('api_private_key')
response = client.capture_refund(':orderId', 10050)
<?php
use Aplazame\Api\Client as AplazameClient;
$aplazameClient = new AplazameClient("https://api.aplazame.com", AplazameClient::ENVIRONMENT_PRODUCTION, " api_private_key");
$result = $aplazameClient->post("/orders/{$orderId}/captures", ["amount" => Aplazame\Serializer\Decimal::fromFloat(100.50)->value]);
using Aplazame.Api;
Client client = new Client("https://api.aplazame.com", Client.EnvironmentProduction, " api_private_key");
dynamic result = client.Post($"/orders/{orderId}/captures", new {amount = Aplazame.Serializer.DecimalType.FromDouble(100.50)});
| 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 | Required | 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). |