A Single Payment is a transaction where a customer's funds are processed and sent directly to the Main Account holder.
This payment type is primarily used by non-marketplace businesses that do not have Sub-Accounts. However, it can also be a convenient option for marketplace businesses that want to collect all funds centrally before distributing them to their Sub-Accounts at a later date.
For more information about Single Payments, please refer to this page.
Let's consider a bike shope (Main Account) selling various cycling accessories through their online store. A customer places an order for the following items:
| Quantity | Item Name | Item Price |
|---|---|---|
| 1 | Cycling Helmet | £55.00 |
| 2 | Water Bottle | £15.00 |
| 1 | Bike Lock | £30.00 |
| Total | £100.00 |
In this scenario, the Main Account processes the payment for the entire order amount of £100.00. The funds are collected directly into the Main Account holder's account without involving any Sub-Accounts.
The following is the minimum structure when creating a Payment Session for a Single Payment using the paymentSessionCreate endpoint.
Example Request:
{
"amount": 10000, // Amount in minor units (e.g., 10000 = £100.00)
"currency": "GBP",
"customerEmail": "test@mail.com"
}The example above illustrates the three mandatory fields required to create a Payment Session with the minimum valid payload:
amount: The transaction amount paid by the customer, defined in minor units;currency: The ISO 4217 currency code (e.g. GBP);customerEmail: The customer’s email address. While we recommend including this when the customer is logged in or using your checkout page, it can also be provided at the point of payment attempt. Alternatively, if acustomerIdis supplied, the email address associated with that customer will be used instead and thereforecustomerEmailmay be omitted.
The API will return a payload containing various details. Among these, the most important field is the clientSecret value, which will be required to process the payment.
All payments processed via the Single Payment model are visible on the Payments page of the Ryft Portal for Main Account holders.