Generate Payment Key

Author: Semaka 136 views

A payment-key may be generated by running the below curl request. For reference on other programming languages please see link for the preferd language.

				
					curl --location --request POST 'https://gateway.switch.tj/api/v1/payment-key' \
--header 'Authorization: Basic V2hvb3NoRGVtb0FQSTpmZGZsa2RmZXVlbzM4Mzk4' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: PHPSESSID=abk57kqs42fjpdfvv8a78ckfd7' \
--data-urlencode 'merchant_reference=12312312312' \
--data-urlencode 'amount=5.00' \
--data-urlencode 'error_url=https://url-to-your-success-page.co.za' \
--data-urlencode 'success_url=https://url-to-your-success-page.co.za' \
--data-urlencode 'cancel_url=https://url-to-your-success-page.co.za' \
--data-urlencode 'notify_url=https://url-to-your-success-page.co.za' \
--data-urlencode 'payment_type=credit_card'