Yedpay

Description (Create Online Payment Checkout Link)

Action to create a checkout link for Online Payment.(POST)

End Point

https://api.yedpay.com/v1/online-payment

Request Header

# Key Value Description
1 Authorization API-KEY {{api_key}} API Key
2 Content-Type application/x-www-form-urlencoded x-www-form-urlencoded

Body

# Name Type Description
1 amount Numeric String Transaction Amount (Maximum 2 decimal places)
2 currency String(3) Transaction currency (HKD)
3 return_url String(255) Redirect url when transaction is done
4 notify_url String(255) Endpoint to notify the transaction
*Only allowed HTTP and HTTPS ports (80 and 443) for notify_url
5 custom_id String(36) Unique ID Send By Customer, only letters and numbers, underscore and dash are accepted. Maximum length: 36
6 subject String (optional) Product Name of the online payment
7 gateway_code String (optional) Gateway(s) show on the page.
Format: {{gateway_id}}_{{gateway_sub_id}}
Example: 4_1 or 4_2 or 4_3(Alipay Online), 8_2 (WeChat Pay Online), 9_1 or 9_2 (UnionPay Online), 9_5 (UnionPay UPOP), 12_1 or 12_2 (VISA and Mastercard Online)
**Note: If this parameter is not present, the page will show all available gateways
8 wallet String (optional) (require if gateway_code = 4_1 or 4_2 or 4_3) Alipay Wallet to create the transaction
(Value: CN,HK)
9 expiry_time String (optional) Expiry Time of Online Payment in secords. (Range: 900 - 10800, i.e. 15 mins - 3 hours) (Default: 10800)
10 extra_parameters String (format: JSON)
(required if gateway_code is 8_3)
For Alipay app case, please refer to Alipay Documentation
For WeChat Pay, please refer to here Maximum Length: 6000
11 checkout_domain_id String (optional) Hash id of checkout domain
12 payment_data JSON String (optional)
Payment Data that will include in the payment page
(Card payment only, support `first_name`, `last_name`, `email`, `phone`, `billing_country`, `billing_city`, `billing_address1`, `billing_address2`, `billing_post_code`, `billing_state`)
e.g. {"first_name":"first","last_name":"last","email":"test@test.com","phone":"xxxxxxxx","billing_country":"HK","billing_city":"HK","billing_address1":"billing address 1","billing_address2":"billing address 2","billing_post_code":"000000","billing_state":"IT"}

Extra parameters (WeChat Pay APP)

# Name Type Description
1 appid* String Registered app id of the merchant in WeChat Pay system
* - required fields

Response

# Name Type Description
1 success Boolean Generate Online Payment Link Success or Fail
2 data Array Include all information (checkout_url etc...)

Success Response - data

# Name Type Description
1 token String Token of the online payment
2 expired_at String Expiry Time of the online payment link
3 checkout_url String Link of the online payment
4 redirect_url String (optional) Payment link of the gateway (exists if gateway_code is 4_1 or 9_5)
5 sdk_data Object (optional) parameters passed to SDK (exists if gateway_code is 4_3 or 8_3)
6 sdk_data_query_string String (optional) A query string which should be passed to Alipay SDK (exists if gateway_code is 4_3)

Example Success Response

        {
            "success": true,
            "data": {
                "token": "xxxxxx",
                "expired_at": "2019-03-12 16:39:26"
                "checkout_url": "xxxxxx"
            }
        }
        

Example Error Response

        {
            "success": false,
            "message": "This action is unauthorized.",
            "status": 403
        }
        

v1.66.0-20240415 © The Payment Cards Group Limited. All rights reserved.