> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: addPayments(orderId: string, payments: Array) # Method package: wixEcomBackend # Method menu location: wixEcomBackend --> orderTransactions --> addPayments # Method Link: https://dev.wix.com/docs/velo/apis/wix-ecom-backend/order-transactions/add-payments.md # Method Description: Adds up to 50 payment records to an order. The `addPayments()` function returns a Promise that resolves when the payment records are added to an order. > **Note:** This does **NOT** perform the actual charging - the order is only updated with records of the payments. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## addPayments example for dashboard page code ```javascript import { orderTransactions } from 'wix-ecom-backend'; async function addPayments(orderId, payments) { try { const result = await orderTransactions.addPayments(orderId, payments); return result; } catch (error) { console.error(error); // Handle the error } } ``` ## addPayments example for exporting from backend code ```javascript import { orderTransactions } from 'wix-ecom-backend'; import { webMethod, Permissions } from 'wix-web-module'; import { elevate } from 'wix-auth'; const elevatedAddPayments = elevate(orderTransactions.addPayments); export const addPayments = webMethod( Permissions.Anyone, async (orderId, payments) => { try { const result = await elevatedAddPayments(orderId, payments); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---