Build a platform
This guide will step you through creating a basic workflow for a marketplace using Assembly’s express workflow.
Tools for testing the API
We recommend the following application to test our services with. The following guide will use these tools as an example, though you can use any other tools you are familiar with.
For testing API calls:
-
Postman: You can get the latest Postman here. After installing Postman, simply Import and then you can use the Link option and provide the link to our collections which are hosted here: Assembly API Postman Collection. Alternatively you could go to the link and get the raw text and choose to import using raw text
For testing callbacks:
- RequestBin
- Runscope
The Assembly lingo
Before you create your first transaction with Assembly, there are a few terms that you should be familiar with:
- Buyers are users who pay for things on your platform.
- Sellers are users who receive money from your platform.
- Platform refers to you as a customer, or your marketplace.
- Items are records of a transaction between a buyer, a seller and the platform. These represent what the buyer is paying for, such as your product or service.
- Fees are applied to Items, and this is how you charge your buyers or sellers for using your platform.
Getting ready
Platform details
Now that you’re familiar with the basics, let’s do some setup to make things easier later on.
-
To obtain a Prelive account, contact Sales so we can assess your needs and help set you up accordingly.
-
After being set up please sign into your Prelive account and locate your API keys under the Platform Profile page .
Setting up your first transaction
- Create a buyer
- Add a credit card to the buyer. Remember to use the Test data.
- Create a seller
- Add a bank account to the seller
- Set seller disbursement account
- Create a fee and set it to the seller
Creating your first transaction
Now that your platform is setup and you have all the pieces you need to create a transaction with Assembly, let’s get started.
To create a transaction between your Buyer and Seller, you will need to create an Item. To do this run the following:
- List users to find the ID of your buyer and seller. Note the user IDs.
- List fees to find the fee to assign to the transaction. Note the fee ID.
- Create an item and associate it with the user IDs and fee ID you just noted. For this example, set payment_type to "2" (express).
The create item above will have resulted in an item being created with a state of pending.
Now that you’ve got an Item created, you will want to take payment from the Buyer:
- Make payment. In the API response, the item assumes a completed state as the funds would move directly from the Buyer to the Seller.
To check that payment was made on the Item from your Buyer:
- Show Item . In the API response, the item assumes a completed state.
Once funds have been moved to the Seller, they will be released to the Seller’s bank account. To be notified when this has occurred, you can create a callback form the Item.
- Create a callback with object type being “items”.
You’ve now completed your first transaction with Assembly, well done!
Build out a specific workflow
For further information on building out specific workflows with Assembly, our payment workflows page is a great starting point.
Updated about 3 years ago