Capture transaction

View as Markdown
Capture collects money amounts (minimum of 0.99) from a customer bank account of a previously authorized transaction. This operation creates a new transaction called a Capture transaction. It is linked to the payment you are partially or fully capturing. You can issue multiple capture requests against a single Authorization. However, the sum of these captures must be less than or equal to what is allowed by the authorized payment. Ensure you also implement an Event Notification Handler to get transaction status updates. Although the splitToken field is optional at the API level, if you are using 'guaranteed' payments, omitting this field will result in a Fail event. When providing a splitToken, be sure the string is URL encoded. > **Note for Money Transfer** > If your application is configured for "Money Transfer" many properties in the `beneficiary` and `beneficiaryAccount` objects will be required. > See [Send money](/integrate/send-money) for more details.

Authentication

AuthorizationBasic

Path parameters

transactionIdstringRequired

Request

This endpoint expects an object.
merchantReferencestringRequired
A specific merchant reference for this capture such as an order number. If your account is configured for idempotency, this value must be unique to prevent duplicate transactions.
amountstringRequired<=10 characters

The amount to be captured. If the value is omitted, the maximum allowed amount is captured. (maximum of 10 characters with support for 2 decimal places)

splitTokenstringRequired
Encrypted token received from the Authorize event. Note, token may include url escape characters which must be encoded or the request will result in an error.
beneficiaryAccount.ibanstringOptionalformat: "^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$"

International Bank Account Number (IBAN)

beneficiaryAccount.accountNumberstringOptional<=12 characters
Account Number
beneficiaryAccount.paymentProvider.namestringOptional<=35 characters
Name of financial institution. 35 characters maximum.
beneficiaryAccount.paymentProvider.swiftstringOptional8-11 characters
International SWIFT code of the payment provider
beneficiaryAccount.paymentProvider.routingNumberstringOptionalformat: "^[0-9]{9}$"<=9 characters

Routing Number (9 digits)”

beneficiaryAccount.paymentProvider.countrystringOptional=2 characters

2-letter ISO country code of the beneficiary financial institution

beneficiary.namestringOptional
Customer full legal name
beneficiary.emailstringOptional
Customer email address
beneficiary.dateOfBirthstringOptional
Customer date of birth
beneficiary.taxIdstringOptional

Customer tax ID (e.g. SSN [US], SIN [CA])

beneficiary.address.address1stringOptional
Street address of the beneficiary financial institution
beneficiary.address.address2stringOptional

Street address line 2 of the beneficiary financial institution (if applicable)

beneficiary.address.citystringOptional
City or Locality of the beneficiary financial institution
beneficiary.address.statestringOptional
State or Province of the beneficiary financial institution
beneficiary.address.zipstringOptional
ZIP or postal code of the beneficiary financial institution
beneficiary.address.countrystringOptional=2 characters
2 character ISO Country code of the beneficiary financial institution
metadata.remittance.withdrawalMethodenumOptional
The method by which the recipient will receive the funds.
Allowed values:
interactionIdstringOptional
Optional interaction ID parameter for Preauthorization and Capture APIs, inclusion of which signifies consumer interaction tied to data obtained from getTrustlyInteraction function. If not specified, Trustly assumes the consumer is present in session. Set to "consumerNotPresent" to signify that the transaction is merchant-initiated and the consumer is not present.

Response

OK
transactionIdstring>=1 character

A unique transaction identifier generated by Trustly (15 character max).

transactionTypeenum

Type of transaction record. See Transaction Types

paymentobject
A Trustly Payment
currencyenum

3-letter ISO Currency Code. Currently only USD is supported.

amountstring>=1 character

The amount of the transaction. (10 characters with support for 2 decimal places)

pendingstring>=1 character

The total amount that is still pending completion. (10 characters with support for 2 decimal places)

paidstring>=1 character

The total amount that was already paid. (10 characters with support for 2 decimal places)

refundedstring>=1 character

The total amount that was refunded. (10 characters with support for 2 decimal places)

reversedstring>=1 character

The total amount that was reversed. (10 characters with support for 2 decimal places)

balancestring>=1 character

The balance of the amount paid, minus the amount reversed and/or refunded. (10 characters with support for 2 decimal places)

paymentProviderTransactionobject
Payment Provider Transaction
statusenum

Status code of the Payment Provider Transaction record. See Transaction Types

statusMessagestring>=1 character

A descriptive status message. (120 characters)

ipstring>=1 character
The client IP address in IPv4 or IPv6 format.
createdAtinteger
The date and time the transaction was created as a UNIX timestamp.
processedAtinteger
The date and time the transaction was processed as a UNIX timestamp.
completedAtinteger
The date and time the transaction was completed as a UNIX timestamp.
updatedAtinteger
The date and time the transaction was last updated as a UNIX timestamp.
merchantReferencestring>=1 character
Merchants internal reference id for the transaction.
recordVersiondouble
The current record version.
ppTrxIdstring>=1 character
internal use only
expiredAtinteger
The date and time the preauthorization will expire as a UNIX timestamp.
originalTransactionIdstring
feestring
timeZonestring
representmentScheduledAtdouble
paymentProcessorTypestring
statusCodestring
preAuthorizedboolean