Instant Offramps

Using our powerful payment methods API to easily set up instant offramp solutions for you custodial or non-custodial solution.

📘

Content

  1. Swap Transfer
  2. Deposit External Funds
  3. Withdrawing Funds
  4. Transfer Status

1. Creating a Payment Method

Use our payment method service to tokenize the user's bank account details.

#first create processor token via plaid

curl --location --request POST 'https://sandbox.plaid.com/processor/token/create' \
--header 'Content-Type: application/json' \
--data-raw '{
    "client_id": "60f5d817da3e5300110xxxx",
    "secret": "a0adfa408349072862bbb7xxxxxx",
    "access_token": "access-sandbox-bd8a8917-84bd-4d1a-b231-671ecf3fb850",
    "account_id": "DmzZEm5kA7Hl3yepvXN4hQ4lj6yrGXhXVPNKk",
    "processor": "wyre"
  }'
  
  #response:
  {
    "processor_token": "processor-sandbox-d502dcc2-a38b-4492-ae0a-2b1df781197c",
    "request_id": "GssgMK1wnpPBeiK"
}

#Take the processor token from the response and send it to create payment method API
#masquerading as the User

curl --location --request POST 'https://api.testwyre.com/v2/paymentMethods?masqueradeAs=user:US_39CUCTGTVBB' \
--header 'Authorization: Bearer SK-86Z8FYFB-UTA2RDCN-HCZBFT2V-XXX' \
--header 'Content-Type: application/json' \
--data-raw '{
     "plaidProcessorToken": "processor-sandbox-d502dcc2-a38b-4492-ae0a-2b1df781197c",
     "paymentMethodType": "LOCAL_TRANSFER",
     "country": "US"
}'

#response:
{
    "id": "PA_DZ9WJXQEPXB",
    "owner": "user:US_39CUCTGTVBB",
    "createdAt": 1648364651822,
    "name": "Plaid Checking 0000",
    "defaultCurrency": "USD",
    "fingerprint": "EH6HMC/UfK+45MdA9s+RlVE3mzbROARQiT5KGh26c94=",
    "status": "PENDING",
    "statusMessage": null,
    "waitingPrompts": [],
    "linkType": "LOCAL_TRANSFER",
    "beneficiaryType": "UNKNOWN",
    "supportsDeposit": true,
    "nameOnMethod": null,
    "last4Digits": "0000",
    "brand": null,
    "expirationDisplay": null,
    "countryCode": "US",
    "nickname": null,
    "rejectionMessage": null,
    "disabled": false,
    "supportsPayment": true,
    "chargeableCurrencies": [
        "USD"
    ],
    "depositableCurrencies": [
        "USD"
    ],
    "chargeFeeSchedule": null,
    "depositFeeSchedule": null,
    "minCharge": null,
    "maxCharge": null,
    "minDeposit": null,
    "maxDeposit": null,
    "documents": [],
    "blockchains": {},
    "liquidationBalances": {},
    "srn": "paymentmethod:PA_DZ9WJXQEPXB"
}

Alternative to Plaid, you can connect a bank account by passing in bank and beneficiary information.

## leave paymentMethodType as INTERNATIONAL_TRANSFER regardless of users location
curl --location --request POST 'https://api.testwyre.com/v2/paymentMethods?masqueradeAs=user:US_39CUCTGTVBB' \
--header 'Authorization: Bearer SK-86Z8FYFB-UTA2RDCN-HCZBFT2V-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
     "paymentMethodType": "INTERNATIONAL_TRANSFER", 
     "paymentType": "LOCAL_BANK_WIRE",
     "currency": "USD",
     "country": "US",
     "beneficiaryType": "INDIVIDUAL",
     "firstNameOnAccount": "Alberta",
     "lastNameOnAccount": "Charleson",
     "beneficiaryAddress": "2992 Cameron Road",
     "beneficiaryAddress2": "",
     "beneficiaryCity": "Malakoff",
     "beneficiaryPostal": "14236",
     "beneficiaryPhoneNumber": "+15555555555",
     "beneficaryState": "NY",
     "beneficiaryDobDay": 2,
     "beneficiaryDobMonth": 12,
     "beneficiaryDobYear": 1990,
     "accountNumber": "1234567890123",
     "routingNumber": "123412312",
     "accountType": "CHECKING",
     "chargeablePM": true
}'

#response:
{
    "id": "PA_PTXN82CCWRH",
    "owner": "user:US_39CUCTGTVBB",
    "createdAt": 1648783498152,
    "name": "USD Bank account ending in 0123",
    "defaultCurrency": "USD",
    "fingerprint": "BANK-bZwB7bB30jWoskzil4q13Vd9oxqn4g3mLhdUGd+dDIA=",
    "status": "ACTIVE",
    "statusMessage": null,
    "waitingPrompts": [],
    "linkType": "INTERNATIONAL_TRANSFER",
    "beneficiaryType": "INDIVIDUAL",
    "supportsDeposit": true,
    "nameOnMethod": "Alberta Charleson",
    "last4Digits": "0123",
    "brand": null,
    "expirationDisplay": null,
    "countryCode": "US",
    "nickname": null,
    "rejectionMessage": null,
    "disabled": false,
    "supportsPayment": true,
    "chargeableCurrencies": [
        "USD"
    ],
    "depositableCurrencies": [
        "USD"
    ],
    "chargeFeeSchedule": null,
    "depositFeeSchedule": null,
    "minCharge": null,
    "maxCharge": null,
    "minDeposit": null,
    "maxDeposit": null,
    "documents": [],
    "blockchains": {},
    "liquidationBalances": {},
    "srn": "paymentmethod:PA_PTXN82CCWRH"
}

2. Attach a Blockchain Address

# request
curl --location --request POST 'https://api.testwyre.com/v2/paymentMethod/PA_PTXN82CCWRH/attach' \
--header 'Authorization: Bearer SK-86Z8FYFB-UTA2RDCN-HCZBFT2V-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "blockchain": "ETH",
    "notifyUrl": "https://requestinspector.com/p/01fzjyef5b5em6jj51dtmtwvjn"
}'




# response
{
    "id": "PA_DZ9WJXQEPXB",
    "owner": "user:US_39CUCTGTVBB",
    "createdAt": 1648364651822,
    "name": "Plaid Checking 0000",
    "defaultCurrency": "USD",
    "fingerprint": "EH6HMC/UfK+45MdA9s+RlVE3mzbROARQiT5KGh26c94=",
    "status": "PENDING",
    "statusMessage": null,
    "waitingPrompts": [],
    "linkType": "LOCAL_TRANSFER",
    "beneficiaryType": "UNKNOWN",
    "supportsDeposit": true,
    "nameOnMethod": null,
    "last4Digits": "0000",
    "brand": null,
    "expirationDisplay": null,
    "countryCode": "US",
    "nickname": null,
    "rejectionMessage": null,
    "disabled": false,
    "supportsPayment": true,
    "chargeableCurrencies": [
        "USD"
    ],
    "depositableCurrencies": [
        "USD"
    ],
    "chargeFeeSchedule": null,
    "depositFeeSchedule": null,
    "minCharge": null,
    "maxCharge": null,
    "minDeposit": null,
    "maxDeposit": null,
    "documents": [],
    "blockchains": {
     "ETH": "0x39a3130c4d27c77eb70197e14444c738ddb90182"
    },
    "liquidationBalances": {},
    "srn": "paymentmethod:PA_DZ9WJXQEPXB"
}

3. Initiate Transfer from your wallet

Initiate the transfer from your wallet, or in case of non-custodial solutions the user initiates the transfer themselves. Once the funds are received a transfer is created and event sent to your notify Url.

Destination of the transfer is the blockchain address associated with the payment method.

Any supported crypto transferred to these attached addresses that meet the minimum transfer amounts ($5) will be liquidated to the payment method.