Skip to main content
Skip table of contents

Query Payment Status

Based on the integration option chosen, Smobilpay for e-commerce can be setup to push the status to your system or provide the status via a pull request.

This endpoint can be used to query the current realtime payment transaction status for a payment order from the Smobilpay for e-commerce platform.

The enpoint supports search requests by either one of two reference identifiers:

  • txid → Which has been generated by Smobilpay for e-commerce and is returned in the response when creating a payment order

  • orderMerchantId → Which is the unique id created and managed by the API user and has been injected in the payment order request

URL

/api/order/status

HTTP method

GET

Request


Content-Type

none

Query Params

txid - the unique transaction id returned as response of the Order Placement call. Provide this parameter or the orderMerchantId parameter to query the status.

Query Params

orderMerchantId - the reference id generated by your system for this transaction which is also the merchantReference sent in the POST /api/order request. Provide this parameter or the txid parameter to query the status.

Header Params

Authorization: Bearer <access token>

Body

none

Response


Content-Type

application/json

Status Code

  • 200 - OK

Error Codes

  • 400 - [Bad Request] Parameters are not valid.

  • 401 - [Unauthorised]

  • 403 - [Forbidden] User didn't provide the right credentials.

  • 404 - [Not Found] Payment transaction with the given transaction id does not exist.

  • 500 - [InternalServerError] Internal server error.

Body

QueryPaymentStatusResponse - [JSON]

Example

Request

GET /<path>/api/order/status?orderMerchantId=abc123456 HTTP/1.1
Host: <host>
Authorization: Bearer 3ab8b859e58ef8528b169c86af2ca
Accept: application/json

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
   "status": "CREATED"
}

Data Types

Output Data Types

Name

Type

Description

Status

string

Possible values:
CONFIRMED - When the payment was successful and confirmed by the payment provider.
IN_PROGRESS - When the payment was submitted to the payment provider and no confirmation is received yet.
FAILED - The payment failed to be completed by the payment provider.
CANCELED - The payment was cancelled either by the payment provider or due to expiration. Please note the expiration of a payment depends on the payment provider.
CREATED - The payment order was created by the Order Placement call.
INITIALISED - The customer has been redirected to the Smobilpay for e-commerce payment option portal successfully.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.