Create Order with Payments

📘

NOTE: PCI Compliant merchants

If you are a PCI compliant merchant, you can combine Create Order API request with Payments API request in a single API request. The sample request is shown below:

curl --location --request POST 'https://api.juspay.in/txns' \
--header 'Authorization: Basic Auth of <your-api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'order.order_id=ord_1590759422' \
--data-urlencode 'order.amount=101550.00' \
--data-urlencode 'order.currency=INR' \
--data-urlencode 'order.customer_id=cst_1590759422' \
--data-urlencode 'order.return_url=https://merchant.in/payments' \
--data-urlencode 'merchant_id=<your-merchant-id>' \
--data-urlencode 'payment_method_type=CARD' \
--data-urlencode 'payment_method=VISA' \
--data-urlencode 'card_number=438628***8677' \
--data-urlencode 'card_exp_month=09' \
--data-urlencode 'card_exp_year=25' \
--data-urlencode 'name_on_card=***' \
--data-urlencode 'card_security_code=***' \
--data-urlencode 'save_to_locker=true' \
--data-urlencode 'redirect_after_payment=true' \
--data-urlencode 'format=json'