Yedpay

Description (Card Decision)

Submit card final decision. Card can reject or accept the transaction base on the emv_reply. (PUT)

End Point

https://api.yedpay.com/v1/transactions/{{id_transaction}}/card-decision

Variable

# Name Type Description
1 is_success String true or false

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

Response

# 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

# 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 forex String Forex
15 paid_at String Date when the transaction was paid "YYYY-mm-dd h:i:s"
16 settled_at String Date when the transaction was settled "YYYY-mm-dd h:i:s"
17 transaction_id String Id of the transaction
18 payer String Email of the payer (Alipay Global)
19 extra_parameters String (optional) Custom information send by customer
20 custom_id String (optional) Custom Id Send By Customer
21 fixed_id String (optional) Id of the Fixed Code
22 refunded_at String Date when the transaction was Refunded "YYYY-mm-dd h:i:s"
23 created_at String Date when the transaction was created "YYYY-mm-dd h:i:s"
24 updated_at String Date when the was Updated "YYYY-mm-dd h:i:s"
25 expired_at String (optional) Date when the transaction Expire "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,
                    "barcode_id": "xXxXxXxXxXXxXx",
                    "status": "paid",
                    "amount": "10.00",
                    "currency": "HKD",
                    "charge": 1.20,
                    "forex": 1,
                    "paid_at": "",
                    "settled_at": "",
                    "transaction_id": "251415799855257",
                    "payer": "",
                    "extra_parameters": "{\"old_macdonald\": \"had a farm\", \"chorus_1\": \"E I E I O\",  \"and_on_his_farm\": \"he had a cow\", \"chorus_2\": \"E I E I O\"}",
                    "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/0ax03657vsedczja7yru8025"
                        },
                        {
                            "rel": "qrcode",
                            "href": "https://api.yedpay.com/v1/q/alipay/aHR0cHM6Ly9xci5hbGlwYXkuY29tL2JheDAzNjI3b3NlZHN6amE3eXJ1ODAyNA__"
                        }
                    ]
                }
            }
        

Error Response - data

# Name Type Description
1 success Boolean False
2 message String Message of the Error
3 status Integer Code Status
4 errors Array List of error

Example Error Response

            {
                "success": false,
                "message": "Could not create resource",
                "errors": [
                    {
                        "code": 422,
                        "field": "status",
                        "message": "The transaction status is invalid."
                    }
                ],
                "status": 422,
            }
        

v1.29.1-20191003 © The Payment Cards Group Limited. All rights reserved.