Yedpay

Description (Asynchronized Notification)

Asynchronized response notifying whether the transaction is successful/fail. (POST)

When the transaction has been finished, asynchronized notification will be sent to the URL input during precreate transaction (notify_url)

Retry Pattern

When the error occurs or no successful response is received, the server will retry sending async. notifications with delay time as below

As the notification may be sent more than once,please make sure that the system will only handle the same notification ONCE

Retry Pattern
Number of retry Delay time
1, 2 15 seconds
3 30 seconds
4 3 minutes
5 10 minutes
6 20 minutes
7, 8, 9 30 minutes
10 1 hour
11, 12, 13 3 hours
14, 15 6 hours

Response

Response
# Name Type Description
1 success Boolean Show whether the transaction request is success(true) or fail(false)
2 request_type String Show the request type
  1. purchase: Precreate/create transaction
3 transaction Array Transaction detail
4 nonce_str String Random String (64 characters)
5 sign String Signature generated using the algorithm (See detail)
6 sign_type String Algorithm for generating signature of the response
(Recently support HMAC_SHA256 ONLY)

Transaction Detail

Transaction Detail
# Name Type Description
1 id String Id of the transaction
2 transaction_id String Transaction ID
3 gateway_code String Gateway Code of the transaction
4 custom_id String Transaction ID sent by client
5 payment_method String Payment Method of the transaction
6 currency String Transaction curreny
7 amount String Transaction amount (2 decimal places)
8 status String Transaction status
9 paid_at Date Time Time the transaction was paid (format: YYYY-mm-dd h:i:s)
10 refunded_at Date Time Time the transaction was refunded (format: YYYY-mm-dd h:i:s)
11 updated_at Date Time Last update time of the transaction (format: YYYY-mm-dd h:i:s)

Example Response

        success=1&request_type=purchase&transaction[id]=xxxxxxxxxxxxxxx&transaction[transaction_id]=xxxxxxxxxxxxxxxxx&transaction[gateway_code]=xxxxxxxxxxxxxxxxx&transaction[custom_id]=xxxxxxxxxxxxxxxxxx&transaction[payment_method]=VISA&transaction[currency]=HKD&transaction[amount]=5.00&transaction[status]=paid&transaction[paid_at]=2018-07-12 16:00:43&transaction[updated_at]=2018-07-12 16:07:56&nonce_str=1pt0Elsxiww0BSrqrE5PYqKiQYnRLKCzfZZ3y3SMvBHuDBFuz4MDbyEF410yyj4b&sign_type=HMAC_SHA256&sign=42bc1ba8efe2816c54ec989645ed5cda84e7b272c3fe60a343e87c81e40793b0
        

Successful Return

When the merchant receives correct notification, the successful response should be returned to the server.(e.g. using die('success') in PHP)
Otherwise, the notification will be sent again using retry pattern

Successful Return
# Name Type Value
1 header String text/plain
1 content String success

Example

            success
        

v1.66.2-20240423 © The Payment Cards Group Limited. All rights reserved.