Transaction Details

This endpoint returns order transaction details

Resource URL

POST http://api.qa.optty.com/orders/{MERCHANT-REFERENCE}/details?merchantId={MERCHANT-ID}

For live environment, please update the endpoint to https://api.optty.com

Headers

KeyValue

Content-Type

application/json

Authorization

Bearer {GENERATED_ACCESS_TOKEN}

Parameters

Grand Parent/Parent Request Parameters

FieldTypeDescriptionRequired

merchantReference

string

The order reference generated for merchant

Yes

merchantId

string

The merchantId that belongs to GP/P

Yes

Merchant Request Parameters

FieldTypeDescriptionRequired

merchantReference

string

The order reference generated for merchant

Yes

Success Response Parameters

FieldTypeDescription

merchantReference

string

The merchant reference passed in the request

status

string

The status of the order transaction

amount

numeric

The total order amount

currency

string

The currency used for the order transaction

provider

string

The BNPL provider processing the order transaction

updatedAt

string

The last time an update was made to the order transaction

failureReason

string

The Failure reason for the error transactions

bnplOrderId

string

The BNPL OrderId for the transactions

transactionReference

string

The unique transaction reference

transactionHistory

array

The transaction history list

transactionHistory[0].transactionId

string

The Id generated for the transaction

transactionHistory[0].status

string

The status of the transaction

transactionHistory[0].createdAt

string

The time the transaction was created

refunds

array

The refunds made on order

refunds[0].refundId

string

The unique generated refund Id

refunds[0].amount

string

The order amount to be refunded

refunds[0].currency

string

Refund currency

refunds[0].status

string

The status of the order refund

refunds[0].createdAt

string

The time the refund was created

refunds[0].refundReason

string

The reason for the refund

refunds[0].refundFailureReason

string

The reason the refund failed

orderCaptures

array

Order captures

orderCaptures[0].captureId

string

The reference submitted upon requesting for capture

orderCaptures[0].amount

string

The captured amount

orderCaptures[0].status

string

The order capture status

orderCaptures[0].createdAt

string

The time order capture request was created

Sample Success Response

{
    "merchantReference": "PLANPAY-0000-760-729",
    "status": "SUCCESSFUL",
    "amount": "260",
    "currency": "AUD",
    "provider": "PLANPAY_AU",
    "updatedAt": "2024-02-28T05:30:56.096Z",
    "failureReason": null,
    "bnplOrderId": "zfh1r58g7lqx",
    "transactionReference": "6d5af829b5",
    "transactionHistory": [
        {
            "transactionId": "4763fb55-728c-43ef-9008-ed5568ea9f88",
            "status": "INITIATED",
            "createdAt": "2024-02-28T05:27:31.170Z"
        },
        {
            "transactionId": "3df88423-0cb0-4259-8876-62b311f837ff",
            "status": "PENDING",
            "createdAt": "2024-02-28T05:27:32.663Z"
        },
        {
            "transactionId": "e9f42b19-3d57-4e8e-920f-068d7f90c6b0",
            "status": "SUCCESSFUL",
            "createdAt": "2024-02-28T05:30:56.096Z"
        }
    ],
    "refunds": [
        {
            "refundId": "PLANPAY-0000-760-729",
            "amount": "240",
            "currency": "AUD",
            "status": "SUCCESSFUL",
            "createdAt": "2024-02-28T05:38:18.438Z",
            "refundReason": "300 Refund",
            "refundFailureReason": ""
        }
    ],
    "orderCaptures": [
        {
            "captureId": "CAPTURE_789",
            "amount": "120",
            "status": "SUCCESSFUL",
            "createdAt": "2024-02-29T05:38:18.438Z",
        }
    ]
}

Sample Failure Response

{
    "statusCode": 401,
    "message": "You are not authorized to view this transaction...!",
    "error": "Unauthorized"
}

Last updated