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​
| Field | Type | Required | Description |
|---|---|---|---|
payments | array | Array of payment IDs or payment objects | |
allowance | object | Allowance to include in transaction | |
reserve | object | Reservation settings | |
use_allowance | boolean | Use active allowance | |
suggest_allowance | boolean | Suggest allowance to user | |
auto_confirm | boolean | Auto-confirm transaction | |
redirect_uri | string | Redirect URI after confirmation | |
callback_uri | string | Callback 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"
}