Skip to main content
POST
/
payments
cURL
curl --request POST \
  --url https://paysum.dev/api/v1/payments \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "shopId": "01JWJBQ4HZ8G6VJB590G4A3DCQ",
  "gateway": "STRIPE",
  "cost": 99,
  "currency": "EUR",
  "quantity": 1,
  "email": "customer@gmail.com",
  "custom_fields": {
    "username": "software-username"
  },
  "products": [
    "01JXB9BZ1B4S9QQ5SCVZC4D9B7"
  ]
}'
{
  "name": "<string>",
  "tag": "<string>"
}

Authorizations

Authorization
string
header
required

Body

application/json

payment JSON to be created

shopId
string
required

Shop ID displayed on the API keys page. This will identify the specific shop you want the payment created on.

Example:

"01JWJBQ4HZ8G6VJB590G4A3DCQ"

email
string
required

Email of the customer. Should you want to handle emails on your own, pass to this field a company email for which receipts of orders will be sent for accounting and log purposes

Example:

"customer@gmail.com"

gateway
enum<string>
Available options:
STRIPE,
CRYPTO
Example:

"STRIPE"

cost
integer

Required if products not defined. This cost will show to the customer. You must provide this in cents format. Example — 0,99 is 99. 4,99 is 499

Example:

99

currency
enum<string>

Can be used to define currency for the payment

Available options:
CAD,
HKD,
ISK,
PHP,
DKK,
HUF,
CZK,
GBP,
RON,
SEK,
IDR,
INR,
BRL,
RUB,
HRK,
JPY,
THB,
CHF,
EUR,
MYR,
BGN,
TRY,
CNY,
NOK,
NZD,
ZAR,
USD,
MXN,
SGD,
AUD,
ILS,
KRW,
PLN
Example:

"EUR"

quantity
integer

Can be passed with products defined or not. The cost or product's price will be multiplied by this amount

Required range: x >= 1
Example:

1

custom_fields
object

The custom fields passed by the user at checkout. The format are key-value pairs.

Example:
{ "username": "software-username" }
products
string[]
Example:
["01JXB9BZ1B4S9QQ5SCVZC4D9B7"]

Response

plant response

name
string
required

The name of the plant

tag
string

Tag to specify the type

I