Payment Providers and Aggregators
Add USDC and USDT payments for every merchant on your platform: pick an account setup, set your markup per payment, and build one connector.
Add stablecoin payments in USDC and USDT to your platform, next to cards and your other payment methods. You build one connector, set your markup on every payment, and each share lands straight in its own wallet. We never hold your money, and you never hold your merchants' money. One transaction moves the customer's payment into every wallet at once.
How One Payment Works
- The customer picks stablecoins on your checkout.
- Your server calls
POST /v1/payments, with the split insellers. - Pymstr returns the
paymentUrl. - Your checkout opens it.
- The customer logs in with Google, Apple, email or their own wallet, picks a token and a network, and approves one total.
- One transaction pays the merchant, you and the Pymstr fee.
- The blockchain confirms it in seconds.
- Pymstr sends a signed
payment.completedwebhook to your server. - Your server reads the payment with
GET /v1/payments/:id. - Your server marks the order paid.
Pick an Account Setup
The split works the same way in both setups. What changes is whose Pymstr account creates the payments, and so where each share lands.
Setup 1: You Hold One Account
This fits when merchants contract with you and you offer payment methods under your own agreement. A merchant joins by
giving you a wallet address, and you put that address in sellers on every payment for that merchant. Your account
keeps the rest, which is your markup. The API returns it as merchantFee, because your account is the merchant on the
payment. The merchant never signs up with Pymstr.
Setup 2: Each Merchant Holds Its Own Account
This fits when merchants bring their own provider accounts to your platform. The merchant signs up at dashboard.pymstr.com with Google, Apple or email, and invites your developer with the Developer role (team roles). From that seat your developer creates the merchant's API key and points its webhook at your server.
| Setup 1: your account | Setup 2: the merchant's account | |
|---|---|---|
| API key | Yours | The merchant's, created from your Developer seat |
| Webhook | One endpoint on your account | One URL per merchant on your server |
| Merchant's share lands | At the address it gave you | In its own Pymstr account |
| Your markup lands | In your account, as what the account keeps (merchantFee) | At your address, as a sellers entry |
| Name on the checkout | Yours, so put the merchant's name in title | The merchant's |
| Merchant's own payouts | Not through Pymstr, since it has no account | From its Pymstr account (Payouts) |
| Your extra work | Checking that the merchant's address receives on every chain | One API key and one webhook secret per merchant |
In setup 1, checking each address is your job, because a seller is paid on the chain the customer picks (Constraints). In both setups a payment cannot be reversed, see refunds.
Never open an account in a merchant's name
A Pymstr login is a wallet, and whoever logs in controls it. An account you open in a merchant's name puts the merchant's money under your control. In setup 1 the merchant's share goes to a wallet it already controls. In setup 2 the merchant signs up itself.
Add Your Markup
Your markup is a share of every payment, paid to you in the same transaction as the merchant's share. You set it on your server, payment by payment, so it can differ per merchant. The checkout shows the customer one total.
- In setup 1, the merchant's share is a
sellersentry, and your account keeps the rest: your markup, returned asmerchantFee. - In setup 2, your markup is a
sellersentry to your address, and the merchant's account keeps the rest. sellerstakes up to 5 entries, so a partner who referred the merchant can take its own share in the same payment.
After the fee, the account's share and each seller's share must each reach the currency's Min split, so a markup has a floor. Constraints has both limits.
Markup on Top
The merchant pays your markup plus Pymstr's 0.5% fee, which has a per-currency minimum. The fee comes out of every share
in proportion (Fee Model), so you keep about 99.5% of your markup. In setup 1 the
merchant's sellers entry is the payment amount minus your markup.
On a $1,000 payment in setup 1:
| Rate | sellers entry | Merchant receives | You receive | Pymstr fee | Cost to the merchant |
|---|---|---|---|---|---|
| 1% | $990.00 | $985.05 | $9.95 | $5.00 | $14.95 |
| 1.5% | $985.00 | $980.07 | $14.93 | $5.00 | $19.93 |
| 2% | $980.00 | $975.10 | $19.90 | $5.00 | $24.90 |
All-In Price
You quote one rate that already includes Pymstr's fee, and the merchant nets the payment minus that rate. In setup 1 the
merchant's sellers entry is that net figure scaled up by the fee, rounded up to the currency's decimals.
pymstrFee is the fee on the whole payment (Fee Model).
On a $1,000 payment in setup 1:
| Rate | sellers entry | Merchant receives | You receive | Pymstr fee | Cost to the merchant |
|---|---|---|---|---|---|
| 1% | $994.98 | $990.00 | $5.00 | $5.00 | $10.00 |
| 1.5% | $989.95 | $985.00 | $10.00 | $5.00 | $15.00 |
| 2% | $984.93 | $980.00 | $15.00 | $5.00 | $20.00 |
Each seller's share is rounded down to the cent, and the account keeps the cents left over, so a figure in setup 2 can differ by a cent.
The Requests
Both bodies below are a $100 payment with a 2% markup on top. Create Payment has the full request in cURL, Node.js and Python.
In setup 1 your own API key signs the request, and merchant A's address is the seller.
{
"amount": "100.00",
"currency": "USD",
"title": "Merchant A: order 1042",
"externalId": "merchant-a-order-1042",
"sellers": [{ "address": "<merchant A address>", "amount": "98.00" }]
}| Setup 1 result | Amount |
|---|---|
Merchant A, the sellers entry | $97.51 |
You, merchantFee | $1.99 |
pymstrFee, to Pymstr | $0.50 |
In setup 2 merchant A's API key signs the request, and your address is the seller.
{
"amount": "100.00",
"currency": "USD",
"title": "Order 1042",
"externalId": "order-1042",
"sellers": [{ "address": "<your address>", "amount": "2.00" }]
}| Setup 2 result | Amount |
|---|---|
You, the sellers entry | $1.99 |
Merchant A, merchantFee | $97.51 |
pymstrFee, to Pymstr | $0.50 |
The setup changes only which key signs the request and which address is in sellers, so one connector can run both
setups side by side.
Your Brand on the Checkout
The checkout shows the logo, brand color and name of the account that created the payment. In setup 1 that is you, for
every merchant. In setup 2 each merchant sets its own. Add ?brandColor= to the link so the checkout opens in that
color straight away (Brand Color). The "Powered by Pymstr" line stays on the checkout.
Webhooks and Order Matching
Put your order ID in externalId, and match each payment.completed webhook to its order by data.externalId
(Payload Format). Read the payment before you mark the order paid
(Best Practices). If the response to a create never reaches you, send the request again
(Lost Response).
In setup 1 every merchant's orders go through your one account, and externalId is unique per account
(Idempotency). So give each order ID a prefix per merchant, such as merchant-a-order-1042. An
externalId holds up to 36 characters.
In setup 2 each merchant's account has one webhook endpoint, and the payload does not say which account sent it. So give
each merchant its own URL on your server, a path per merchant such as /webhooks/pymstr/merchant-a, and check each
signature with that merchant's webhook secret (Signature Verification). The secret is shown only
once (Setup), so store it with the merchant's API key.
Go-Live Checklist
Signing up takes Google, Apple or email, and no KYB.
Setup 1
- Sign up at dashboard.pymstr.com.
- Add your business profile, logo and brand color.
- Create an API key, limit it to your server's IP addresses and pick an expiry (API Keys).
- Add your webhook endpoint and save its secret (Setup).
- Build Create Payment, Get Payment, Cancel Payment and a handler for the
payment.completedwebhook. - Collect each merchant's wallet address and check that it receives on every chain you accept.
- Make one small real payment and check that each share landed.
Setup 2
- Build the same four pieces, with one webhook URL per merchant.
- Each merchant signs up at dashboard.pymstr.com, adds its business profile, logo and brand color, and invites your developer with the Developer role (team roles).
- From that seat, your developer creates the merchant's API key and adds its webhook endpoint. Store the key and the webhook secret with that merchant.
- Make one small real payment and check that each share landed.