PayStar API Documentation
  1. Merchant EN
  • Merchant EN
    • Introduction
    • Glossary
    • Authorization key
    • Sandbox
    • Additional fields
    • Currencies
    • Bank names
    • Telecom operators
    • Callbacks
    • Error descriptions
    • Tech FAQ
    • Order History
    • Integratins
      • Stripe
      • Inwizo
      • 2Checkout
      • Adyen
      • AffiniPay
      • Alikassa
      • AlliancePay
      • Amazon Pay
      • AnyMoney
      • AstroPay
      • Aureavia
      • AurisMyChanger
      • Authorize.Net
      • Avatarix
    • Balance H2H
      GET
    • Deposit H2H - Card & P2P
      POST
    • Deposit H2H - Token
      POST
    • Deposit H2C - Card
      POST
    • Deposit status H2H - PayStar ID
      GET
    • Deposit status H2H - Merch ID
      GET
    • Payout H2H
      POST
    • Payout status H2H - PayStar ID
      GET
    • Payout status H2H - Merch ID
      GET
  1. Merchant EN

Order History

INFO
The orderHistory array is returned in the response of the following endpoints:
GET /deposit-order/{externalId}/status
GET /deposit-order/{externalTransactionId}/status-by-external-transaction-id
GET /withdrawal-order/{externalId}/status
GET /withdrawal-order/{externalTransactionId}/status-by-external-transaction-id
It provides a timeline of all key events in the lifecycle of the transaction — including internal logic, gateway responses, and user interactions. This can help merchants analyze failed payments, fine-tune routing/cascading logic, and profile user behavior.

Interpretation of the code structure#

Each action in the orderHistory has the format X.Y.Z.W, where:
X — Source of the event (e.g., internal, gateway, user, etc.)
Y — Status code after the event:
0 — Intermediate / non-final state
1 — Success
2 — Failure
Z.W — Additional categorization of the action:::
Please note
The orderHistory array may be updated with a short delay after the final transaction status (Success or Failed) is received.
Recommendation:
To ensure you receive the full and complete event history, we advise calling the status endpoint at least 10 minutes after the final status has been confirmed.
This delay allows for all asynchronous callbacks, retries, and gateway logs to be properly recorded.

Example JSON#

{
  "externalId": "ad66a2ff-97d1-47c5-8552-53752a51f031",
  "orderStatus": "Success",
  "amount": 2600.00,
  "externalParams": {
    "cardToken": null,
    "cardStorageToken": null,
    "cardHolder": null,
    "cardNumber": null
  },
  "orderHistory": [
    {
      "time": "2025-07-28T09:29:51.339832",
      "action": "1.1.0.0"
    },
    {
      "time": "2025-07-28T09:29:51.339832",
      "action": "4.1.0.0"
    }
  ]
}

Action Codes Reference#

1. Internal Creation (1.Y.Z.W)#

CodeDescription
1.1.0.0Payment created
1.2.1.1Payment failed: Configuration – Limit issue
1.2.1.2Payment failed: Configuration – Routing error
1.2.1.3Payment failed: Configuration – Routing error
1.2.1.4Payment failed: Configuration – No balance

2. Gateway Creation (2.Y.Z.W)#

CodeDescription
2.1.0.0Payment created on gateway
2.2.1.1Payment failed: Tech – Failed connection
2.2.1.2Payment failed: Tech – Server unavailable
2.2.1.3Payment failed: Tech – Invalid response
2.2.1.4Payment failed: Tech – Invalid request
2.2.2.1Payment failed: Auth – Unauthorized (401)
2.2.2.2Payment failed: Auth – Forbidden (403)
2.2.3.1Payment failed: Configuration – No balance
2.2.3.2Payment failed: Configuration – Limit issue
2.2.3.3Payment failed: Configuration – GEO/currency/MCC

3. User Activity (3.Y.Z.W)#

CodeDescription
3.0.0.1External payform shown
3.0.1.1Internal payform shown
3.0.1.2User visited page
3.0.1.3User left page
3.0.1.4User entered personal data
3.0.1.5User cancelled manually
3.0.1.6User clicked "Pay"
3.0.1.73DS verification failed
3.0.1.8OTP verification failed
3.0.1.9User left during verification
3.0.1.10User left during verification

4. Gateway Status (4.Y.Z.W)#

CodeDescription
4.0.1.1Processing: Server unavailable
4.0.1.2Processing: Invalid request
4.0.2.1Processing: Unauthorized (401)
4.0.2.2Processing: Forbidden (403)
4.1.0.0Payment successful
4.2.0.0Payment failed
4.2.1.1Issuer: Declined without reason
4.2.1.2Issuer: Card blocked
4.2.1.3Issuer: Card not supported
4.2.1.4Issuer: Card no balance
4.2.2.2Acquirer: Declined by antifraud

5. Gateway Callback (5.Y.Z.W)#

CodeDescription
5.X.1.0Callback: Status update — Success
5.X.2.0Callback: Amount update — Success
5.0.1.0Callback: Invalid signature
5.0.2.0Callback: Invalid payload

7. Merchant Callback (7.Y.Z.W)#

CodeDescription
7.X.0.0Merchant callback confirmed
Modified at 2025-07-30 08:48:05
Previous
Tech FAQ
Next
Integratins
Built with