Credit Card

Posted :

in :

by :

Request address

POST: https://api.ttrpay.net/v1/transaction/create

Postman

Test account

Email: mid_demo@cashields.org
Password: Sandbox@123
Merchant-Key: d3JWyGxoVVPm0Q6k

Card sandbox:

Card numberExpiration date cvvStatus
424242424242424212 2027123success
400000000000101812 2027123failed
414141414141414112 2027123redirect

Request parameters

KeyTypeValueRequireDescription
product_namestringHosting test plan 1✔️The name of a specific product being sold or listed
customer_last_namestringlogan✔️Last name of customer
customer_first_namestringttrpay✔️First name of customer
customer_emailstringyour-mail@ttrpay.net✔️Email of customer
customer_phonestring212-555-9999✔️Number phone of customer. max: 20 charactor
total_pricedecimal9.00✔️The total amount of money in the order
merchant_ref_codestringorder-2052002✔️Order_id from Merchant System
pmethodstringCREDIT_CARD✔️required: CREDIT_CARD
currency_codestringEURoptional: USD, EUR. default USD
success_urlstringhttps://ttrpay.net/?ref=success_url✔️URL for redirect when payment success
failed_urlstringhttps://ttrpay.net/?ref=failed_url✔️URL for redirect when payment failed
ipn_urlstringhttps://test-webhook.ttrpay.net/✔️URL IPN of merchant
cardsstring/json{“ccnumber”:”4141414141414141″,”cvv”:”123″,”expmonth”:”12″,”expyear”:”2027″}✔️Credit card infomation
Card test here: Link
customer_ipstring123.123.123.123✔️Please provide your customer ip
billing_street1string123B Baker Street ✔️Billing Street 1 is the first line of billing address, such as street name and house number.
billing_postcodestringNW1 6XE ✔️Enter your billing postal code (ZIP code of billing address).
billing_statestringEngland✔️Billing State/Province
billing_citystringLondon✔️Enter the city of your billing address
billing_countrystringGB✔️Billing country

Result Paramerter

ParameterTypeDescription
codestringSuccess Code or Error Code. example: 00 => success, 03 => wailting OTP, 01 => failed
messagestringSuccess mesage or failed msg
transaction_idstringttrpay hashcode
payment_linkstringpaypal 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
  }
}

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
  }
}

Result failed:

{
  ‘status’ => false,
  ‘result’ => {
    ‘code’: “01”,
    ‘message’: “some error message”,
    ‘transaction_id’: “202412-17344912xxxx”,
    ‘payment_link’: “https://yoursite.com/wc-api/failed/”
  }
}

Webhook event: readmore

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *