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

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

# 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

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

Example Response

        {
        	"success": true,
        	"request_type": "purchase",
        	"transaction": {
        		"id": "xxxxxxxxxxxxxxx",
        		"transaction_id": "xxxxxxxxxxxxxxxxx",
        		"custom_id": "xxxxxxxxxxxxxxxxxx",
        		"payment_method": "VISA",
        		"currency": "HKD",
        		"amount": "5.00",
        		"status": "paid",
        		"paid_at": "2018-07-12 16:00:43",
        		"refunded_at": null,
        		"updated_at": "2018-07-12 16:07:56",
        		"extra_parameters": {
        			"customer_name": "Chan Tai Man",
        			"phone": "98989898"
        		}
        	},
        	"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

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

Example

            success
        

v1.30.1-20191128 © The Payment Cards Group Limited. All rights reserved.