Yedpay

Description (Initialize Transaction)

Initialize Transactions (POST)

  • * This transaction will be closed after 5 minutes

End Point

https://api.yedpay.com/v1/transactions/precreate

Variable

Variable
# Name Type Description

Request Header

Request Header
# Key Value Description
1 Authorization Bearer {{access_token}} Login Token
2 Content-Type application/x-www-form-urlencoded x-www-form-urlencoded Format

Body

Body
# Name Type Description
1 store_id String Store ID
2 gateway_code String Gateway Code of the transaction
3 currency String Transaction currency
4 amount Numeric String Transaction Amount (Maximum 2 decimal places)
5 device_unique_id String Unique identifier of the device e.g. IMEI,UUID
6 disable_push_notification Boolean Determine whether push notification is disabled (1: true, 0: false)

Response

Table Information
# Name Type Description
1 success Boolean The request is received without error.
2 data Array Include transaction's information (id, user_id, company_id etc..)

Success Response - data

Table Information
# Name Type Description
1 id String Id of the transaction
2 user_id String Id of the user who create the transaction
3 company_id String Id of the Company
4 store_id String Id of the Store
5 gateway_id Integer Id of the Gateway used to Generate the transaction
6 gateway_sub_id Integer Id of gateway subtype, default 1
7 gateway_sub_name String Name of the gateway subtype
8 gateway_code String {{gateway_id}}_{{gateway_sub_id}}
9 barcode_id String Id of the Barcode uset to generate the transaction (only apply for alipay Global)
10 status String Status of the transaction
11 amount Float Amount of the transaction
12 currency String Currency of the transaction
13 charge String Total of charge fee for the transaction
14 refunded String Refunded Amount of the Transaction
15 refund_charge String Refund Charge of the Transaction
16 net String Net Amount of the Transaction
17 tips String Tips Amount of the Transaction
18 forex Double Forex
19 paid_at String Date when the transaction was paid "YYYY-mm-dd h:i:s"
20 can_settle_after String Date when the transaction balance will be settled "YYYY-mm-dd h:i:s"
21 is_balance_settled Boolean The transaction balance is settled or not
22 settled_at String Date when the transaction was settled "YYYY-mm-dd h:i:s"
23 transaction_id String Unique transaction identifier of Yedpay
24 reference_id String Transaction identifier of the Gateway Provider
25 payer String Email of the payer (Alipay Global)
26 buyer_id String Buyer identity (Alipay Global)
27 wallet_type String Wallet type of the transaction (Applicable for Alipay and WeChatPay)
28 extra_parameters String (optional) Custom information send by customer
29 custom_id String (optional) Custom Id Send By Customer
30 fixed_id String (optional) Id of the Fixed Code
31 refunded_at String Date when the transaction was Refunded "YYYY-mm-dd h:i:s"
32 created_at String Date when the transaction was created "YYYY-mm-dd h:i:s"
33 updated_at String Date when the was Updated "YYYY-mm-dd h:i:s"
34 expired_at String (optional) Date when the transaction Expire "YYYY-mm-dd h:i:s"
35 pin_key String (optional) PIN Key for pin encryption (Applicable for UnionPay POS and precreated transaction status)
36 _links Array Include Checkout and QRCode Links:
- checkout
- qrcode
- (alipay online) checkout_wap
- (alipay online) checkout_code
- (alipay online) qrcode_wap
37 cancellation_details Array (exists if status is cancelled) Information of cancellation (request_user_id: The User who sent request,
first_name: First name of the user,
last_name: Last name of the user
remark: reason of the sending request)
38 refund_details Array (exists if status is refunded) Information of refund (request_user_id: The User who sent request,
first_name: First name of the user,
last_name: Last name of the user
remark: reason of the sending request)
39 fail_details Array (exists if status is failed) Information of failed transaction (request_user_id: The User who sent request,
first_name: First name of the user,
last_name: Last name of the user
remark: reason of the sending request)

Example Success Response

            {
                "success": true,
                "data": {
                    "id": "xXxXxXxXxXXxXx",
                    "user_id": "xXxXxXxXxXXxXx",
                    "company_id": "xXxXxXxXxXXxXx",
                    "store_id": "xXxXxXxXxXXxXx",
                    "gateway_id": 1,
                    "gateway_sub_id": 1,
                    "gateway_sub_name": "Alipay",
                    "gateway_code": "1_1",
                    "barcode_id": "xXxXxXxXxXXxXx",
                    "status": "precreated",
                    "amount": "10.00",
                    "currency": "HKD",
                    "charge": 1.20,
                    "refunded": "0.00",
                    "refund_charge": "0.00",
                    "net": "9.75",
                    "tips": "0.00",
                    "forex": 1,
                    "paid_at": "2018-11-20 14:06:45",
                    "can_settle_after": "2018-11-21 00:00:00",
                    "is_balance_settled": true,
                    "settled_at": "",
                    "transaction_id": "xXxXxXxXxXXxXx",
                    "reference_id": "xXxXxXxXxXXxXx",
                    "payer": "",
                    "buyer_id": "",
                    "wallet_type": "",
                    "extra_parameters": "{\"extra_1\": \"value_1\", \"extra_2\": \"value_2\",  \"extra_3\": \"value_3\", \"extra_4\": \"value_4\"}",
                    "custom_id": "XxXxXxXxXxXxXxXxXx",
                    "fixed_id": "",
                    "refunded_at": "",
                    "created_at": "2018-11-20 14:06:45",
                    "updated_at": "2018-11-20 14:06:45",
                    "expired_at": "2018-11-21 14:06:45",
                    "_links": [
                        {
                            "rel": "checkout",
                            "href": "https://qr.alipay.com/xxxxxxxx"
                        },
                        {
                            "rel": "qrcode",
                            "href": "https://api.yedpay.com/v1/q/alipay/xxxxxxx"
                        }
                    ]
                }
            }
        

Error Response - data

Error Response - data
# Name Type Description
1 success Boolean False
2 message String Message of the Error
3 status Integer Code Status

Example Error Response

            {
                "success": false,
                "message": "Internal Error",
                "status": 500
            }
        

v1.61.15-20230523 © The Payment Cards Group Limited. All rights reserved.