Operations
Version 1
Through Ottu, merchants can perform operations such as capture, refund, and void across different payment gateways.
There are conditions should be applied to perform operations, in addition, not all the payment gateways support all the operations. See operation definitions and conditions.
Capture
POST
https://<ottu-url>/b/pbl/v1/operation/{{order_no}}
The process of obtaining a complete or partial authorized payment and depositing the captured amount into the merchant's bank account. The payment transaction should be authorized.
Query Parameters
Name | Type | Description |
---|---|---|
order_no* | String |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Basic authentication |
Request Body
Name | Type | Description |
---|---|---|
operation* | String | capture |
amount* | String | Capture amount |
Refund
POST
https://<ottu-url>/b/pbl/v1/operation/{{order_no}}
The process of refunding involves deducting either the full or partial amount that was paid or captured and then transferring it back to the customer's bank account.
Query Parameters
Name | Type | Description |
---|---|---|
order_no* | String |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Basic authentication |
Request Body
Name | Type | Description |
---|---|---|
operation* | String | refund |
amount* | String | Refund amount |
Cancel
POST
https://<ottu-url>/b/pbl/v1/operation/{{order_no}}
To halt a transaction before it is fully processed.
Query Parameters
Name | Type | Description |
---|---|---|
order_no* | String |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Basic authentication |
Request Body
Name | Type | Description |
---|---|---|
operation* | String | cancel |
Inquiry
POST
https://<ottu-url>/b/pbl/v1/inquiry/{{order_no}}
The process of checking the status of a payment transaction
Query Parameters
Name | Type | Description |
---|---|---|
order_no* | String |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Basic authentication |
Request Body
Name | Type | Description |
---|---|---|
disclose_to_merchant | bool | If True, the merchant will receive a disclosure request |
disclosure_url | URL | Where the request would be sent to |
Inquiry enabled when payment transaction state is either pending, attempted ,failed or expired. See payment transaction state. Error message:
If there is no transaction with provided order number: "Order number does not exist"
If there is a transaction with provided order number but the transaction has no attempts: "No payment attempts for order {your order number}"
If disclose_to_merchant is True and disclosure_url isn't defined: "No disclosure url found for order {txn order number}"
If operation isn't allowed: "Operation is not allowed"
Operations are not working for foreign currenies.
Last updated