Capture a transaction
This API allows you to CAPTURE an order in capturerequired status.
Configuration pre-requisites
- your account must be configured to support auth/capture flow
- you must define
transactionType = authorizationin your call to /evaluate- a capture window will be set for for transactions marked as 'capturerequired'; if not captured within this time frame, the transaction will be automatically voided.
Reach out to [email protected] for more details
According to this configuration, a call to /evaluate or /orders may return the status CAPTURE REQUIRED.
In that scenario, you will need to invoke /capture, and then update the definitive status with /orders.

Capture workflow
Request
| idempotencyKey | Guid | Required | Generate a GUID | 
| orderId | Guid | Required | Value returned by /evaluate. | 
| amount | int | Required | The amount to capture from the order. In cents | 
| currency | string | Required | The ISO 4217 currency code for the transaction. | 
Response
After receiving a response from /capture, you need to update this order in your CRM with the corresponding status.
| Status Code | 200 | 
| Response Body | SUCCESS | FAILED | 
| 
 | string | success / fail | 
| 
 | boolean | Indicates if the API request was successful | 
| 
 | string | The result of the API request Optional | 
| 
 | string | The status code of the API request Optional | 
| 
 | array of string | Any errors encountered during the API request Optional | 
| 
 | object | Additional custom properties for the API request Optional | 
Payload examples
Request
curl --request POST \
    --url https://api-sandbox.flexfactor.io/v1/capture	
		--header 'Authorization: Bearer {bearer_token_returned_by_oauth2}' \	//replace with bearer returned by /oauth2
    --header 'accept: application/json' \
    --header 'content-type: application/*+json' \
    --data '
{
	"idempotencyKey": "{generate_a_GUID}",
  "orderId": "{same_orderId_returned_by_/evaluate_for_that_order}",
  "amount": 10000,
  "currency": "USD"
}Response
HTTP/1.1 200 OK
Content-Type: application/json
{
   "status": "SUCCESS | FAILED",
   "success": true,
   "result": null,
   "statusCode": null,
   "errors": [],
   "customProperties": {}
}Updated 4 months ago
