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

# Name Type Description

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

# 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 AmountMaximum 2 decimal places

Response

# Name Type Description
1 success Boolean Initialize Transaction Success or Fail
2 data Array Include transaction's information (id, user_id, company_id etc..)

Success Response - data

# Name Type Description
1 id String Transaction ID
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 Gateway sub ID
7 gateway_sub_name String Payment method of the transaction
8 gateway_code String Gateway code of the transaction
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 (Value = 'precreated' if success)
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 net String Net amount of the transaction
15 forex String Forex
16 paid_at String Date when the transaction was paid "YYYY-mm-dd h:i:s"
17 settled_at String Date when the transaction was settled "YYYY-mm-dd h:i:s"
18 transaction_id String Unique transaction identifier of Yedpay
19 reference_id String Transaction ID of the Gateway Provider
20 payer String Email of the payer (Alipay Global)
21 buyer_id String Buyer identity (Alipay Global)
22 wallet_type String Wallet type of the transaction (Applicable for Alipay and WeChatPay)
23 extra_parameters String (optional) Custom information send by customer
24 custom_id String (optional) Custom Id Send By Customer
25 fixed_id String (optional) Id of the Fixed Code
26 refunded_at String Date when the transaction was Refunded "YYYY-mm-dd h:i:s"
27 created_at String Date when the transaction was created "YYYY-mm-dd h:i:s"
28 updated_at String Date when the was Updated "YYYY-mm-dd h:i:s"

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": "",
                    "status": "precreated",
                    "amount": "10.00",
                    "currency": "HKD",
                    "charge": "0.00",
                    "net": "10.00",
                    "forex": 0,
                    "paid_at": "",
                    "settled_at": "",
                    "transaction_id": "156448136666091",
                    "reference_id": "",
                    "payer": "",
                    "buyer_id": "",
                    "wallet_type": "",
                    "extra_parameters": "",
                    "custom_id": "",
                    "fixed_id": "",
                    "refunded_at": "",
                    "created_at": "2019-07-30 18:09:26",
                    "updated_at": "2019-07-30 18:09:26"
                }
            }
        

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.29.1-20191003 © The Payment Cards Group Limited. All rights reserved.