Transactions
The Transactions API allows you create and manage payments on your integration.
Create Transaction
POST
https://api.lahza.io/transaction/initialize
Initialize a transaction from your backend
Headers
Name | Type | Description |
---|---|---|
authorization* | String | Set value to Bearer SECRET_KEY |
content-type* | String | Set value to application/json |
Request Body
Name | Type | Description |
---|---|---|
amount* | String | Amount should be in aghora if currency is ILS, qirsh, if currency is JOD, and cents, if currency is USD |
email* | String | Customer's email address |
currency* | String | The transaction currency (ILS, JOD or USD). Defaults to your dashboard currency. |
reference | String | Unique transaction reference. Only -, ., = and alphanumeric characters allowed. |
callback_url | String | Fully qualified url, e.g. https://example.com/ . Use this to override the callback url provided on the dashboard for this transaction |
metadata | String | |
mobile | String | Customer's mobile |
plan | String | If transaction is to create a subscription to a predefined plan, provide plan code here. This would invalidate the value provided in |
invoice_limit | integer | Number of times to charge customer during subscription to plan |
channels | array | An array of payment channels to control what channels you want to make available to the user to make a payment with. Available channels include: |
split_code | String | he split code of the transaction split. e.g. |
subaccount | String | The code for the subaccount that owns the payment. e.g. |
transaction_charge | integer | A flat fee to charge the subaccount for this transaction (). This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split). e.g. |
bearer | String | Who bears Lahza charges? |
first_name | String | First name of the customer |
last_name | String | Last name of the customer |
Verify Transaction
GET
https://api.lahza.io/transaction/verify/:reference
Confirm the status of a transaction
Path Parameters
Name | Type | Description |
---|---|---|
reference* | String | The transaction reference used to intiate the transaction |
Headers
Name | Type | Description |
---|---|---|
authorization* | String | Set value to Bearer SECRET_KEY |
List Transactions
GET
https://api.lahza.io/transaction
List transactions carried out on your integration.
Query Parameters
Name | Type | Description |
---|---|---|
perPage | integer | Specify how many records you want to retrieve per page. If not specify we use a default value of 50. |
page | integer | Specify exactly what page you want to retrieve. If not specify we use a default value of 1. |
amount | intger | Filter transactions by amount. Specify the amount (in agora if currency is ILS, qirsh, if currency is JOD, and cents, if currency is USD) |
to | datetime | A timestamp at which to stop listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21 |
from | datetime | A timestamp from which to start listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21 |
status | String | Filter transactions by status |
customer | integer | Specify an ID for the customer whose transactions you want to retrieve |
Headers
Name | Type | Description |
---|---|---|
authorization* | String | Set value to Bearer SECRET_KEY |
Fetch Transaction
GET
https://api.lahza.io/transaction/:id
Get details of a transaction carried out on your integration.
Path Parameters
Name | Type | Description |
---|---|---|
id* | An ID for the transaction to fetch |
Headers
Name | Type | Description |
---|---|---|
authorization* | String | Set value to |
Charge Authorization
POST
https://api.lahza.io/transaction/charge_authorization
All authorizations marked as reusable can be charged with this endpoint whenever you need to receive payments.
Headers
Name | Type | Description |
---|---|---|
authorization* | String | Set value to Bearer SECRET_KEY |
content-type* | String | Set value to |
Request Body
Name | Type | Description |
---|---|---|
amount* | string | Amount should be in aghora if currency is ILS, qirsh, if currency is JOD, and cents, if currency is USD |
email* | string | Customer's email address |
authorization_code* | String | Valid authorization code to charge |
metadata | String | To add custom fields to your transaction when it is displayed on the dashboard, include a custom_fields attribute in your JSON object. This attribute should be a stringified JSON array containing objects representing each custom field. |
currency* | String | The transaction currency (ILS, JOD or USD). Defaults to your dashboard currency. |
reference | String | Unique transaction reference. Only -, ., = and alphanumeric characters allowed. |
queue | boolean | When making a scheduled charge call, it is advisable to queue the requests to prevent overloading the processing system, which could result in transaction processing errors. By including the parameter "queue:true" in your request, you can leverage our queued charging feature and ensure smoother processing of transactions. |
Capture Transaction
POST
https://api.lahza.io/transaction/capture/:reference
Capture a transaction (For manual capture mode only)
Path Parameters
Name | Type | Description |
---|---|---|
reference* | String | The reference of the transaction |
Headers
Name | Type | Description |
---|---|---|
authorization* | String | Set value to Bearer SECRET_KEY |
View Transaction Timeline
GET
https://api.lahza.io/transaction/timeline/:id_or_reference
View the timeline of a transaction
Path Parameters
Name | Type | Description |
---|---|---|
id_or_reference* | String | The ID or the reference of the transaction |
Headers
Name | Type | Description |
---|---|---|
authorization* | String | Set value to Bearer SECRET_KEY |
Last updated