Payments - Create[Create a mandates without confirm as true]
POST {{baseUrl}}/payments
To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture
Request Body
{"amount"=>6540, "currency"=>"USD", "capture_method"=>"automatic", "capture_on"=>"2022-09-10T10:11:12Z", "amount_to_capture"=>6540, "amount_capturable"=>6540, "customer_id"=>"cus_udst2tfldj6upmye2reztkmm4i", "email"=>"guest@example.com", "name"=>"John Doe", "phone"=>"999999999", "phone_country_code"=>"+65", "description"=>"Its my first payment request", "authentication_type"=>"no_three_ds", "payment_method"=>"card", "payment_method_data"=>{"card"=>{"card_number"=>"4242424242424242", "card_exp_month"=>"10", "card_exp_year"=>"35", "card_holder_name"=>"John Doe", "card_cvc"=>"123"}}, "statement_descriptor_name"=>"Juspay", "statement_descriptor_suffix"=>"Router", "metadata"=>{"udf1"=>"value1", "new_customer"=>"true", "login_date"=>"2019-09-10T10:11:12Z"}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |