5. Pay In Query Status

5.1 Pay In Query Status Request

Use this API to view the status of multiple 'Pay In' invoices.

Header Info:

  • Include merchantId and hash for security and approval.

Warning:

  1. Wait for the API's automatic confirmation before using. This ensures you get the final status, not a temporary one. The wait time might change based on your payment choice.

  2. To prevent delays, send multiple invoice IDs in one go, instead of many separate requests with one ID each.

Sample Header:

code{
  merchantId: 123456,
  hash: "xxxxxxxxx",
  Content-Type: "application/json"
}

Retrieve a List of Transactions Statuses and IDs from a specific Merchant by List of Merchant's Invoices IDs

post
Header parameters
merchantIdstringOptional
hashstringOptional
Bodystring[]
string[]Optional
Responses
200

Success

post
/1.0/Go/Transaction
POST /1.0/Go/Transaction HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 8

[
  "text"
]
[]

Specification for Request Parameters

Parameter
Type
Description
Mandatory

merchantId

String

Merchant unique ID

Yes

hash

String

Request hash to avoid fraud (see Appendix 1)

Yes

merchantInvoiceId

String

List of Merchant’s Pay In unique identifiers

Yes

To create the seed string for hash generation, combine:

  1. Merchant's ID

  2. Merchant's Secret

Refer to Appendix 1 for details on generating the hash.

Example: If your Merchant's ID is 34567 and the Secret is abcdef, your seed string becomes: Seed string = 34567abcdef

Important

Always keep the Merchant’s Secret confidential. It's crucial to ensure others can't generate a valid hash.

5.2 Pay In Query Status Response

Each response provides details for every Merchant Invoice ID you ask about. If an Invoice ID isn't recognized, its status will be "NotFound". This means there hasn't been any transaction with that specific ID.

Examples:

  1. A recognized Invoice:

{
  "transactionId": 31,
  "merchantInvoiceId": "ABC777",
  "status": "Verified",
  "sign": "878F6A3891313521128EE1EB03984A1A9B94EAE9F240",
  "amount": 222.60,
  "customerEmail": "[email protected]",
  "liquidationDate": "2019-02-25"
}
  1. An unrecognized Invoice:

{
  "transactionId": 0,
  "merchantInvoiceId": "ABD778",
  "status": "NotFound",
  "sign": "878F6A389131E58AE25210CE335A1A9BCB594EAE9F2",
  "amount": 0,
  "customerEmail": null,
  "liquidationDate": null
}
Parameter
Type
Description

transactionId

String

Pay4Fun’s ID (0 = failed pre-auth; no transaction in Pay4Fun; consider as failed)

merchantInvoiceId

String

Merchant’s Transaction ID

status

String

Pay in transaction status

sign

String

Hash sign for veracity confirmation

amount

Decimal

Transaction amount

customerEmail

String

Customer’s email

liquidationDate

String

Date when amount will transfer to Merchant’s balance

Understanding Pay-in Transaction Statuses:

  • PENDING: Awaiting customer payment.

  • LIQUIDATION: Successful transaction. Funds will move to Merchant's Balance on the stated liquidation date.

  • VERIFIED or RELEASED: Successful transaction. Funds have been added to Merchant's Balance.

  • DECLINED: Transaction was denied and cannot be reversed.

Generating the Seed String:

The 'sign' in the response helps verify the transaction's authenticity. Here's how to make the seed string for hash generation:

  1. Use Merchant's ID.

  2. Add Merchant's Invoice ID.

  3. Append transaction amount, including cents (but without any separators).

  4. Add the transaction status.

Example: Given:

  • Merchant's ID: 34567

  • Invoice ID: ABC777

  • Transaction amount: $10.00

  • Status: Verified

The seed string becomes: Seed string = 34567ABC7771000Verified

Note on Transaction Statuses:

  • Successful Transactions: Only those with Verified, Released, or Liquidation statuses.

  • Unsuccessful Transactions: Any status other than the above.

5.3 List of Possible Errors

HTTP Status Code 400 (Bad Request):

  • MERCHANT_NOT_FOUND: This error occurs when the specified merchant cannot be found. It's essential to provide a valid merchant identifier to process the transaction.

  • INVALID_MODEL: The model provided in the request is invalid. Ensure that the model conforms to the required structure and includes all necessary information.

  • PROCESSING_ERROR: An error occurred during the processing of the transaction. It's advisable to review the request and try again.

Last updated

Was this helpful?