Payments API
Create payment links, retrieve payment details, and cancel active payments.
For marketplace payment splitting, see Split Payments and the Marketplaces guide.
| Endpoint | Description |
|---|---|
POST /v1/payments | Create a payment link |
GET /v1/payments/:id | Retrieve payment details |
DELETE /v1/payments/:id | Cancel an active payment |
Fee Model
Pymstr's fee is deducted from the amount. You receive amount − pymstrFee. The customer pays the network fee on top of
amount, so it does not change what you receive.
amount × 0.005 is rounded down to the currency's Decimals, and minFee, the currency's Min fee, applies when the
result is lower (Currencies & Chains). The fee on a $49.99 payment is $0.24.
Example
| A $250 payment in USD | Amount |
|---|---|
pymstrFee, to Pymstr | $1.25 |
merchantFee, to your wallet | $248.75 |
With sellers, the fee comes off every participant proportionally, see Split Payments.
Create PaymentPOST /v1/payments
Create a payment link for your customer. Share the paymentUrl in the response with your customer to complete the
payment.
curl -X POST https://api.pymstr.com/v1/payments \
-H "Authorization: Bearer pk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"amount": "250.00",
"currency": "USD",
"title": "Order #456",
"externalId": "order-456",
"acceptedChains": [
42161,
8453
],
"acceptedTokens": [
"USDC"
]
}'Request Body
Parameter
Type
Response201 Created
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"status": "ACTIVE",
"amount": "250.00",
"currency": "USD",
"title": "Order #456",
"externalId": "order-456",
"acceptedChains": [
42161,
8453
],
"acceptedTokens": [
"USDC"
],
"pymstrFee": "1.25",
"merchantFee": "248.75",
"sellers": null,
"paymentUrl": "https://pay.pymstr.com/p/01234567-89ab-cdef-0123-456789abcdef",
"expiresAt": "2026-03-01T00:00:00.000Z",
"createdAt": "2026-02-24T10:00:00.000Z"
}Parameter
Type
Error Responses
| Status | Code | Meaning |
|---|---|---|
400 | bad_request | The request broke a rule in the field tables |
400 | recipient_refused | A seller address cannot receive funds: Pymstr's fee wallet or a paymaster address, or an account that is suspended |
401 | unauthorized | Missing or invalid API key |
409 | conflict | The externalId is already in use by an ACTIVE, PROCESSING or SUCCESSFUL payment, and the body carries its id (see Lost Response) |
429 | too_many_requests | Rate limit exceeded |
Get PaymentGET /v1/payments/:id
Retrieve payment details. Returns the full view when the request carries the owning merchant's own API key.
curl -X GET https://api.pymstr.com/v1/payments/01234567-89ab-cdef-0123-456789abcdef \
-H "Authorization: Bearer pk_your_api_key"Path Parameters
Parameter
Type
Response200 OK
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"status": "SUCCESSFUL",
"amount": "250.00",
"currency": "USD",
"title": "Order #456",
"externalId": "order-456",
"acceptedChains": [
42161,
8453
],
"acceptedTokens": [
"USDC"
],
"pymstrFee": "1.25",
"merchantFee": "248.75",
"sellers": null,
"paymentUrl": "https://pay.pymstr.com/p/01234567-89ab-cdef-0123-456789abcdef",
"chainId": 42161,
"token": "USDC",
"exchangeRate": "1.001500",
"amountToken": "250.375000",
"pymstrFeeToken": "1.251875",
"merchantFeeToken": "249.123125",
"gasActual": "0.001200",
"txHash": "0x...",
"buyer": {
"smartAddress": "0x..."
},
"error": null,
"expiresAt": "2026-03-01T00:00:00.000Z",
"paidAt": "2026-02-24T10:05:00.000Z",
"createdAt": "2026-02-24T10:00:00.000Z",
"updatedAt": "2026-02-24T10:05:00.000Z"
}Parameter
Type
Error Responses
| Status | Code | Meaning |
|---|---|---|
404 | not_found | Not found |
429 | too_many_requests | Rate limit exceeded |
Cancel PaymentDELETE /v1/payments/:id
Cancel a payment with status ACTIVE. A payment in any other status answers 400 with record_not_active.
curl -X DELETE https://api.pymstr.com/v1/payments/01234567-89ab-cdef-0123-456789abcdef \
-H "Authorization: Bearer pk_your_api_key"Path Parameters
Parameter
Type
Response204 No Content
The response has no body.
Error Responses
| Status | Code | Meaning |
|---|---|---|
400 | record_not_active | The payment is no longer ACTIVE |
400 | bad_request | An id that does not exist and an id on another account answer the same |
401 | unauthorized | Missing or invalid API key |
429 | too_many_requests | Rate limit exceeded |
Events & States
A payment moves through the statuses on Payment States and fires these webhook events:
| Event | Description |
|---|---|
payment.created | Payment link was created (dashboard only, see Webhooks) |
payment.processing | The network accepted the customer's transaction |
payment.completed | Payment confirmed on-chain |
payment.failed | The transaction reverted or was never confirmed |
payment.expired | Payment expired before completion |
payment.cancelled | Payment was cancelled |