Skip to main content

Transaction management

Capturing

When you are ready to ship the order, the transaction can be captured. When capturing, the money will be transferred to the merchant's account.

info

After authorizing the transaction, it needs to be captured within a certain amount of time. See https://www.dintero.com/knowledge-base/authorizations for more details.

The API allows for both a full amount capture and a partial amount capture. The amount to capture cannot be higher than the authorized amount.

Partial capture can be used to capture parts of the total transaction amount when needed, e.g, if only parts of the entire order is shipped or for other reasons. Partial capture may be called as many times as required as long as there is a remaining authorized amount to capture.

info

If the session contained an order.shipping_option, this will have been moved to the list of items in the transaction, and this is where you should specify the shipping_option when capturing.

caution

NB! Captures might fail for various reasons, so it's important to check that the response indicates a successful capture.

Request

POST /v1/transactions/{id}/capture Capture

{
"amount": 29990,
"capture_reference": "string",
"items": [
{
"line_id": "1",
"amount": 29990
}
]
}
info

According to regulations you should not capture a payment until the product or service is provided to the customer. For more information, please see the Consumer Authority's Guidelines for the standard sales conditions for consumer purchases of goods over the internet.

Void/cancel

If, for some reason, the order will not be fulfilled, you can cancel the transaction to release the money from the customer's account.

A transaction can only be voided if it has not been captured.

After the void is successful, the transaction status is changed to AUTHORIZATION_VOIDED

Request

POST /v1/transactions/{id}/void Void

Response

{
"id": "...",
...
"status": "AUTHORIZATION_VOIDED"
}

Refund

If the order, or parts of it, are returned, the money can be refunded. The refund amount cannot be larger than the captured amount.

caution

NB! Refunds might fail for various reasons, so it's important to check that the response indicates a successful refund.

Request

POST /v1/transactions/{id}/refund Refund

{
"amount": 29990,
"reason": "string",
"items": [
{
"line_id": "1",
"amount": 29990
}]
}