Skip to main content

Endpoint

  • Method: POST
  • URL: {{LIQUIDITY_URL}}/v1/ext/application-token/:token/linked-accounts/:currency/link/paypal/:step
  • Auth: Bearer {{accessToken}}

Path Parameters

ParameterTypeDescriptionRequired
tokenstringApplication token from payout/account widgetYes
currencystringCurrency code (e.g., USD)Yes
stepstringUsually 1Yes

Request Body

FieldTypeDescriptionRequired
labelstringDisplay name for the accountYes
data.firstNamestringRecipient first nameYes
data.lastNamestringRecipient last nameYes
data.namestringBusiness/account nameYes
data.paypalDestinationTypestringDestination type, e.g., EMAILYes
data.recipientTypestringRecipient type: personal or businessYes
data.usernamestringPayPal username/emailYes
data.recipientAddressstringAddress lineYes
data.recipientCitystringCityYes
data.recipientStatestringState/regionYes
data.recipientPostalCodestringZIP/postal codeYes
data.emailstringEmail for contact/notificationsYes

Request

curl -X POST "{{LIQUIDITY_URL}}/v1/ext/application-token/{{token}}/linked-accounts/USD/link/paypal/1" \
  -H "Authorization: Bearer {{accessToken}}" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "PayPal",
    "data": {
      "firstName": "Timilehin",
      "lastName": "Makinde",
      "name": "Quantum Works LLC",
      "paypalDestinationType": "EMAIL",
      "recipientType": "personal",
      "username": "timi@gradientfi.com",
      "recipientAddress": "recipientAddress",
      "recipientCity": "recipientCity",
      "recipientState": "Alabama",
      "recipientPostalCode": "30301-4321",
      "email": "timi@gradientfi.com"
    }
  }'

Response (200)

{
  "data": {
    "type": "completed",
    "message": "Account successfully linked!",
    "data": {
      "id": "49e7c0c3-37a3-4a3c-9511-c9d5fb12b880",
      "currency": "USD",
      "optionType": "paypal",
      "counterPartyName": "Tom Smith Mo",
      "wallet": {
        "id": "3eb8d02c-30e0-497c-a6ac-e2d203c63198",
        "balance": "99440.48",
        "disabled": false
      },
      "entity": {
        "id": "d5e6f1dd-57bc-4581-98e8-646264a5f2c9",
        "entityType": "BUSINESS"
      }
    }
  }
}

Response Fields

FieldTypeDescription
data.data.idstringLinked account ID (use for withdrawals)
data.data.currencystringCurrency of the linked account
data.data.optionTypestringAccount type: paypal
data.data.counterPartyNamestringPayPal username/email
data.data.wallet.idstringAssociated wallet ID
data.data.wallet.balancestringCurrent wallet balance
data.data.entity.idstringEntity ID associated with the account
data.data.entity.entityTypestringEntity type: USER or BUSINESS

Notes

  • paypalDestinationType currently uses EMAIL
  • Store the id from the response for withdrawal requests