4. Pay Out Query Status

4.1 Payout Query Status Request

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/GoOut/Transaction
POST /1.0/GoOut/Transaction HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 8

[
  "text"
]
{
  "code": 200,
  "message": "success"
}

IMPORTANT !

We strongly recommend do not use this feature before you have received the automatic confirmation request from this API. Otherwise, you may receive an inaccurate intermediary status while the transaction is in processing. The response time for the automatic confirmation request may vary depending on the payment method selected.

Consider to send just one batch with several Invoice ids instead of sending several batches, all at the same time, with just one Invoice id each, to avoid blockages!

4.2 Request Parameter Specification

Parameter
Type
Description
Mandatory

merchantId

String

Merchant unique ID

yes

hash

String

Request hash to avoid fraud

yes

merchantInvoiceId

String

List of Merchant’s PayOut unique identifiers

yes

4.3 Query Status Hash Seed String

Concatenate the following information, in that order, to obtain the seed string for hash generation for PayOut Query Status requests (check Appendix – Generating the Hash section):

• Merchant’s ID

• Merchant’s secret Assuming merchant’s Id is 34567 and merchant’s secret is “abcdef”, the seed string for hash generation would be:

Seed string = 34567abcdef

IMPORTANT

The Merchant’s secret should be kept safe because is the secret factor that prevents others to generate valid hash.

4.4 Payout Query Status Response

4.4.1 Response Parameter Specification

Parameter
Type
Description

transactionId

String

Pay4Fun Transaction ID (A value of zero means the process has failed in preauthentication steps and no transaction was created in the Pay4Fun system; you should consider your transaction as failed)

merchantInvoiceId

String

Merchant’s Transaction ID

status

String

PayOut transaction status

sign

String

Hash sign to allow veracity confirmation

amount

Decimal

Transaction amount

customerEmail

String

Customer’s e-mail

liquidationDate

String

Date the transaction’s amount was effectively transferred from Merchant’s available balance.

4.4.2 Response Sample

Notice that the response will contain information regarding any Merchant Invoice ID present in the request, even if this ID hasn't been found! In those cases, the Status will be NotFound which means there's no transaction related to that specific Merchant Invoice ID. The response for the PayOut Query Status request is like below:

[
    {
        "transactionId": 35441,
        "merchantInvoiceId": "ABC777",
        "status": "Verified",
        "sign": "878F6A3891313521128EE1EB03984A1A9B94EAE9F240",
        "amount": 222.60,
        "customerEmail": "[email protected]",
        "liquidationDate": "2019-02-25"
    },
    {
        "transactionId": 0,
        "merchantInvoiceId": "ABD778",
        "status": "NotFound",
        "sign": "878F6A389131E58AE25210CE335A1A9BCB594EAE9F2",
        "amount": 0,
        "customerEmail": null,
        "liquidationDate": null
    }
]

Regarding the Pay Out transaction’s status, you should consider the following:

• VERIFIED: transaction was successfully processed and the amount debited from Merchant’s Available Balance;

• DECLINED: transaction was irreversible declined;

4.4.3 About the sign parameter

The sign parameter contained within the response is built as the following description: Consider a Transaction amount of 10.00 USD related to the merchant’s invoice ID ABC777.

Assuming merchant’s ID is 34567 and transaction status is Verified, the seed string for hash generation would be (in that order):

  1. merchant’s ID;

  2. merchant’s invoice ID ;

  3. transaction’s amount with cents;

  4. transaction’s status;

Seed string = 34567ABC7771000Verified

IMPORTANT

Only Transactions with Verified statuses should be considered as successfully processed. Transactions with Pending statuses will be successful or unsuccessful after processing. Any other status indicates unsuccessful

4.1 List of Possible Errors

  • HTTP Status Code 400 (Bad Request):

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

    • MERCHANT_NOT_FOUND: The specified merchant was not found. Ensure that a valid merchant identifier is provided.

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

  • HTTP Status Code 503 (Service Unavailable):

    • Retry-After {Datetime}: The service is currently unavailable. It's advisable to retry the transaction after the specified datetime.

  • HTTP Status Code 200 (Success):

    • This status code indicates that the transaction was processed successfully.

  • HTTP Status Code 401 (Unauthorized):

    • merchant_not_authorized: The merchant is not authorized to perform the requested action. Verify the merchant's credentials and permissions before retrying the transaction.

Last updated

Was this helpful?