Create eWallet

As a platform, you can create an eWallet for yourself or your platform's vendors.

An eWallet can be created in 3 different ways

  • Automatically by accepting a payment via the Platform Portal.
  • Via API (Server-to-Server call).
  • Automatically in the first Payin of a new currency.

An eWallet Object will be created automatically for your vendors by UNIPaaS in the first Payin transaction (per vendor per currency) to keep your integration simple.

📘

We recommend you let UNIPaaS manage the eWallet creation automatically, but if you want to bring more control and flexibility into your system, you can use the below methods.

Create Platform eWallet

As a platform, you can create an eWallet for yourself.

Make a POST /ewallets request to create a new eWallet:

curl --request POST \
  --url 'https://sandbox.unipaas.com/platform/ewallets' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <PLATFORM_SECRET_KEY>' \
  --data-raw '{
    "currency": "USD",
    "name": "my usd eWallet"
   }'

In the response, you'll get the created eWallet object.

📘

eWallet.vendorId won't be defined, as this method creates a platform eWallet.

Create Platform's Vendor eWallet

As a platform, you can create an eWallet for your vendor.

Make a POST /vendors/{vendorId}/ewallets request to create a new eWallet:

curl --request POST \
  --url 'https://sandbox.unipaas.com/platform/vendors/{vendorId}/ewallets' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <PLATFORM_SECRET_KEY>' \
  --data-raw '{
    "currency": "USD",
    "name": "my vendor\'s usd eWallet"
   }'

In the response you'll get the created vendor eWallet object.

📘

eWallet.vendorId will be defined, as this method creates a platform's vendor eWallet.