Payments through API (Demo with Postman)
POST generate checkout link for make payment
https://mypay.pk/api/request
Headers
Accept | application/json |
Content-Type | application/json |
BODY formdata
Key | Value | Type | Description |
---|---|---|---|
private_key | ************************************************ | text | Private key provided by MyPay for Authentication. |
currency | PKR | text | Currencyin which payments are taken. |
purpose | Ticket Price | text | Purpose of payment. |
amount | 1000 | text | Amount to collect. |
order_id | 23 | value | Order id against the order payment will deduct. |
fallback_url | http://khilaade.mytm.pk/payment/ | value | Url to redirect after payment. |
customer_name | Hussain Shah | text | Name of customer who is paying. |
phone_no | 03468780000 | text | Phone no of customer. |
address_1 | Lahore | text | Address of customer. |
is_fallback | 1 | text | Fall back Url will be required on this flag. |
In body add private_key,order_id,currency,is_fallback,url,amount as key and their values from the credentials of merchant profile.

Checkout Page:

Success Response:

Failed:
