# 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
# Header
| 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 | The statement descriptor to be shown in the end consumer's card statement. |
| 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 without dot(10USD => 1000). |
| orderCurrency * | string | ISO 4217 Numeric currency codes |
| 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 numeric codes |
| 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": "100010",
"apiKey":"c34cd4095f96df1b0459f31f1c004b7b6bbbae8ad42af845c246ce62b6d1127f",
"submerId":"202200",
"channel":"w600",
"desc":"Phone",
"attch":"123456",
"nonceStr":"adhfbwdje8",
"orderNo":"1232991381111902",
"orderAmount":"100",
"orderCurrency": 826,
"referenceId":"12334",
"address":"The test Building",
"firstName": "Ken",
"lastName":"Adams",
"phone":"00060593303",
"email" : "info@paytriot.co.uk",
"zip":"UB83TB",
"state":"Uxbridge",
"city": "london",
"country":826,
"cardName":"ken Adams",
"cardNo":"41111111111111111",
"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":"123.123.123.123",
"live_mode":true,
"is_3DS": false
}'
# Sample response
{
"code": 200,
"msg": "init", //init, approved, declined
"time": "2022-10-4 13:31:40",
"is_3ds": "1",
"redirectUrl": "https://pay-links.paytriot.co.uk/?aWQ9MTIzMjk5MTM4MTExMTkwMiZjb3VudHJ5PTgyNiZjdXJyZW5jeT04MjYmYW1vdW50PTEwMCZjYXJkTm89NTM1NDU2ODA5MTQ0ODYyOCZtb250aD0mlvdC1nbG9iYWwucGF5dHJpb3QuY28udWsvYWNzPTEmcmVkaXJlY3Q9aHR0cHM6Ly9wYXl0cmlvdC5jby51aw==",
"status": 200,
"merId": "100101",
"orderCurrency": 826,
"orderAmount": "100",
"orderNo": "1232991381111902",
"paymentId": "1232991381111902"
}
# Sample Callback
{
"code": "65803", //Response codes provided seperately ask support
"msg": "3DS DECLINED", //Response codes provided seperately ask support
"time": "2022-10-04 14:35:30",
"is_3ds": "1",
"status": "65803", //Response codes provided seperately ask support
"merId": "100101",
"orderCurrency": "826",
"orderAmount": "100",
"orderNo": "12334",
"paymentId": "t9cxmoei6m"
}
← Errors