sFOX API
Sign InOpen Account
Connect API
Connect API
  • Introduction
    • Welcome
    • Getting Started
    • Resources
      • Terminology
      • Systems & Operations
      • Integration Options
    • Guides
      • End User Onboarding & KYC
        • Individuals
        • Businesses
        • Enhanced Due Diligence
  • REST API
    • REST Endpoints
    • Authentication
    • End Users
      • Create End User Account
      • Request Verification Code
      • Confirm Verification Code
      • Create User Auth Token(s)
      • Get End User(s)
      • Get EDD Requests
      • Get EDD Prompts
      • Create EDD Responses
        • Uploading Files as Responses
      • Submit Documents
      • Deactivate User
    • Payments
      • Create Bank Account (Plaid)
      • Create Bank Account
      • Get Bank Account
      • Get Plaid Processors
      • Amend Plaid Processors
      • Verify Bank Account
      • Delete Bank Account
      • Get Wire Instructions
      • Get ACH Agreement Status
      • Request ACH Onboarding
      • Get ACH Deposit Limit
    • Withdrawals
      • Confirm Withdrawal
      • Resend Confirmation Code
      • Cancel Withdrawal
    • Transfers
      • Create Transfer
      • Confirm Transfer
      • Resend Confirmation Code
      • Cancel Transfer
      • Get Transfer Permissions
      • Get Transfer History
    • Monetization
      • Create Setting
      • Update Setting
      • Delete Setting
      • Get Settings
      • Get Permissions
      • Get Monetization History
  • WebSocket API
    • Connecting
    • Authentication
    • Subscribing & Unsubscribing
    • Message Format
    • End Users
      • Onboarding
      • Balances
      • Orders
      • Trades
    • Market Data
      • Order Book
      • Trades
      • Ticker
  • Single Sign-On
    • Overview
      • IdP Initiated SSO
    • IdP Data
    • SAML Response Data
  • Errors
    • Error Codes
Powered by GitBook
  1. REST API
  2. Transfers

Create Transfer

POST https://api.sfox.com/v1/enterprise/transfer

Transfer funds between your master account and an end user account with Payment (user -> master account) or Payout (master account -> user) transfers.

  • Payment transfers will be created in a pending state until verified by the end user.

  • Payout transfers will be created and processed immediately.

Body Parameters

Parameter
Type
Description

transfer_id required

string

Partner generated transfer and idempotency ID

description required

string

Description/memo for the transfer

purpose required

string

Transfer purpose. Possible values:

  • GOOD

  • SERVICE

type required

string

Transfer type. Possible values:

  • PAYMENT

  • PAYOUT

user_id required

string

The unique ID of the user's account this transfer will be applied to.

currency required

string

Transfer currency e.g. ETH

quantity required

number

Transfer quantity

rate required

number

USD FX Rate of the transfer. e.g. User pays 0.1 ETH for $200 gift card then RATE = 2000

Response Body

Key
Type
Description

transfer_id

string

Partner generated transfer and idempotency ID

transfer_status_code

string

Status of the transfer

type

string

Transfer type

quantity

number

Transfer quantity

currency

string

Trasfer currency

user_id

string

The Connect user ID this transfer will apply to

rate

number

USD FX Rate of the transfer

purpose

string

Transfer purpose

description

string

Currency pair that the fee is specifed for

atx_id_charged

int

ID of the charge account transaction

atx_id_credited

int

ID of the credit account transaction

atx_status_charged

int

Status of the charge account transaction

atx_status_credited

int

Status of the credit account transaction

transfer_date

datetime

Transfer date

Responses

201 Created
{
    "data": {
        "transfer_id": "7735757c-863e-4e07-9b84-af186424ebae",
        "transfer_status_code": "PENDING",
        "type": "PAYMENT",
        "quantity": 0.1,
        "currency": "eth",
        "user_id": "ClientAccount1",
        "rate": 2000,
        "purpose": "GOOD",
        "description": "Gift card payment",
        "atx_id_charged": 1728524,
        "atx_id_credited": 1728525,
        "atx_status_charged": 1127,
        "atx_status_credited": 1127,
        "transfer_date": "2023-09-07T16:56:56.000Z"
    }
}
403 Forbidden
//You do not have permission to create transfers.
{
    "error": "Partner transfer permission not granted."
}
422 Unprocessable Entity
//Duplicate request
{
    "error": "A transaction with the same transfer_id already exists."
}

//Transfer currency is restricted for you and/or the end user
{
    "error": "Restricted currency for partner or end user."
}

//Your account and/or the user's account has insufficient balance of this currency for the transfer quantity.
{
    "error": "Insufficient funds."
}

Example Requests

curl -X POST \
  -H 'Content-type: application/json' \
  -H "Authorization: Bearer ${ENTERPRISE_API_KEY}" \
  --data '{ "transfer_id": "7735757c-863e-4e07-9b84-af186424ebae",
          "user_id": "ClientAccount1",
          "type": "PAYMENT",
          "purpose": "GOOD",
          "description": "Gift card payment",
          "currency": "eth",
          "quantity": 0.1,
          "rate": 2000 }'  \
  'https://api.sfox.com/v1/enterprise/transfer'
const axios = require('axios');

const config = {
  method: 'post',
  url: 'https://api.sfox.com/v1/enterprise/transfer',
  headers: {
    "Content-Type": "application/json",
    'Authorization': `Bearer ${process.env.ENTERPRISE_API_KEY}`
  },
  data: {
    transfer_id: '7735757c-863e-4e07-9b84-af186424ebaeE',
    user_id: 'ClientAccount1',
    type: 'PAYMENT',
    purpose: 'GOOD',
    description: 'Gift card payment',
    currency: 'eth',
    quantity: 0.1,
    rate: 2000
  }
}

axios(config)
    .then((response) => {
      console.log(response.status)
      console.log(response.data)
    })
    .catch((err) => {
      console.error(err.response.status)
      console.error(err.response.data)
    });
import requests
import os

data = requests.post(
  "https://api.sfox.com/v1/enterprise/transfer",
  headers={
    "Authorization": f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
  },
  json={
    "transfer_id": "7735757c-863e-4e07-9b84-af186424ebae",
    "user_id": "ClientAccount1",
    "type": "PAYMENT",
    "purpose": "GOOD",
    "description": "Gift card payment",
    "currency": "eth",
    "quantity": 0.1,
    "rate": 2000
  }
)
print(data.status_code)
print(data.json())
PreviousTransfersNextConfirm Transfer

Last updated 8 months ago