Capture of the order 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 detailGET /orders/:orderId /captures HTTP/1.1
application/vnd.aplazame.v1+json
Bearer api_private_key
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
application/json; charset=utf-8
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 capturePOST /orders/:orderId /captures HTTP/1.1
application/vnd.aplazame.v1+json
Bearer api_private_key
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
application/json; charset=utf-8
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)