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

NameTypeDescription

order_no*

String

Headers

NameTypeDescription

Authorization*

String

Basic authentication

Request Body

NameTypeDescription

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

NameTypeDescription

order_no*

String

Headers

NameTypeDescription

Authorization*

String

Basic authentication

Request Body

NameTypeDescription

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

NameTypeDescription

order_no*

String

Headers

NameTypeDescription

Authorization*

String

Basic authentication

Request Body

NameTypeDescription

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

NameTypeDescription

order_no*

String

Headers

NameTypeDescription

Authorization*

String

Basic authentication

Request Body

NameTypeDescription

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:

  1. If there is no transaction with provided order number: "Order number does not exist"

  2. If there is a transaction with provided order number but the transaction has no attempts: "No payment attempts for order {your order number}"

  3. If disclose_to_merchant is True and disclosure_url isn't defined: "No disclosure url found for order {txn order number}"

  4. If operation isn't allowed: "Operation is not allowed"

Operations are not working for foreign currenies.

Last updated