# Create payment
Charge a customer in a specific country using one of the payment methods available for that country.
POST https://pay-api.paytriot.co.uk/payment/create_payment
# Parameters
# Header
| Parameter | Type | Description |
|---|---|---|
| Content-Type | string | The value used to sign the request must match the value sent in the request headers. If the Content-Type header is absent from the request, omit it from the signature |
# Body
| Parameter | Type | Description |
|---|---|---|
| merId * | number | Merchant ID provided by paytriot |
| submerId * | number | sub Merchant ID provided by paytriot |
| orderAmt * | number | The transaction amount in the merchant's currency. |
| currency * | string | Currency (0:CNY,1:USD,2:EUR,3:GBP,4:HKD,5:JPY,6:AUD,7:CAD,8:SGD) |
| orderId * | string | Merchant's generated ID. |
| desc * | string | The statement descriptor to be shown in the end consumer's card statement. |
| notifyUrl * | string | Callback Address |
| email * | string | Customer's email. |
| mob * | string | Billing person phone |
| cardName * | string | Cardholder Name Note: Last name and first name, separated by a space |
| cardType * | string | Card Type (0:Visa,1:MasterCard,2:AMEX,3:JCB) |
| billAddress * | string | Billing details address |
| billCountry * | string | Customer's country of sale country code (ISO-3166 alpha-2), use ["AR", "BR", "MX] address |
| billFirstName * | string | Customer's first name. |
| billLastName * | string | Customer's last name. |
| billCity * | string | The city where the biller is located |
| billState * | string | The province where the biller is located |
| billZip * | string | Biller zip code |
| cardNo * | string | Card number: 14-16 digits |
| cardCvv * | string | Cvv/Captcha: 3-4 digits |
| cardDate * | string | Payment card expiration date |
| nonceStr * | string | Randomly generated strings MAX 32 |
| channel* | string | Transaction URL domain name |
| attch* | string | Product sku |
| ip* | string | ip address |
| live_mode* | string | Switch between live mode and test mode using this parameter. |
Please note that all the fields marked with asterisks (*) are mandatory.
# Example
# Sample request
curl -X POST https://pay-api.paytriot.co.uk/payment/create_payment \
-H 'Content-Type: application/json' \
-d '{
"merId":"2020200",
"submerId" : "202260",
"orderId":"165195782730404502553",
"orderAmt":"10.00",
"channel":"uat",
"currency":"2",
"cardType":"1",
"cardNo":"4111111111111111",
"cardDate":"202512",
"cardCvv":"123",
"cardName":"test name",
"desc":"phone",
"attch":"100234",
"mob":"555-5555",
"email":"paytriot@test.com",
"billFirstName": "Ken",
"billLastName": "Adams",
"billAddress": "Address",
"billCity": "City",
"billState": "State",
"billCountry": "UK",
"billZip": "12345",
"ip":"123.123.123.123",
"notifyUrl":"https://api.notify.com/notify",
"nonceStr":"XLtc4dzQslfq9JyaTAN50hKeoj7ZDBUH",
"live_mode" : true
}'
# Sample response
{
"code": 1,
"msg": "Payment Successful",
"time": "1654077738",
"data": {
"paymsg": "Submitted successfully",
"orderno": "165167375997273045",
"sysorderno": "165407778842719483"
}
}