Payments - Create

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", "confirm"=>true, "capture_method"=>"automatic", "capture_on"=>"2022-09-10T10:11:12Z", "amount_to_capture"=>6540, "customer_id"=>"StripeCustomer", "email"=>"guest@example.com", "name"=>"John Doe", "phone"=>"999999999", "phone_country_code"=>"+65", "description"=>"Its my first payment request", "authentication_type"=>"three_ds", "return_url"=>"https://google.com", "payment_method"=>"card", "payment_method_data"=>{"card"=>{"card_number"=>"4000000000003063", "card_exp_month"=>"10", "card_exp_year"=>"25", "card_holder_name"=>"joseph Doe", "card_cvc"=>"123"}}, "billing"=>{"address"=>{"line1"=>"1467", "line2"=>"Harrison Street", "line3"=>"Harrison Street", "city"=>"San Fransico", "state"=>"California", "zip"=>"94122", "country"=>"united states"}}, "shipping"=>{"address"=>{"line1"=>"1467", "line2"=>"Harrison Street", "line3"=>"Harrison Street", "city"=>"San Fransico", "state"=>"California", "zip"=>"94122", "country"=>"united states"}}, "statement_descriptor_name"=>"joseph", "statement_descriptor_suffix"=>"JS", "metadata"=>{"udf1"=>"value1", "new_customer"=>"true", "login_date"=>"2019-09-10T10:11:12Z"}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring