- Print
- DarkLight
A Tenant can initialize the process of taking a payment by Creating a Transaction. When a Transaction is created the Payment Gateway will authorise the transaction with the Payment Provider. Authorising a transaction checks whether the payment method has the appropriate funds and reserves them to guarantee successful capture. If the Transaction cannot be authorised a 402 response is sent, otherwise the tenant can then Capture a Transaction.
Transaction Warning
Transactions will all eventually expire, the exact time frame depends on the Payment Method used. Before a Transaction expires it should either Voided or Captured.
sequenceDiagram
Tenant->>+Payment Gateway: Create Transaction
Payment Gateway->>+Payment Provider: Authorise transaction
Payment Provider->>+Payment Gateway: Unauthorised
Payment Gateway->>+Tenant: 402
When creating a transaction it is possible to have the Payment Gateway automatically capture the payment using the capture
query string parameter.
sequenceDiagram
Tenant->>+Payment Gateway: Create Transaction
Payment Gateway->>+Payment Provider: Authorise transaction
Payment Provider->>+Payment Gateway: Authorised
Payment Gateway->>+Payment Provider: Capture transaction
Payment Provider->>+Payment Gateway: Processing Capture
Payment Gateway->>+Tenant: 200
Info
The Idempotency-Key header can be used to guarantee multiple requests do not result in duplicate Transactions being created.