Table of Contents
ToggleRequest address
POST: https://api.ttrpay.net/v1/transaction/create
Test account
Email: mid_demo@cashields.org
Password: Sandbox@123
Merchant-Key: d3JWyGxoVVPm0Q6k
Card sandbox:
| Card number | Expiration date | cvv | Status |
|---|---|---|---|
| 4242424242424242 | 12 2027 | 123 | success |
| 4000000000001018 | 12 2027 | 123 | failed |
| 4141414141414141 | 12 2027 | 123 | redirect |
Request parameters
| Key | Type | Value | Require | Description |
|---|---|---|---|---|
| product_name | string | Hosting test plan 1 | ✔️ | The name of a specific product being sold or listed |
| customer_last_name | string | logan | ✔️ | Last name of customer |
| customer_first_name | string | ttrpay | ✔️ | First name of customer |
| customer_email | string | your-mail@ttrpay.net | ✔️ | Email of customer |
| customer_phone | string | 212-555-9999 | ✔️ | Number phone of customer. max: 20 charactor |
| total_price | decimal | 9.00 | ✔️ | The total amount of money in the order |
| merchant_ref_code | string | order-2052002 | ✔️ | Order_id from Merchant System |
| pmethod | string | CREDIT_CARD | ✔️ | required: CREDIT_CARD |
| currency_code | string | EUR | optional: USD, EUR. default USD |
|
| success_url | string | https://ttrpay.net/?ref=success_url | ✔️ | URL for redirect when payment success |
| failed_url | string | https://ttrpay.net/?ref=failed_url | ✔️ | URL for redirect when payment failed |
| ipn_url | string | https://test-webhook.ttrpay.net/ | ✔️ | URL IPN of merchant |
| cards | string/json | {“ccnumber”:”4141414141414141″,”cvv”:”123″,”expmonth”:”12″,”expyear”:”2027″} | ✔️ | Credit card infomation Card test here: Link |
| customer_ip | string | 123.123.123.123 | ✔️ | Please provide your customer ip |
| billing_street1 | string | 123B Baker Street | ✔️ | Billing Street 1 is the first line of billing address, such as street name and house number. |
| billing_postcode | string | NW1 6XE | ✔️ | Enter your billing postal code (ZIP code of billing address). |
| billing_state | string | England | ✔️ | Billing State/Province |
| billing_city | string | London | ✔️ | Enter the city of your billing address |
| billing_country | string | GB | ✔️ | Billing country |
Result Paramerter
| Parameter | Type | Description |
|---|---|---|
| code | string | Success Code or Error Code. example: 00 => success, 03 => wailting OTP, 01 => failed |
| message | string | Success mesage or failed msg |
| transaction_id | string | ttrpay hashcode |
| payment_link | string | paypal payment link, or failed link |
Result success:
<!– Success create paypal payment link you need to redirect your page to payment_link –>
{
“status”: true,
“result”: {
“code”: “00”, <!– code equal 00 is successfully –>
“message”: “Create paylink successfully”,
“transaction_id”: “202412-17344912xxxx”,
“payment_link”: null
}
}
“status”: true,
“result”: {
“code”: “00”, <!– code equal 00 is successfully –>
“message”: “Create paylink successfully”,
“transaction_id”: “202412-17344912xxxx”,
“payment_link”: null
}
}
Result 3DS:
{
‘status’: true,
‘result’: {
‘code’: “03”,
‘message’: ‘Redirect 3ds url’,
‘url’: “https://…”,
‘transaction_id’: “202412-17344912xxxx”,
‘payment_link’: “receipt url or something” //not important in this case
}
}
‘status’: true,
‘result’: {
‘code’: “03”,
‘message’: ‘Redirect 3ds url’,
‘url’: “https://…”,
‘transaction_id’: “202412-17344912xxxx”,
‘payment_link’: “receipt url or something” //not important in this case
}
}
Result failed:
{
‘status’ => false,
‘result’ => {
‘code’: “01”,
‘message’: “some error message”,
‘transaction_id’: “202412-17344912xxxx”,
‘payment_link’: “https://yoursite.com/wc-api/failed/”
}
}
‘status’ => false,
‘result’ => {
‘code’: “01”,
‘message’: “some error message”,
‘transaction_id’: “202412-17344912xxxx”,
‘payment_link’: “https://yoursite.com/wc-api/failed/”
}
}

Leave a Reply