# Create payment

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

POST https://connect-api.paytriot.co.uk/v0/payment/create_payment

# Parameters

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
merchant_id * string Merchant identifier given by Paytriot.
amount * number The transaction amount in the merchant's currency.
country * string Customer's country of sale country code (ISO-3166 alpha-2), use ["AR", "BR", "MX].
return_url * string URL where we should send the user at the end of the payment flow. User will return here regardless of status at the end of the flow (approved, rejected, cancelled, or pending).
live_mode* boolean Switch between live mode and test mode using this parameter.
payment_method_id string Payment method identifier: "bolbradesco", "pec", "rapipago", "pagofacil", "bankTransfer", "oxxo", "card", "pix".
card_statement_descriptor string The statement descriptor to be shown in the end consumer's card statement.
notification_url string Endpoint where we'll send / notify you of transaction updates.
user_id string User identifier that can be given to your customer or end user.
first_name string Customer's first name.
last_name string Customer's last name.
email string Customer's email.

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

# Example

# Sample request

curl -X POST https://connect-api.paytriot.co.uk/v0/payment/create_payment \
-H 'Content-Type: application/json' \
-d '{"merchant_id": "sdfsdf-234324-sdfdsfgsd", "country":"BR","amount":10,"user_id":"User","reference_id":"089308517","first_name":"user","last_name":"user","email":"user@paytriot.co.uk","payment_method_id": "card","live_mode": true}'

# Sample response

<iframe title="Paytriot payment page. Please dont refresh the page." frameborder="0"
	style="position: relative; height: 100%; width: 100%;"
	src="https://connect-api-links.paytriot.co.uk/O7arxe"></iframe>