Adyen API Library for ruby
Use Adyen MarketPay to power your marketplace with onboarding, payment processing, and payouts.
Adyen MarketPay is an end-to-end payment solution for platforms and marketplaces. MarketPay's extensive API powers many types of platforms, such as crowdfunding platforms, peer-to-peer marketplaces, and on-demand services.
MarketPay enables you to onboard sellers, service providers or contractors as sub-merchants and accept payments on their behalf. You can also split payments, transfer funds, and pay out to sub-merchants.
From a technical perspective, MarketPay is broken down into 3 separate services:
MarketPay is authenticated via webservice username and password.
adyen.ws_user = "ws@Company.TestCompany"
adyen.ws_passord = "super_secure_password123"
The Account service is used for onboarding and KYC for people on both sides of your marketplace.
To create an account holder, use the create_account_holder method:
response = adyen.marketpay.account('{
"accountHolderCode":"GENERATE_CODE", // Your unique ID
"accountHolderDetails":{
"email":"tim@green.com",
"individualDetails":{
"name":{
"firstName":"Tim",
"gender": "MALE",
"lastName":"Green"
}
}
},
"legalEntity":"Individual"
}')
To enable payouts to an account, send required KYC information and docuemnts to the update_account_holder and upload_documents methods. Required KYC can be found in our docs here.
You can disable / delete account holders in the same way.
The MarketPay Funding API provides endpoints for managing the funds in MarketPay accounts. These management operations include actions such as the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account.
For further information on MarketPay fund management, please visit the MarketPay documentation.
The Adyen MarketPay system can send you notifications for a set of events during the flow, such as creating new accounts or account holders, performing KYC checks, making payouts, and so on.
These notifications are sent as webhooks to the corresponding URLs configured on your server. Refer to the Configure notifications section to learn how you can set up and test MarketPay notifications, and to Receive notifications to explore notification types and see the examples.