Skip to main content

Accounts

A payment account is a way to receive payment when placing an order. You can create multiple accounts for different types of payments, such as connecting a payment system or adding cash payments.

The tools for managing accounts are located in the "Accounts" subsection under "Payments." Existing payment accounts are listed in the general list. Below is a form for creating new payment accounts.

Types of Payment Accounts

Currently, there are two types of payment accounts available in the system.

Stripe

The OneEntry Platform supports integration with the Stripe payment system. Choose this type if you want to connect the Stripe payment system to your project. More details on connecting Stripe to the OneEntry Platform can be found here.

Custom

If you want to use a different payment system or accept cash payments, use this type of payment account.

Creating a Payment Account

In the payment account creation form, specify:

  • Name - A non-unique string
  • Type - A value from the dropdown list.
  • Token - A unique string.

After filling out the form, click the "Add" button. If all fields are filled out correctly, the payment account will be created and added to the general list.

Editing a Payment Account

Select the payment account you want to edit from the list and click the edit icon Edit.

In edit mode, you can change:

  • Name
  • Type
  • Token

Changes will be saved automatically.


Custom Parameters for Payment API

For flexible integration with various payment systems (such as PayPal, Stripe, and others), you can add custom parameters specific to a particular API to the payment account.

These parameters are passed as key-value pairs when initializing a payment session. For example, the PayPal Orders API often requires fields such as purchase_units, intent, application_context.return_url, or payer.email_address, while Stripe uses different parameters, such as mode, line_items, etc.

How It Works

In addition to the basic fields (Name, Type, Token), you will see a table titled "Custom Parameters for Payment API." The table aggregates sets of attributes from the Settings module and allows you to establish a correspondence between:

  • Token (The name of the parameter in the API) (for example, purchase_units for PayPal or line_items for Stripe)
  • Value, which will be substituted when creating the payment

To set a value, you need to open the editing of the set by clicking the button Edit. Then select the necessary attribute from the pre-configured set and enter the required value according to the attribute type.

⚠️ Important: The sets of attributes and their contents are configured separately and can include fields of different types: string, number, boolean, JSON, etc.

Example of Use with PayPal Suppose you want to pass order details to PayPal through the purchase_units field. You create an attribute set named "PayPal Purchase Unit," add an attribute items of type JSON, containing a structure like this:

    {
"invoice_id": "90210",
"amount": {
"currency_code": "USD",
"value": "230.00",
"breakdown": {
"item_total": {
"currency_code": "USD",
"value": "220.00"
},
"shipping": {
"currency_code": "USD",
"value": "10.00"
}
}
},
"items": [
{
"name": "T-Shirt",
"description": "Super Fresh Shirt",
"unit_amount": {
"currency_code": "USD",
"value": "20.00"
},
"quantity": "1",
"category": "PHYSICAL_GOODS",
"sku": "sku01",
"image_url": "https://example.com/static/images/items/1/tshirt_green.jpg",
"url": "https://example.com/url-to-the-item-being-purchased-1",
"upc": {
"type": "UPC-A",
"code": "123456789012"
}
},
{
"name": "Shoes",
"description": "Running, Size 10.5",
"sku": "sku02",
"unit_amount": {
"currency_code": "USD",
"value": "100.00"
},
"quantity": "2",
"category": "PHYSICAL_GOODS",
"image_url": "https://example.com/static/images/items/1/shoes_running.jpg",
"url": "https://example.com/url-to-the-item-being-purchased-2",
"upc": {
"type": "UPC-A",
"code": "987654321012"
}
}
]
}

Then, in the payment account settings, you link:

Key: purchase_units Value: the items attribute from the "PayPal Purchase Unit" set When creating an order, the system will automatically substitute the current value of this attribute into the request body to the PayPal API.

Other commonly used PayPal parameters:

intent — for example, "CAPTURE" or "AUTHORIZE" application_context.return_url — URL to return to after successful payment application_context.cancel_url — URL to cancel the payment

This mechanism allows you to adapt payment integrations to any specific requirements of external APIs without changing the platform's code.

Hiding a Payment Account

If you no longer want to use a payment account and cannot delete it because it is already in use in the project, you can hide it.

To do this, click the "eye" icon Edit on the selected account.

Hidden payment accounts will not be offered by the system for selection when setting up the order storage.

Deleting a Payment Account

Select the payment account you want to delete from the list and click the delete icon Edit.

Confirm the action in the dialog box. After that, the payment account will be deleted and will disappear from the general list.