Skip to main content

Create transaction

POST https://wallet.paysera.com/rest/v1/transaction

Create transaction that groups payment(s) and/or allowance into one confirmable item.

Note: Transactions with status new are deleted automatically 1 month after creation.

Authorization​

This endpoint requires MAC (Message Authentication Code) authentication.

Authorization Header Format:

Authorization: MAC id="CLIENT_ID", ts="TIMESTAMP", nonce="RANDOM_STRING", mac="MAC_HASH", ext="body_hash=BODY_HASH"

Example:

Authorization: MAC id="a9b8c7d6e5f4g3h2", ts="1234567890", nonce="xyz123abc456def", mac="dGhpcyBpcyBhIHJhbmRvbSBtYWMgaGFzaCB2YWx1ZQ==", ext="body_hash=cmFuZG9tQm9keUhhc2hWYWx1ZQ%3D%3D"

For more details, see the Authentication section.

Request Body​

FieldTypeRequiredDescription
paymentsarrayArray of payment IDs or payment objects
allowanceobjectAllowance to include in transaction
reserveobjectReservation settings
use_allowancebooleanUse active allowance
suggest_allowancebooleanSuggest allowance to user
auto_confirmbooleanAuto-confirm transaction
redirect_uristringRedirect URI after confirmation
callback_uristringCallback URI for notifications

Example​

Request​

POST https://wallet.paysera.com/rest/v1/transaction
Content-Type: application/json
Authorization: MAC id="CLIENT_ID", ts="TIMESTAMP", nonce="RANDOM_STRING", mac="MAC_HASH", ext="body_hash=BODY_HASH"
{
"payments": [
{
"description": "Payment for order #1234",
"price": 1999,
"currency": "EUR"
}
],
"redirect_uri": "https://example.com/return"
}

Response​

{
"transaction_key": "pDAlAZ3z",
"created_at": 1355314332,
"status": "new",
"type": "page",
"wallet": null,
"project_id": 1234,
"payments": [
{
"id": 2987,
"transaction_key": "pDAlAZ3z",
"created_at": 1355314332,
"status": "new",
"price": 1999,
"currency": "EUR",
"price_decimal": "19.99",
"description": "Payment for order #1234"
}
],
"use_allowance": false,
"suggest_allowance": false,
"auto_confirm": false,
"redirect_uri": "https://example.com/return"
}

AUTHORIZATION: HTTP

REQUEST

Base URL
https://wallet.paysera.com
Body REQUIRED
{
"payments": [
{
"description": "Payment for order #1234",
"price": 1999,
"currency": "EUR"
}
],
"redirect_uri": "https://example.com/return"
}

RESPONSE

Transaction created successfully
{
"transaction_key": "pDAlAZ3z",
"created_at": 1355314332,
"status": "new",
"type": "page",
"wallet": null,
"project_id": 1234,
"payments": [
{
"id": 2987,
"transaction_key": "pDAlAZ3z",
"created_at": 1355314332,
"status": "new",
"price": 1999,
"currency": "EUR",
"price_decimal": "19.99",
"description": "Payment for order #1234"
}
],
"use_allowance": false,
"suggest_allowance": false,
"auto_confirm": false,
"redirect_uri": "https://example.com/return"
}