Transactions API Documentation (1.0.0)

Download OpenAPI specification:Download

Interface contract for managing inbound payments via the payment provider and tracking partner balances. Note: The generation of Attijari settlement XML files is handled asynchronously by an internal batch process.

Checkout

Initialize a payment session

Called by the React Front-end to obtain the payment provider redirection URL.

header Parameters
X-Correlation-ID
string

Correlation identifier for request tracing

Request Body schema: application/json
required
tripReservationId
required
string

Technical and unique ID generated automatically by the travelApi that identifies a trip reservation.

Responses

Request samples

Content type
application/json
{
  • "tripReservationId": "string"
}

Response samples

Content type
application/json
{}

Payment Notification (Webhook)

Secure endpoint called by the payment partner after the customer completes the transaction on their gateway.

header Parameters
X-Correlation-ID
string

Correlation identifier for request tracing

Request Body schema: application/json
required
merchantId
required
string

Unique merchant identifier provided by the payment partner.

orderId
required
string

The internal order reference linked to this payment.

amount
number <float>

Amount processed by the provider.

status
required
string
Enum: "CAPTURED" "REJECTED" "CANCELLED"

Final status of the transaction on the provider side.

authorizationCode
string

Approval code provided by the banking network.

hash
required
string

SHA-256 signature for data integrity and security verification.

Responses

Request samples

Content type
application/json
{
  • "merchantId": "string",
  • "orderId": "string",
  • "amount": 0.1,
  • "status": "CAPTURED",
  • "authorizationCode": "string",
  • "hash": "string"
}

Response samples

Content type
application/json
{
  • "status": "SUCCESS"
}

Operation

Initiate a refund

Refunds the customer via the payment provider and adjusts the partner's balance accordingly.

header Parameters
X-Correlation-ID
string

Correlation identifier for request tracing

Request Body schema: application/json
required
transactionReference
required
string

Reference of the original transaction to be refunded.

amount
number <float>

Optional amount to refund. If omitted, a full refund will be processed.

reason
required
string

Justification for the refund request.

Responses

Request samples

Content type
application/json
{
  • "transactionReference": "string",
  • "amount": 0.1,
  • "reason": "Product not available"
}

Response samples

Content type
application/json
{
  • "refundId": "string",
  • "status": "PENDING"
}

Wallet

Retrieve wallet balance and transactions

Returns the "Net to Pay" balance for partners. If the user has the ZORNI_ADMIN role, all partner wallets are returned.

query Parameters
currentPage
integer >= 0

Current page number.

sizePage
integer >= 3

Number of elements per page.

establishmentIds
string
Example: establishmentIds=id1,id2,id3

Filter by establishment identifiers (comma-separated list).

header Parameters
X-Correlation-ID
string

Correlation identifier for request tracing

Responses

Response samples

Content type
application/json
{
  • "totalElements": 0,
  • "totalPages": 0,
  • "currentPage": 0,
  • "availableBalance": {
    },
  • "content": [
    ]
}