Skip to main content

Create Order

POST https://api.paysera.com/merchant-order/integration/v1/orders

Creates a new payment order in the system. The order represents the core transaction record and must be created before generating a payment link.

Authorization​

This endpoint requires OAuth2 Bearer token authentication.

Authorization Header Format:

Authorization: Bearer YOUR_ACCESS_TOKEN

For more details, see the Authentication section.

Request Body​

FieldTypeRequiredDescription
project_idstring (UUID)Your merchant project ID (defaults to the project from your JWT token)
redirect_urls.success_urlstringURL to redirect customer after successful payment
redirect_urls.failure_urlstringURL to redirect customer after failed payment
redirect_urls.callback_urlstringWebhook URL for payment notifications (omit and you receive no webhooks)
purchase.referencestring✓Your unique order reference (e.g., order ID in your system)
purchase.amountstring✓Amount in minor units as string (e.g., "2500" for €25.00)
purchase.currencystring✓ISO 4217 currency code (e.g., EUR)
metadataobjectKey-value metadata. Include referrer (your site URL) for origin verification
Amount Format

All amounts use minor currency units (e.g., cents for EUR). The amount "2500" represents €25.00.

Response​

FieldTypeDescription
project_idstring (UUID)Project identifier associated with the order
order_idstring (UUID)Unique order identifier
created_atintegerCreation timestamp in UTC timezone
merchant_dataobjectKey-value merchant data attached to the order
sourcestringSource indicating where this order originated from
purchase.referencestringUnique identifier for the order in the merchant system
purchase.amountintegerOrder amount in minor currency units (cents), returned as an integer
purchase.currencystringCurrency code in ISO 4217 format

Example​

Request​

POST https://api.paysera.com/merchant-order/integration/v1/orders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIs...
{
"project_id": "b7c3d4e5-6f7a-8b9c-0d1e-2f3a4b5c6d7e",
"redirect_urls": {
"success_url": "https://example.com/checkout/success",
"failure_url": "https://example.com/checkout/failure",
"callback_url": "https://example.com/webhooks/paysera"
},
"purchase": {
"reference": "ORDER-12345",
"amount": "2500",
"currency": "EUR"
},
"metadata": {
"referrer": "https://example.com",
"platform": "my-ecommerce",
"platform_version": "2.0.0"
}
}

Response​

{
"project_id": "b7c3d4e5-6f7a-8b9c-0d1e-2f3a4b5c6d7e",
"order_id": "a6f2b8e3-5e5f-47d9-b13f-87ed2db2938a",
"created_at": 1736433270,
"merchant_data": {
"key1": "value1",
"key2": "value2"
},
"source": "https://example.com",
"purchase": {
"reference": "ORDER-12345",
"amount": 2500,
"currency": "EUR"
}
}

Next Steps​

After creating an order, create a payment link to generate a URL where customers can complete the payment.

AUTHORIZATION: HTTP

REQUEST

Base URL
https://api.paysera.com

RESPONSE

Order created successfully
{
"project_id": "b7c3d4e5-6f7a-8b9c-0d1e-2f3a4b5c6d7e",
"order_id": "a6f2b8e3-5e5f-47d9-b13f-87ed2db2938a",
"created_at": 1736433270,
"merchant_data": {
"key1": "value1",
"key2": "value2"
},
"source": "https://example.com",
"purchase": {
"reference": "ORDER-12345",
"amount": 2500,
"currency": "EUR"
}
}