> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://amer.developers.trustly.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://amer.developers.trustly.com/_mcp/server.

# Capture transaction

POST https://sandbox.trustly.one/api/v1/transactions/{transactionId}/capture
Content-Type: application/x-www-form-urlencoded

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.

Reference: https://amer.developers.trustly.com/api-reference/api/transactions/post-transactions-transaction-id-capture

## Authentication

- `Authorization` header (basic auth, required)

## Request

### Path parameters

- `transactionId` (string, required) — Authorization Transaction ID retrieved from a Trustly Deferred or Recurring transaction, or Preauthorization Transaction ID retrieved from a Trustly Preauthorize API.

### Body (application/x-www-form-urlencoded)

- `merchantReference` (string, required) — 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.
- `amount` (string, required) — 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)
- `splitToken` (string, required) — 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.iban` (string, optional) — International Bank Account Number (IBAN)
- `beneficiaryAccount.accountNumber` (string, optional) — Account Number
- `beneficiaryAccount.paymentProvider.name` (string, optional) — Name of financial institution. 35 characters maximum.
- `beneficiaryAccount.paymentProvider.swift` (string, optional) — International SWIFT code of the payment provider
- `beneficiaryAccount.paymentProvider.routingNumber` (string, optional) — Routing Number (9 digits)"
- `beneficiaryAccount.paymentProvider.country` (string, optional) — 2-letter ISO country code of the beneficiary financial institution
- `beneficiary.name` (string, optional) — Customer full legal name
- `beneficiary.email` (string, optional) — Customer email address
- `beneficiary.dateOfBirth` (string, optional) — Customer date of birth
- `beneficiary.taxId` (string, optional) — Customer tax ID (e.g. SSN [US], SIN [CA])
- `beneficiary.address.address1` (string, optional) — Street address of the beneficiary financial institution
- `beneficiary.address.address2` (string, optional) — Street address line 2 of the beneficiary financial institution (if applicable)
- `beneficiary.address.city` (string, optional) — City or Locality of the beneficiary financial institution
- `beneficiary.address.state` (string, optional) — State or Province of the beneficiary financial institution
- `beneficiary.address.zip` (string, optional) — ZIP or postal code of the beneficiary financial institution
- `beneficiary.address.country` (string, optional) — 2 character ISO Country code of the beneficiary financial institution
- `metadata.remittance.withdrawalMethod` (enum, optional) — The method by which the recipient will receive the funds.
  - Allowed values: `BankDeposit`, `Cash`, `DebitCard`, `DigitalWallet`, `HomeDelivery`
- `interactionId` (string, optional) — 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

### 200

OK

- `transactionId` (string, required) — A unique transaction identifier generated by Trustly (15 character max).
- `transactionType` (enum, required) — Type of transaction record. See [Transaction Types](/integrate/api-fundamentals/status-codes-and-type-definitions#transaction-types)
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `10`
- `payment` (object, required) — A Trustly Payment
  - `paymentId` (string, required) — A unique payment identifier generated by Trustly (15 character max).
  - `paymentType` (enum, required) — Financial Institution Account Type: * `1`: Instant - Instant payment. The debit instruction is automatically initiated with that day's batch after consumer authorization. * `2`: Deferred - Deferred payment. Payment is authorized but the capture operation must be called to initiate the debit. You can start to initiate multiple captures that are less than or equal to the original transaction authorization amount. * `3`: Recurring - Recurring payment. Same as deferred but associated to a payment agreement between consumer and merchant that defines how much and when the capture can be started. * `4`: Disbursement - Disbursement payment. This payment type can only be used for disbursements. * `5`: Verification - This payment type is used to verify the customer financial institution account as the payments will be done outside of the Trustly system. * `6`: Retrieval Data retrieval. This payment type is used to retrieve account and user information from Trustly without an associated payment request. This payment type is not enabled by default. Contact Trustly if you need this feature.
    - Allowed values: `1`, `2`, `3`, `4`, `5`, `6`
  - `merchant` (object, required)
    - `merchantId` (string, optional) — Unique Trustly Merchant ID.
    - `name` (string, optional) — Merchants name.
  - `merchantReference` (string, required) — An external reference from the merchant. Ex: Order identifier from merchant e-commerce application.
  - `merchantId` (string, required) — Your Trustly Merchant Id. It will be provided to you.
  - `fingerprint` (string, required) — Internal use only
  - `verification` (object, required)
    - `status` (enum, optional) — Verification Status: * `1`: Automatic - Payment verification followed Trustly internal rules. * `2`: ToVerify - Payment transaction is held (status = OnHold) for further investigation and approval by the merchant. * `3`: Verified - Payment was verified and approved by the merchant or Trustly (see Verification Mode). * `4`: Refused - Payment was denied by the merchant or Trustly after verification.
      - Allowed values: `1`, `2`, `3`, `4`
    - `mode` (enum, optional) — Verification Mode: * `1`: VerifiedByMerchant * `2`: ApprovedByMerchant * `3`: VerifiedByTrustly * `4`: AmountAuthorizedByMerchant
      - Allowed values: `1`, `2`, `3`, `4`
    - `verifyCustomer` (boolean, optional) — If true, the Customer information (name and zip code) was verified against information provided by the User's bank.
  - `account` (object, required)
    - `providerId` (string, optional) — Payment provider ID.
    - `paymentProvider` (object, optional) — Details of the Financial institution
      - `name` (string, required) — Name of the payment provider
      - `paymentProviderId` (string, optional) — A unique identifier for the Payment Provider.
      - `type` (double, optional)
      - `instantPayoutAvailable` (boolean, optional) — Whether payment provider supports instant payout.
      - `subType` (enum, optional) — Financial Institution Account Type: * `1000`: Online Banking * `2000`: Manual Entry * `2001`: Manual Entry with Challenge Deposit
        - Allowed values: `1000`, `2000`, `2001`
      - `swift` (string, optional)
      - `address` (object, optional) — Valid mailing or billing address associated with the customer
        - `country` (string, required) — 2 character [ISO Country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
        - `address1` (string, optional) — Address line 1 (e.g., street or PO Box)
        - `address2` (string, optional) — Address line 2 (e.g., apartment, suite or unit number)
        - `city` (string, optional) — City, district, town or village
        - `state` (string, optional) — State, province or region code
        - `zip` (string, optional) — ZIP or Postal Code
      - `country` (enum, optional) — 2-letter ISO country code of the financial institution
        - Allowed values: `US`, `CA`, `UK`, `DE`, `AU`
      - `instantPayment` (boolean, optional)
    - `country` (enum, optional) — 2-character ISO code of the country for the bank account that was selected. Currently only the US, CA, UK, DE, and AU are supported.
      - Allowed values: `US`, `CA`, `UK`, `DE`, `AU`
    - `name` (string, optional) — A description to identify a specific account (e.g. Test checking account)
    - `type` (double, optional) — See Financial Institution Account Type Values.
    - `profile` (double, optional) — See Financial Institution Account Profile Values
    - `accountNumber` (string, optional) — Bank Account Number or VAN if `virtualAccountRoutingPair` is equal to `true`.
    - `iban` (string, optional) — IBAN (International Bank Account Number) is an internationally agreed system of identifying bank accounts across national borders
    - `verified` (boolean, optional) — Indicates if the account is verified or not.
    - `verification` (object, optional)
      - `verified` (boolean, required) — true if the account is verified; false otherwise.
      - `type` (enum, required) — Verification Type: * `1`: Manual - The account was verified with manual account verification. For example, Manual Electronic Check and Micro Challenge Deposit. * `2`: Online Banking verification - The Account was verified using the Trustly Online Banking application. * `3`: Database verification - The Account was verified using the Trustly database or a Third-Party Service.
        - Allowed values: `1`, `2`, `3`
      - `hasEnoughFunds` (boolean, required) — If true, there is enough balance in account.
      - `verificationDate` (integer, required) — The date and time the verification was completed as a UNIX timestamp.
      - `score` (enum, optional) — Verification Score: * `0`: Invalid input. The account or routing number are invalid. (Verified Mapping = false) * `1`: There is a strong indication that the account is invalid. (Verified Mapping = false) * `2`: There are active non-bankable returns on this account that are less than 3 years old. (Verified Mapping = false) * `3`: There are administrative returns on this account. (Verified Mapping = false) * `4`: The format appears to be suspicious. (Verified Mapping = false) * `5`: There is no data on this account or format. (Verified Mapping = false) * `6`: We have not seen this account, but the format appears to be valid. (Verified Mapping = true) * `7`: We have seen this account but have not received a final disposition on the transaction. (Verified Mapping = true) * `8`: We have seen this account, but not in the last 6 months, and have seen no returns associated with the account. (Verified Mapping = true) * `9`: We have seen this account in the last 6 months and have seen no returns associated with the account. (Verified Mapping = true) * `10`: This account has been directly validated with/by the financial institution or 3rd party. We have the highest confidence that this account is valid. (Verified Mapping = true)
        - Allowed values: `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`
      - `thirdPartyScore` (enum, optional) — Verification Third-Party Score: * `0`: Failed RT validation. (Verified Mapping = 0) * `100`: The supplier has a strong indication that this account is invalid. (Verified Mapping = 1) * `200`: The supplier has active non-bankable debt(s) on this account that are less than 3 years old. (Verified Mapping = 2) * `300`: The supplier has administrative returns on this account. (Verified Mapping = 3) * `400`: The supplier does not have Neg data on this account, but the format appears to be suspicious. (Verified Mapping = 4) * `500`: The supplier does not have data on this account or format. (Verified Mapping = 5) * `600`: The supplier has not seen this account, but the format appears valid. (Verified Mapping = 6) * `700`: The supplier has seen this account, but did not receive a final disposition on the transaction. (Verified Mapping = 7) * `800`: The supplier has seen this account, but not in the last 6 months. (Verified Mapping = 8) * `900`: The supplier has seen this account in the last 6 months. (Verified Mapping = 9) * `999`: The supplier has the highest confidence that this account is valid. (Verified Mapping = 10)
        - Allowed values: `0`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900`, `999`
      - `numberOfTries` (double, optional) — Number of tries allowed.
      - `numberOfAttemptsLeft` (double, optional) — Number of remaining attempts.
    - `source` (double, optional)
    - `routingNumber` (string, optional) — Bank Routing Number
    - `token` (string, optional) — The Account Token
    - `accountNumberLastFour` (string, optional) — The last 4 digits of the real account number.
    - `virtualAccountRoutingPair` (boolean, optional) — Indicates if account is using virtual/tokenized account and routing numbers (VANs/TANs) or not.
  - `currency` (enum, required) — 3-letter ISO Currency Code. Currently only USD is supported.
    - Allowed values: `USD`
  - `amount` (string, required) — The total amount of the order, including tax and shipping. If transactionType is Recurring, this is the Setup Fee Amount.
  - `paymentProvider` (object, required) — Details of the Financial institution
    - `name` (string, required) — Name of the payment provider
    - `paymentProviderId` (string, optional) — A unique identifier for the Payment Provider.
    - `type` (double, optional)
    - `instantPayoutAvailable` (boolean, optional) — Whether payment provider supports instant payout.
    - `subType` (enum, optional) — Financial Institution Account Type: * `1000`: Online Banking * `2000`: Manual Entry * `2001`: Manual Entry with Challenge Deposit
      - Allowed values: `1000`, `2000`, `2001`
    - `swift` (string, optional)
    - `address` (object, optional) — Valid mailing or billing address associated with the customer
      - `country` (string, required) — 2 character [ISO Country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
      - `address1` (string, optional) — Address line 1 (e.g., street or PO Box)
      - `address2` (string, optional) — Address line 2 (e.g., apartment, suite or unit number)
      - `city` (string, optional) — City, district, town or village
      - `state` (string, optional) — State, province or region code
      - `zip` (string, optional) — ZIP or Postal Code
    - `country` (enum, optional) — 2-letter ISO country code of the financial institution
      - Allowed values: `US`, `CA`, `UK`, `DE`, `AU`
    - `instantPayment` (boolean, optional)
  - `allowedPaymentProviderType` (list of integer, required)
  - `auth` (object, required)
    - `token` (string, optional) — Authorization token.
    - `status` (integer, optional) — See Authorization Status Values.
    - `message` (string, optional) — Authorization message.
  - `authorization` (string, required) — Authorization token.
  - `authorizationStatus` (double, required) — Status of the related bank authorization. See Transaction Status Values.
  - `authorizationStatusMessage` (string, required) — Status message of the related bank authorization.
  - `pending` (string, required) — The total amount that is still pending completion. (10 characters with support for 2 decimal places)
  - `paid` (string, required) — The total amount that was already paid. (10 characters with support for 2 decimal places)
  - `refunded` (string, required) — The total amount that was refunded. (10 characters with support for 2 decimal places)
  - `reversed` (string, required) — The total amount that was reversed. (10 characters with support for 2 decimal places)
  - `balance` (string, required) — The balance of the amount paid, minus the amount reversed and/or refunded. (10 characters with support for 2 decimal places)
  - `createdAt` (integer, required) — The date and time the transaction was created as a UNIX timestamp.
  - `updatedAt` (integer, required) — The date and time the transaction was last updated as a UNIX timestamp.
  - `recordVersion` (double, required) — The current record version.
  - `paymentFlow` (double, required) — internal use only
  - `description` (string, optional) — A summary description of the order.
  - `returnUrl` (string, optional) — Return URL provided with the bank authorization.
  - `cancelUrl` (string, optional) — Cancel URL provided with the bank authorization.
  - `customer` (object, optional) — The Trustly customer object, containing identification details and contact information.
    - `name` (string, required) — Full name of the Customer
    - `address` (object, required) — Valid mailing or billing address associated with the customer
      - `country` (string, required) — 2 character [ISO Country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
      - `address1` (string, optional) — Address line 1 (e.g., street or PO Box)
      - `address2` (string, optional) — Address line 2 (e.g., apartment, suite or unit number)
      - `city` (string, optional) — City, district, town or village
      - `state` (string, optional) — State, province or region code
      - `zip` (string, optional) — ZIP or Postal Code
    - `phone` (string, required) — Customer phone number.
    - `email` (string, required) — Customer email address.
    - `taxId` (string, optional) — Customer tax ID (e.g. SSN [US], SIN [CA]). *May be required depending on industry and location.*
    - `dateOfBirth` (string, optional) — Customer date of birth.
    - `createdAt` (integer, optional) — The record created date and time as a UNIX timestamp.
    - `updatedAt` (integer, optional) — The record created date and time as a UNIX timestamp.
    - `customerId` (string, optional) — A unique Trustly customer identifier.
    - `externalId` (string, optional) — A unique merchant customer identifier.
    - `merchantId` (string, optional) — A unique Trustly merchant identifier.
    - `enrollDate` (integer, optional) — Date of the user's first transaction in your system, regardless of payment method used as a UNIX timestamp.
    - `vip` (string, optional) — Range that determines how low-risk the customer represents to the merchant
    - `currency` (string, optional) — Customer currency.
    - `balance` (string, optional) — Customer account balance (not associated with a financial institution account).
    - `organizationNumber` (string, optional) — Organization number for business accounts
    - `externalTier` (string, optional) — It should describe the customer''s rank to the merchant (e.g. Gold, Diamond, 4 stars, etc.)
    - `personId` (string, optional) — Unique customer identity throughout different banks.
    - `customData` (object, optional) — Object for sending merchant-specific custom data.
    - `driverLicense` (object, optional)
      - `number` (string, required) — Driver License number.
      - `state` (string, required) — 2 character ISO State code.
    - `nationalId` (string, optional) — Customer National ID
  - `address` (object, optional) — Valid mailing or billing address associated with the customer
    - `country` (string, required) — 2 character [ISO Country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
    - `address1` (string, optional) — Address line 1 (e.g., street or PO Box)
    - `address2` (string, optional) — Address line 2 (e.g., apartment, suite or unit number)
    - `city` (string, optional) — City, district, town or village
    - `state` (string, optional) — State, province or region code
    - `zip` (string, optional) — ZIP or Postal Code
  - `recurrence` (object, optional) — Recurring payment options
    - `startDate` (datetime, optional) — Recurring payment start date as a UNIX timestamp.
    - `endDate` (datetime, optional) — Recurring payment end date as a UNIX timestamp.
    - `nextOccurrence` (datetime, optional) — When the next capture will be issued if using automatic captures as a UNIX timestamp.
    - `recurringAmount` (string, optional) — Recurring payment amount. (maximum of 10 characters with support for 2 decimal places)
    - `debtSettlement` (string, optional) — Any debt amount settlement done outside of the Trustly like discounts or when consumers pays one recurring debt using another payment method like traditional checks or credit cards. (maximum of 10 characters with support for 2 decimal places)
    - `frequency` (integer, optional, default: 1) — How many payments per frequencyUnit. Defaults to 1. Example: To define 2 recurring payments every 3 months set: frequency=2, frequencyUnit=3 and frequencyUnitType=3.
    - `frequencyUnit` (double, optional) — Defines with frequencyUnitType the interval of the frequency of payments.
    - `frequencyUnitType` (enum, optional) — Frequency Unit Type
      - Allowed values: `Day`, `Week`, `Month`, `Year`
    - `automaticCapture` (boolean, optional) — If true, payment captures are issued automatically.
    - `recurrenceId` (string, optional)
  - `system` (enum, optional) — Financial Institution Account Type: * `-1`: None * `1`: PayWithMyBank * `2`: TrustlyAB
    - Allowed values: `-1`, `1`, `2`
  - `country` (enum, optional) — 2-character ISO code of the country for the bank account that was selected. Currently only the US, CA, UK, DE, and AU are supported.
    - Allowed values: `US`, `CA`, `UK`, `DE`, `AU`
  - `paymentProviderSubtype` (enum, optional) — Payment Provider Subtype: * `1000`: EasyOnline * `2000`: MEC * `2001`: MCD
    - Allowed values: `1000`, `2000`, `2001`
- `currency` (enum, required) — 3-letter ISO Currency Code. Currently only USD is supported.
  - Allowed values: `USD`
- `amount` (string, required) — The amount of the transaction. (10 characters with support for 2 decimal places)
- `pending` (string, required) — The total amount that is still pending completion. (10 characters with support for 2 decimal places)
- `paid` (string, required) — The total amount that was already paid. (10 characters with support for 2 decimal places)
- `refunded` (string, required) — The total amount that was refunded. (10 characters with support for 2 decimal places)
- `reversed` (string, required) — The total amount that was reversed. (10 characters with support for 2 decimal places)
- `balance` (string, required) — The balance of the amount paid, minus the amount reversed and/or refunded. (10 characters with support for 2 decimal places)
- `paymentProviderTransaction` (object, required) — Payment Provider Transaction
  - `paymentProviderTransactionId` (string, optional) — Unique payment provider transaction identifier.
  - `status` (string, optional) — See Payment Provider Transaction Status Codes.
  - `statusMessage` (string, optional) — Payment provider transaction status message.
  - `signature` (string, optional)
  - `statusDescription` (string, optional)
  - `paymentProcessor` (object, optional)
    - `paymentProcessorId` (string, optional)
    - `type` (integer, optional)
    - `name` (string, optional)
    - `shortName` (string, optional)
    - `url` (string, optional)
    - `active` (string, optional)
  - `thirdPartyDeclineCode` (string, optional)
  - `clearingHouse` (string, optional)
  - `instantSettle` (boolean, optional) — Whether instant settlement was used for transaction.
- `status` (enum, required) — Status code of the Payment Provider Transaction record. See [Transaction Types](/integrate/api-fundamentals/status-codes-and-type-definitions#transaction-types)
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `10`, `11`, `12`, `13`, `14`
- `statusMessage` (string, required) — A descriptive status message. (120 characters)
- `ip` (string, required) — The client IP address in IPv4 or IPv6 format.
- `createdAt` (integer, required) — The date and time the transaction was created as a UNIX timestamp.
- `processedAt` (integer, required) — The date and time the transaction was processed as a UNIX timestamp.
- `completedAt` (integer, required) — The date and time the transaction was completed as a UNIX timestamp.
- `updatedAt` (integer, required) — The date and time the transaction was last updated as a UNIX timestamp.
- `merchantReference` (string, required) — Merchants internal reference id for the transaction.
- `recordVersion` (double, required) — The current record version.
- `ppTrxId` (string, optional) — internal use only
- `expiredAt` (integer, optional) — The date and time the preauthorization will expire as a UNIX timestamp.
- `originalTransactionId` (string, optional)
- `fee` (string, optional)
- `timeZone` (string, optional)
- `representmentScheduledAt` (double, optional)
- `paymentProcessorType` (string, optional)
- `statusCode` (string, optional)
- `preAuthorized` (boolean, optional)

## Examples

### Example

**Request**

```json
{
  "merchantReference": "597E61428FCAED20",
  "amount": "1.00",
  "splitToken": "CIfiq7boMRABGNQBIAAqau/MFCGD81tomRcHj6ds1WhZCXnA2VjVKvw+MMlDD0Ir1bcejQECE7vxkA08eNjJoMYIIBy5VidbN57rR/mpAdqcA4wB/NJiI3a0BR3e09430S1mvdv5FPIr26NmUhmHKcGv0qXv5z7bsBY="
}
```

**Response**

```json
{
  "transactionId": "string",
  "transactionType": 0,
  "payment": {
    "paymentId": "string",
    "paymentType": 1,
    "merchant": {},
    "merchantReference": "string",
    "merchantId": "string",
    "fingerprint": "string",
    "verification": {},
    "account": {},
    "currency": "USD",
    "amount": "string",
    "paymentProvider": {
      "name": "string"
    },
    "allowedPaymentProviderType": [
      1
    ],
    "auth": {},
    "authorization": "string",
    "authorizationStatus": 1.1,
    "authorizationStatusMessage": "string",
    "pending": "string",
    "paid": "string",
    "refunded": "string",
    "reversed": "string",
    "balance": "string",
    "createdAt": 1,
    "updatedAt": 1,
    "recordVersion": 1.1,
    "paymentFlow": 1.1
  },
  "currency": "USD",
  "amount": "string",
  "pending": "string",
  "paid": "string",
  "refunded": "string",
  "reversed": "string",
  "balance": "string",
  "paymentProviderTransaction": {},
  "status": 0,
  "statusMessage": "string",
  "ip": "string",
  "createdAt": 1,
  "processedAt": 1,
  "completedAt": 1,
  "updatedAt": 1,
  "merchantReference": "string",
  "recordVersion": 1.1,
  "transaction": {
    "amount": "10.00",
    "automaticRepresentment": false,
    "balance": "0.00",
    "completedAt": 1555630141790,
    "createdAt": 1555630141790,
    "currency": "USD",
    "instantPayoutSettle": true,
    "ip": "73.93.152.163",
    "merchantReference": "79f1b805-55ba-44f0-9460-f6ce3f1208b8",
    "originalTransactionId": "1002580075",
    "paid": "0.00",
    "payment": {
      "account": {
        "accountNumber": "6576",
        "name": "Demo Checking Account",
        "profile": 1,
        "source": 1,
        "token": "K0B1N06576",
        "type": -1,
        "verification": {
          "hasEnoughFunds": false,
          "type": 2,
          "verificationDate": 1619045543,
          "verified": false
        },
        "verified": false
      },
      "allowedPaymentProviderType": [
        1,
        2
      ],
      "amount": "25.00",
      "auth": {
        "message": "Authorized",
        "status": 2,
        "token": "1N3Q51FJNN4"
      },
      "authorization": "1N3Q51FJNN4",
      "authorizationStatus": 2,
      "authorizationStatusMessage": "Authorized",
      "balance": "9.00",
      "cancelUrl": "https://yourdomain.com/cancel?",
      "createdAt": 1555629937051,
      "currency": "USD",
      "description": "Order",
      "fingerprint": "iSnTsj6TTOmPjqN5kE44aMkGqvk=",
      "merchant": {
        "merchantId": "1002463580"
      },
      "merchantId": "1002463580",
      "merchantReference": "123123",
      "notificationUrl": "http://yourdomain.com/notification?",
      "paid": "10.00",
      "paymentFlow": 68,
      "paymentId": "1002580073",
      "paymentProvider": {
        "instantPayoutAvailable": false,
        "name": "Demo Bank",
        "paymentProviderId": "200005501",
        "type": 1
      },
      "paymentType": 2,
      "pending": "10.00",
      "recordVersion": 10,
      "refunded": "1.00",
      "returnUrl": "https://yourdomain.com/return?",
      "reversed": "0.00",
      "updatedAt": 1555630141788,
      "verification": {
        "mode": 3,
        "status": 3,
        "verifyCustomer": false
      }
    },
    "paymentProviderTransaction": {
      "paymentProcessor": {
        "paymentProcessorId": "100000001"
      },
      "paymentProviderTransactionId": "ptx-M17zSYl0YI7lzHC02tsFnF9g-sbx",
      "status": "10",
      "statusMessage": "Established"
    },
    "pending": "10.00",
    "ppTrxId": "ptx-M17zSYl0YI7lzHC02tsFnF9g-sbx",
    "processedAt": 1555630141790,
    "recordVersion": 1,
    "refunded": "0.00",
    "reversed": "0.00",
    "status": 1,
    "statusCode": "SW010",
    "statusMessage": "Pending",
    "transactionId": "1002580155",
    "transactionType": 3,
    "updatedAt": 1555630141790
  }
}
```

**SDK Code**

```python Example
import requests

url = "https://sandbox.trustly.one/api/v1/transactions/transactionId/capture"

payload = ""
headers = {
    "Content-Type": "application/x-www-form-urlencoded"
}

response = requests.post(url, data=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Example
const url = 'https://sandbox.trustly.one/api/v1/transactions/transactionId/capture';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  body: new URLSearchParams('')
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox.trustly.one/api/v1/transactions/transactionId/capture"

	req, _ := http.NewRequest("POST", url, nil)

	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example
require 'uri'
require 'net/http'

url = URI("https://sandbox.trustly.one/api/v1/transactions/transactionId/capture")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/x-www-form-urlencoded'

response = http.request(request)
puts response.read_body
```

```java Example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox.trustly.one/api/v1/transactions/transactionId/capture")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/x-www-form-urlencoded")
  .asString();
```

```php Example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox.trustly.one/api/v1/transactions/transactionId/capture', [
  'form_params' => null,
  'headers' => [
    'Content-Type' => 'application/x-www-form-urlencoded',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Example
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://sandbox.trustly.one/api/v1/transactions/transactionId/capture");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
IRestResponse response = client.Execute(request);
```

```swift Example
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/x-www-form-urlencoded"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.trustly.one/api/v1/transactions/transactionId/capture")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Remittance Metadata Data

**Request**

```json
{
  "merchantReference": "597E61428FCAED21",
  "amount": "1.00",
  "splitToken": "string",
  "metadata.remittance.withdrawalMethod": "DebitCard"
}
```

**Response**

```json
{
  "transactionId": "string",
  "transactionType": 0,
  "payment": {
    "paymentId": "string",
    "paymentType": 1,
    "merchant": {},
    "merchantReference": "string",
    "merchantId": "string",
    "fingerprint": "string",
    "verification": {},
    "account": {},
    "currency": "USD",
    "amount": "string",
    "paymentProvider": {
      "name": "string"
    },
    "allowedPaymentProviderType": [
      1
    ],
    "auth": {},
    "authorization": "string",
    "authorizationStatus": 1.1,
    "authorizationStatusMessage": "string",
    "pending": "string",
    "paid": "string",
    "refunded": "string",
    "reversed": "string",
    "balance": "string",
    "createdAt": 1,
    "updatedAt": 1,
    "recordVersion": 1.1,
    "paymentFlow": 1.1
  },
  "currency": "USD",
  "amount": "string",
  "pending": "string",
  "paid": "string",
  "refunded": "string",
  "reversed": "string",
  "balance": "string",
  "paymentProviderTransaction": {},
  "status": 0,
  "statusMessage": "string",
  "ip": "string",
  "createdAt": 1,
  "processedAt": 1,
  "completedAt": 1,
  "updatedAt": 1,
  "merchantReference": "string",
  "recordVersion": 1.1,
  "transaction": {
    "amount": "10.00",
    "automaticRepresentment": false,
    "balance": "0.00",
    "completedAt": 1555630141790,
    "createdAt": 1555630141790,
    "currency": "USD",
    "instantPayoutSettle": true,
    "ip": "73.93.152.163",
    "merchantReference": "79f1b805-55ba-44f0-9460-f6ce3f1208b8",
    "originalTransactionId": "1002580075",
    "paid": "0.00",
    "payment": {
      "account": {
        "accountNumber": "6576",
        "name": "Demo Checking Account",
        "profile": 1,
        "source": 1,
        "token": "K0B1N06576",
        "type": -1,
        "verification": {
          "hasEnoughFunds": false,
          "type": 2,
          "verificationDate": 1619045543,
          "verified": false
        },
        "verified": false
      },
      "allowedPaymentProviderType": [
        1,
        2
      ],
      "amount": "25.00",
      "auth": {
        "message": "Authorized",
        "status": 2,
        "token": "1N3Q51FJNN4"
      },
      "authorization": "1N3Q51FJNN4",
      "authorizationStatus": 2,
      "authorizationStatusMessage": "Authorized",
      "balance": "9.00",
      "cancelUrl": "https://yourdomain.com/cancel?",
      "createdAt": 1555629937051,
      "currency": "USD",
      "description": "Order",
      "fingerprint": "iSnTsj6TTOmPjqN5kE44aMkGqvk=",
      "merchant": {
        "merchantId": "1002463580"
      },
      "merchantId": "1002463580",
      "merchantReference": "123123",
      "notificationUrl": "http://yourdomain.com/notification?",
      "paid": "10.00",
      "paymentFlow": 68,
      "paymentId": "1002580073",
      "paymentProvider": {
        "instantPayoutAvailable": false,
        "name": "Demo Bank",
        "paymentProviderId": "200005501",
        "type": 1
      },
      "paymentType": 2,
      "pending": "10.00",
      "recordVersion": 10,
      "refunded": "1.00",
      "returnUrl": "https://yourdomain.com/return?",
      "reversed": "0.00",
      "updatedAt": 1555630141788,
      "verification": {
        "mode": 3,
        "status": 3,
        "verifyCustomer": false
      }
    },
    "paymentProviderTransaction": {
      "paymentProcessor": {
        "paymentProcessorId": "100000001"
      },
      "paymentProviderTransactionId": "ptx-M17zSYl0YI7lzHC02tsFnF9g-sbx",
      "status": "10",
      "statusMessage": "Established"
    },
    "pending": "10.00",
    "ppTrxId": "ptx-M17zSYl0YI7lzHC02tsFnF9g-sbx",
    "processedAt": 1555630141790,
    "recordVersion": 1,
    "refunded": "0.00",
    "reversed": "0.00",
    "status": 1,
    "statusCode": "SW010",
    "statusMessage": "Pending",
    "transactionId": "1002580155",
    "transactionType": 3,
    "updatedAt": 1555630141790
  }
}
```

**SDK Code**

```python Remittance Metadata Data
import requests

url = "https://sandbox.trustly.one/api/v1/transactions/transactionId/capture"

payload = ""
headers = {
    "Content-Type": "application/x-www-form-urlencoded"
}

response = requests.post(url, data=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Remittance Metadata Data
const url = 'https://sandbox.trustly.one/api/v1/transactions/transactionId/capture';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  body: new URLSearchParams('')
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Remittance Metadata Data
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox.trustly.one/api/v1/transactions/transactionId/capture"

	req, _ := http.NewRequest("POST", url, nil)

	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Remittance Metadata Data
require 'uri'
require 'net/http'

url = URI("https://sandbox.trustly.one/api/v1/transactions/transactionId/capture")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/x-www-form-urlencoded'

response = http.request(request)
puts response.read_body
```

```java Remittance Metadata Data
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox.trustly.one/api/v1/transactions/transactionId/capture")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/x-www-form-urlencoded")
  .asString();
```

```php Remittance Metadata Data
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox.trustly.one/api/v1/transactions/transactionId/capture', [
  'form_params' => null,
  'headers' => [
    'Content-Type' => 'application/x-www-form-urlencoded',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Remittance Metadata Data
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://sandbox.trustly.one/api/v1/transactions/transactionId/capture");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
IRestResponse response = client.Execute(request);
```

```swift Remittance Metadata Data
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/x-www-form-urlencoded"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.trustly.one/api/v1/transactions/transactionId/capture")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Money Transfer

**Request**

```json
{
  "merchantReference": "607E61428FCAED32",
  "amount": "200.00",
  "splitToken": "string",
  "beneficiaryAccount.accountNumber": "762011623852957",
  "beneficiaryAccount.paymentProvider.name": "UBS Switzerland",
  "beneficiaryAccount.paymentProvider.swift": "UBSWCHZH80A",
  "beneficiaryAccount.paymentProvider.country": "CH",
  "beneficiary.address.address1": "Untere Bahnhofstrasse 90",
  "beneficiary.address.city": "Castiel",
  "beneficiary.address.state": "Graubünden",
  "beneficiary.address.zip": "7027",
  "beneficiary.address.country": "CH"
}
```

**Response**

```json
{
  "transactionId": "string",
  "transactionType": 0,
  "payment": {
    "paymentId": "string",
    "paymentType": 1,
    "merchant": {},
    "merchantReference": "string",
    "merchantId": "string",
    "fingerprint": "string",
    "verification": {},
    "account": {},
    "currency": "USD",
    "amount": "string",
    "paymentProvider": {
      "name": "string"
    },
    "allowedPaymentProviderType": [
      1
    ],
    "auth": {},
    "authorization": "string",
    "authorizationStatus": 1.1,
    "authorizationStatusMessage": "string",
    "pending": "string",
    "paid": "string",
    "refunded": "string",
    "reversed": "string",
    "balance": "string",
    "createdAt": 1,
    "updatedAt": 1,
    "recordVersion": 1.1,
    "paymentFlow": 1.1
  },
  "currency": "USD",
  "amount": "string",
  "pending": "string",
  "paid": "string",
  "refunded": "string",
  "reversed": "string",
  "balance": "string",
  "paymentProviderTransaction": {},
  "status": 0,
  "statusMessage": "string",
  "ip": "string",
  "createdAt": 1,
  "processedAt": 1,
  "completedAt": 1,
  "updatedAt": 1,
  "merchantReference": "string",
  "recordVersion": 1.1,
  "transaction": {
    "amount": "10.00",
    "automaticRepresentment": false,
    "balance": "0.00",
    "completedAt": 1555630141790,
    "createdAt": 1555630141790,
    "currency": "USD",
    "instantPayoutSettle": true,
    "ip": "73.93.152.163",
    "merchantReference": "79f1b805-55ba-44f0-9460-f6ce3f1208b8",
    "originalTransactionId": "1002580075",
    "paid": "0.00",
    "payment": {
      "account": {
        "accountNumber": "6576",
        "name": "Demo Checking Account",
        "profile": 1,
        "source": 1,
        "token": "K0B1N06576",
        "type": -1,
        "verification": {
          "hasEnoughFunds": false,
          "type": 2,
          "verificationDate": 1619045543,
          "verified": false
        },
        "verified": false
      },
      "allowedPaymentProviderType": [
        1,
        2
      ],
      "amount": "25.00",
      "auth": {
        "message": "Authorized",
        "status": 2,
        "token": "1N3Q51FJNN4"
      },
      "authorization": "1N3Q51FJNN4",
      "authorizationStatus": 2,
      "authorizationStatusMessage": "Authorized",
      "balance": "9.00",
      "cancelUrl": "https://yourdomain.com/cancel?",
      "createdAt": 1555629937051,
      "currency": "USD",
      "description": "Order",
      "fingerprint": "iSnTsj6TTOmPjqN5kE44aMkGqvk=",
      "merchant": {
        "merchantId": "1002463580"
      },
      "merchantId": "1002463580",
      "merchantReference": "123123",
      "notificationUrl": "http://yourdomain.com/notification?",
      "paid": "10.00",
      "paymentFlow": 68,
      "paymentId": "1002580073",
      "paymentProvider": {
        "instantPayoutAvailable": false,
        "name": "Demo Bank",
        "paymentProviderId": "200005501",
        "type": 1
      },
      "paymentType": 2,
      "pending": "10.00",
      "recordVersion": 10,
      "refunded": "1.00",
      "returnUrl": "https://yourdomain.com/return?",
      "reversed": "0.00",
      "updatedAt": 1555630141788,
      "verification": {
        "mode": 3,
        "status": 3,
        "verifyCustomer": false
      }
    },
    "paymentProviderTransaction": {
      "paymentProcessor": {
        "paymentProcessorId": "100000001"
      },
      "paymentProviderTransactionId": "ptx-M17zSYl0YI7lzHC02tsFnF9g-sbx",
      "status": "10",
      "statusMessage": "Established"
    },
    "pending": "10.00",
    "ppTrxId": "ptx-M17zSYl0YI7lzHC02tsFnF9g-sbx",
    "processedAt": 1555630141790,
    "recordVersion": 1,
    "refunded": "0.00",
    "reversed": "0.00",
    "status": 1,
    "statusCode": "SW010",
    "statusMessage": "Pending",
    "transactionId": "1002580155",
    "transactionType": 3,
    "updatedAt": 1555630141790
  }
}
```

**SDK Code**

```python Money Transfer
import requests

url = "https://sandbox.trustly.one/api/v1/transactions/transactionId/capture"

payload = ""
headers = {
    "Content-Type": "application/x-www-form-urlencoded"
}

response = requests.post(url, data=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Money Transfer
const url = 'https://sandbox.trustly.one/api/v1/transactions/transactionId/capture';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  body: new URLSearchParams('')
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Money Transfer
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox.trustly.one/api/v1/transactions/transactionId/capture"

	req, _ := http.NewRequest("POST", url, nil)

	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Money Transfer
require 'uri'
require 'net/http'

url = URI("https://sandbox.trustly.one/api/v1/transactions/transactionId/capture")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/x-www-form-urlencoded'

response = http.request(request)
puts response.read_body
```

```java Money Transfer
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox.trustly.one/api/v1/transactions/transactionId/capture")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/x-www-form-urlencoded")
  .asString();
```

```php Money Transfer
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox.trustly.one/api/v1/transactions/transactionId/capture', [
  'form_params' => null,
  'headers' => [
    'Content-Type' => 'application/x-www-form-urlencoded',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Money Transfer
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://sandbox.trustly.one/api/v1/transactions/transactionId/capture");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
IRestResponse response = client.Execute(request);
```

```swift Money Transfer
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/x-www-form-urlencoded"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.trustly.one/api/v1/transactions/transactionId/capture")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```