Capturing a payment
Behaviour
Payments which were initiated with the ‘capture’ parameter set to false, receive status AUTHORIZED. This means no actual money is taken from the consumer’s account, but a reservation is made.
When amountToCapture is specified and lower than the authorized amount, the remaining amount will be released.
Upon successful capture, the transaction amount will be changed to the amount that is captured and the status of the transaction will be changed to PROCESSED.
In order to capture this authorized payment, a dedicated endpoint is called.
URL: https://sandbox.globadyme.com/api/globadymeGateway/transaction/capturePayment
Authorization: JWT
Request example:
{
"transactionId": "0abd7444-6744-44ee-87eb-5c7ae545c3c3",
"amountToCapture": 100,
"description": "Hotel room"
}
Request parameters:
Name | Description | Type | M/O/C |
---|---|---|---|
transactionId | The transaction to capture | UUID | Mandatory |
amountToCapture | The amount to capture. May be lower than the original transaction amount. If absent, the original transaction amount is captured. | Float | Optional |
description | Description of the capture event. | String | Optional |
Response example:
{
"message": "capture",
"details": {
"transactionId": "0abd7444-6744-44ee-87eb-5c7ae545c3c3",
"amountReleased": 133.00,
"amountAuthorized": 233.00,
"status": "SUCCEEDED",
"amountCaptured": 100
}
}