-
Notifications
You must be signed in to change notification settings - Fork 0
Capture
Mohamed Osman edited this page Sep 30, 2019
·
19 revisions
For a transaction to be captured, it must be in the PREAUTH
state.
- Secret key is used to validate the API key. Then, the API key is mapped to the correct merchant.
- PSP test mode flag is sent to validate the transaction mode on the PSP side.
A new transaction is then created using the same information from the transaction with the PREAUTH
state. The transaction state is updated to CAPTURE
and the latest payment information is used by parsing the merchant PSP configuration.
Note: A transaction can't be captured more than once.
A transaction can be captured by providing the following parameters in a request header:
Parameter Name | Description | Type | Required |
---|---|---|---|
Secret-Key | The secret API key defined for the merchants | String | Yes |
PSP-Test-Mode | A flag defining if the alias is for the PSP test mode | Boolean | No |
URL path:
Parameter Name | Description | Type | Required |
---|---|---|---|
Transaction-Id | Id of the transaction that will be captured | String | Yes |
Response body:
Parameter Name | Description | Type |
---|---|---|
transactionId | Stash! transaction id | String |
amount | Amount in smallest currency unit (e.g. cent) | Int |
currency | Currency | String |
status | SUCCESS or FAIL or PENDING | String |
action | CAPTURE | String |
The Swagger documentation can be found here.