Singapay Home Page
Logo Icon
  1. Card (Money In)
  2. Inquiry Status

Overview

The Inquiry Status endpoint checks transaction status and optionally updates the local record.

This is useful when:

  • You want to actively check if a payment has been completed
  • Webhook notification was not received or was delayed
  • You need to confirm the final status of a transaction after 3DS authentication

Information

MethodPathFormatAuthentication
GET/api/v2.0/card/{account_id}/inquiry-status/{id}jsonOAuth 2.0 with Access Token

Request Details

Path Parameters

ParameterTypeMandatoryDescriptionExample
account_idStringRequiredMerchant Account ULID01K5G4FZZ18DMK0M5QTR8Y9QY9
idStringRequiredTransaction ID9901JAB3CD4E5F6G7H8J9K0M1N2

Headers Structure

FieldValueTypeMandatoryDescriptionExample
AuthorizationBearer {access_token}AlphanumericMandatoryBearer token obtained from the access token endpoint.Bearer eyJ0eXAiOiJKV1{…}

Request Example

GET /api/v2.0/card/01K5G4FZZ18DMK0M5QTR8Y9QY9/inquiry-status/9901JAB3CD4E5F6G7H8J9K0M1N2

cURL Example:

curl -X GET "https://your-domain.com/api/v2.0/card/01K5G4FZZ18DMK0M5QTR8Y9QY9/inquiry-status/9901JAB3CD4E5F6G7H8J9K0M1N2" \
  -H "X-PARTNER-ID: {api_key}" \
  -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGc..."

Response Details

Response Structure

FieldTypeMandatoryDescriptionExample
response_codeStringMandatoryResponse codeSP000
response_messageStringMandatoryHuman-readable response messageSuccessfully
dataObjectMandatoryResponse data-
> transaction_idStringMandatoryTransaction ID9901JAB3CD4E5F6G7H8J9K0M1N2
> reference_noStringMandatoryMerchant order reference numberORD-20260225-001
> amountNumberMandatoryTransaction amount in IDR100000
> statusStringMandatoryCurrent transaction statussuccess
> provider_auth_noString/NullOptionalAuthorization number (present on success)123456
> card_maskedString/NullOptionalMasked card number (present on success)411111******1111
> provider_result_codeString/NullOptionalResult code0000
> provider_result_messageString/NullOptionalResult messageSuccess
> completed_atString/NullOptionalPayment completion timestamp (ISO 8601, present on success)2026-02-25T12:15:00.000000Z
> failed_atString/NullOptionalPayment failure timestamp (ISO 8601, present on failure)null

Response Example — Payment Confirmed

Success: Payment has been completed (HTTP 200).

{
    "response_code": "SP000",
    "response_message": "Successfully",
    "data": {
        "transaction_id": "9901JAB3CD4E5F6G7H8J9K0M1N2",
        "reference_no": "ORD-20260225-001",
        "amount": 100000,
        "status": "success",
        "provider_auth_no": "123456",
        "card_masked": "411111******1111",
        "provider_result_code": "0000",
        "provider_result_message": "Success",
        "completed_at": "2026-02-25T12:15:00.000000Z",
        "failed_at": null
    }
}

Response Example — Pending

When the transaction has not yet been sent (shows as pending):

{
    "response_code": "SP000",
    "response_message": "Successfully",
    "data": {
        "transaction_id": "9901JAB3CD4E5F6G7H8J9K0M1N2",
        "reference_no": "ORD-20260225-001",
        "amount": 100000,
        "status": "pending"
    }
}

Error Response (HTTP 404)

Error: Transaction not found.

{
    "response_code": "SP009",
    "response_message": "Transaction not found",
    "data": {}
}

How It Works

  1. If status is already success: Returns the current transaction data immediately.
  2. If status is pending and payment not yet submitted: Returns the current transaction data as-is.
  3. If payment has been submitted: Checks the latest status from the payment processor.
    • If payment is confirmed, the transaction status is updated to success with transaction details.
    • If payment failed, the status is updated to failed.
    • If not yet finalized, the current status is returned without changes.
  4. If the status check fails: The error is logged internally, and the current transaction data is returned without changes.

Important Notes

  • State-Changing Endpoint: Unlike a simple GET, this endpoint can trigger status changes if a payment result is confirmed.
  • Idempotent for Terminal States: If the transaction is already success, failed, cancelled, or refunded, calling this endpoint has no side effects.
  • Polling Strategy: If you need to poll for payment completion, wait at least 5-10 seconds between calls. Do not poll more frequently than necessary.
  • Prefer Webhooks: For real-time payment notifications, configure webhooks instead of polling this endpoint.