---
title: "Create Transactions"
method: POST
path: "/withdraw/transaction"
tags: ["withdraw"]
---

# Create Transactions

`POST /withdraw/transaction`

Creates the transaction to be signed by the user and sent to the blockchain.

## Headers

- `x-coinflow-auth-wallet` string, required

## Request body

- GetWithdrawTransactionRequestBody
  - `amount` number, double, required
  - `merchantId` string, required
  - `speed` 'asap' | 'same_day' | 'standard' | 'card' | 'iban' | 'pix' | 'eft' | 'venmo' | 'paypal' | 'wire' | 'interac' | 'swift', required
  - `account` union, required — One of: 1. The token of the bank account/card that the user is withdrawing to 2. An Apple Pay Response Object
    - string
    - ApplePayPayment — Apple Pay Payment received from the Apple Pay SDK Details can be found here: https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypayment
      - `token` ApplePayPaymentToken, required
        - `transactionIdentifier` string, required — A unique identifier for this payment.
        - `paymentMethod` ApplePayPaymentTokenPaymentMethod, required — Information about the card used in the transaction.
          - `type` '' | 'debit' | 'credit' | 'prepaid' | 'store' — A value representing the card's type of payment. Optional: Apple omits this field (or sends an empty string) for cards it does not classify, including some Amex corporate/commercial cards. Treat a missing value as unknown rather than assuming a funding type.
          - `network` union, required — A string, suitable for display, that is the name of the payment network backing the card.
            - string
            - 'Visa'
          - `displayName` string, required — A string, suitable for display, that describes the card.
        - `paymentData` ApplePayPaymentTokenPaymentData, required — An object containing the encrypted payment data.
          - `version` string, required
          - `header` ApplePayPaymentTokenPaymentDataHeader, required
            - `transactionId` string, required
            - `ephemeralPublicKey` string, required
            - `publicKeyHash` string, required
          - `signature` string, required
          - `data` string, required
      - `billingContact` ApplePayBillingContact, required
        - `givenName` string, required — The contact's given name.
        - `familyName` string, required — The contact's family name.
        - `addressLines` string[], required — The street portion of the address for the contact.
        - `locality` string, required — The city for the contact.
        - `country` string — The name of the country for the contact.
        - `emailAddress` string — An email address for the contact.
        - `postalCode` string — The zip code or postal code, where applicable, for the contact.
        - `administrativeArea` string — The state for the contact.
        - `subAdministrativeArea` string — The subadministrative area (such as a county or other region) in a postal address.
        - `countryCode` string — The contact’s two-letter ISO 3166 country code.
      - `shippingContact` PickApplePayJSApplePayPaymentContactEmailAddress — From T, pick a set of properties whose keys are in the union K
        - `emailAddress` string — An email address for the contact.
      - `decrypted` DecryptedApplePayToken
        - `applicationPrimaryAccountNumber` string, required
        - `applicationExpirationDate` string, required
        - `currencyCode` string, required
        - `transactionAmount` number, double, required
        - `deviceManufacturerIdentifier` string, required
        - `paymentDataType` string, required
        - `paymentData` PaymentData, required
          - `onlinePaymentCryptogram` string, required
          - `eciIndicator` string
  - `token` PickWithdrawTokenMintOrDecimals — From T, pick a set of properties whose keys are in the union K
    - `mint` string, required — The mint is the address of the token on the blockchain. On Solana this is the mint account ID On EVM chains this is the token contract address.
    - `decimals` number, double, required — The number of decimals that the token has. For example USDC is always 6 decimals, so 1 USDC is 1000000 units. SOL - 9 decimals WETH - 18 decimals.
  - `evmTransferAuthorizationData` EvmTransferAuthorizationData
    - `data` string, required — The result of the signedTypedData call from the user's wallet.
  - `bankAccountDetails` BankAccountConfirmationDetails
    - `accountNumber` string
    - `wireRoutingNumber` string
  - `address` AddressOptionalState
    - `address1` string, required
    - `address2` string
    - `city` string, required
    - `state` string
    - `zip` string, required
    - `country` string, required
  - `userLocation` IUserLocation — End-user geographic coordinates captured at the moment of the withdrawal request. Consumed by `BlockingRuleMethod.GEOLOCATION` enforcement. Replay-of-different-coords bypass is prevented server-side: the first resolved {country, state} for a given (merchant, user) pair is pinned in Redis, and subsequent requests are evaluated against that pinned value regardless of the lat/lng they submit.
    - `lat` number, double, required
    - `lng` number, double, required
  - `minUsdc` Cents
    - `cents` integer, required
  - `ownerOverride` string — For Solana currency token transactions, the public key of the wallet owner that will sign the transaction. This will replace the public key associated with the user wallet.

## Response `200`

Ok

- GetWithdrawTransactionResponse
  - `transactions` string[], required — The transactions to be signed by the user and sent to the blockchain. Solana - Transactions are base58 encoded. You can reconstruct them by calling `Transaction.from(base58.decode(transaction))` Evm - Transactions are JSON stringified. You can reconstruct them by calling `JSON.parse(transaction)`

## Other responses

- `412` — User Address Info Required - Please provide address info in body.address parameters
- `451` — User Must Complete Additional Verification

---

[API](https://skmtc.net/coinflow/apis/api-reference.md) · [All operations](https://skmtc.net/coinflow/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coinflow/api-reference/versions/3f6a046fbb34/schema)
