1. Home
  2. Subscriptions API calls

Subscriptions API calls

Query Subscription Status

This function allows merchant to query the current status of a subscription.


Environment Url Method Version
Production https://api.payxpert.com/subscription/{subscriptionID} GET >= 0200

Query Request

No fields are needed in the request. The subscription reference is in the URI.

Query Response

Field Type Max Length Requirement Description Version
errorCode D 3 M See Messages and error codes
errorMessage S 100 M See Messages and error codes
subscription O M Subscription object (see Common Data Structures)
transactionList L M List (array) of associated transactions (see Common Data Structures)

PHP Gateway Client

Transaction name : StatusSubscription


Method name Requirement
setSubscriptionID M


$client = new GatewayClient();

$transaction = $client->newTransaction('StatusSubscription', 'testMerchant', 'testPassword');

$response = $transaction->send();

if ('000' === $response->errorCode) {
    $subscription    = $response->subscription;
    $transactionList = $response->transactionList;
} else {
    echo "Error {$response->errorCode} with message {$response->errorMessage}";

Java Gateway Client


Connector method getSubscriptionStatus
Request class SubscriptionStatusRequest
Response class SubscriptionStatusResponse


PaymentGatewayConnector connector = new PaymentGatewayConnector(API_URL, ORIGINATOR, PASSWORD);

SubscriptionStatusResponse response = null;
SubscriptionStatusRequest request = new SubscriptionStatusRequest();

try {
  response = connector.getSubscriptionStatus(request);
} catch (Exception e) {

if (response != null) {
  if (TransactionResultCode.TRANSACTION_SUCCESSFULLY.equals(response.getErrorCode()) {
    System.out.println("Success: " + response.getErrorMessage());
  } else {
    System.out.println("Failure: " + response.getErrorMessage());
Still any doubt?

Open a support ticket

Was this article helpful?