# Create payment

Charge a customer in a specific country using one of the payment methods available for that country.

POST https://paytriot-global.paytriot.co.uk/payment/create_payment

# Parameters

Parameter Type Description
Content-Type string application/json

# Body

Parameter Type Description
MID * string Merchant identifier given by Paytriot.
apiKey * string api key provided by Paytriot.
submerId * string sub merchant Id provided by Paytriot.
channel * string channel provided by Paytriot.
desc * string Description of the product.
attch* string Product sku
nonceStr * string Randomly generated strings MAX 32
orderNo * string Merchant's generated ID.
referenceId * string Merchant's generated reference ID.
orderAmount * number The transaction amount in the merchant's currency in two decimal places (10USD => 10.00).
orderCurrency * string 1 => USD
address string Billing details address
firstName * string Customer's first name.
lastName * string Customer's last name.
phone * string Billing person phone
email * string Customer's email.
zip * string Biller zip code
state * string The province where the biller is located
city * string The city where the biller is located
country * string ISO 3166-1 abbrevations
returnUrl string Return address in real time
remark string The statement descriptor to be shown in the end consumer's card statement.
notifyUrl * string Refer to the asynchronous notification interface
cardName * string Cardholder Name Note: Last name and first name, separated by a space
cardNo * string Card number: 14-16 digits
cvv * string Cvv/Captcha: 3-4 digits
expMonth * string Validity month (2 digits): Format: MM
expYear * string Valid year (4 digits): Format: YYYY
website* string Transaction URL domain name
cardType * string Card Type (Visa,MC)
payBy string "card" /For Alternative payment options please contact support
redirectUrl * string customer redirect url address after 3DS
ip* string ip address
live_mode* string Switch between live mode and test mode using this parameter.
is_3DS string is transaction 2DS or 3DS (beta)

Please note that all the fields marked with asterisks (*) are mandatory.

# Example

# Sample request

curl -X POST https://paytriot-global.paytriot.co.uk/payment/create_payment\
-H 'Content-Type: application/json' \
-d '{
  "MID": "1611653",
  "apiKey":"c34cd4095f96df1b0459f31f1c004b7b6bbbae8ad42af845c246ce62b6d1127f",
  "submerId":"202210",
  "channel":"w600",
  "desc":"Phone",
  "attch":"123456",
  "nonceStr":"adhfbwdje8",
  "orderNo":"12329913899933902",
  "orderAmount":"1.3",
  "orderCurrency": "1",
  "referenceId":"12334",
  "address":"The test Building",
  "firstName": "Ken",
  "lastName":"Adams",
  "phone":"00060593303",
  "email" : "info@paytriot.co.uk",
  "zip":"123456",
  "state":"Uxbridge",
  "city": "london",
  "country":"GB",
  "cardName":"ken Adams",
  "cardNo":"4387751111111111",
  "cvv":"123",
  "expMonth":"12",
  "expYear":"2024",
  "website":"www.google.com",
  "cardType":"VISA",
  "payBy":"card",
  "notifyUrl":"https://paytriot-global.paytriot.co.uk/acs=1",
  "redirectUrl":"https://paytriot.co.uk",
  "ip":"192.168.14.144",
  "live_mode":false,
  "is_3DS": false
}'

# Sample response

{
    "code": "553",
    "msg": "No details",
    "time": "2022-11-2 15:22:45",
    "is_3ds": "1",
    "redirectUrl": "https://connect-api-links.paytriot.co.uk/X3yucc",
    "status": "553",
    "merId": "3724872",
    "orderCurrency": "1",
    "orderAmount": "1.00",
    "orderNo": "12329913899933902",
    "paymentId": "147"
}
}

# Sample Callback

"YOUR ENDPOINT?reply_code=000&reply_desc=SUCCESS&trans_id=46942&trans_date=7%2F24%2F2022+5%3A13%3A44+PM
&trans_amount=29&trans_currency=1&trans_order=178389324789324&merchant_id=YOURCOMPANYNUMBER&client_fullname=penaud axdfel&client_phone=330634207244&client_email=sdfdsf@gmail.com&payment_details=Mastercard .... 0000&trans_type=0&debit_company=146&debrefnum=2NPrJNCA&bin_country=FR&pm=25&StorageID=0&ExpMonth=09&ExpYear=24&signature=E28DYI1W4DkCoQE7KCcbiLY94JoMyiCUauqy1M0gclQ%3D"