APIs >Cart - Process Payment

Last updated on: May 22, 2019

20

Header

KeyValue
Content-Typeapplication/json
App-Namei.e. Ezpizee Store Front
Access-Tokeni.e. ace48c90d95dcd644b77395e29efa0accf326e5e
User-Namei.e. demo1

Form Data

KeyValue
itemi.e. {"store_id":"1","payment_service_id":"paypal","payment_type":"credit_card","amount":"5","card":{"type":"visa","number":"4032036932360264","expire_month":"03","expire_year":"2024","cvv2":"123","first_name":"Chung Yong","last_name":"Eom"},"payment_method_id":1}

Response

{"success":true,"statusCode":200,"message":"Successfully process.","data":{"intent":"sale","payer":{"payment_method":"credit_card","funding_instruments":[{"credit_card_token":{"credit_card_id":"CARD-61F84642XV124210VLTS2IZA","last4":"0264","type":"visa","expire_month":"3","expire_year":"2024"}}]},"transactions":[{"amount":{"total":"413.91","currency":"USD","details":{"subtotal":"413.91"}},"invoice_number":"5ce5a46496d50","related_resources":[{"sale":{"id":"8NK40444TK352325T","create_time":"2019-05-22T19:35:01Z","update_time":"2019-05-22T19:35:08Z","amount":{"total":"413.91","currency":"USD"},"state":"completed","parent_payment":"PAY-5FU04249647764918LTS2IZI","links":[{"href":"https:\/\/api.sandbox.paypal.com\/v1\/payments\/sale\/8NK40444TK352325T","rel":"self","method":"GET"},{"href":"https:\/\/api.sandbox.paypal.com\/v1\/payments\/sale\/8NK40444TK352325T\/refund","rel":"refund","method":"POST"},{"href":"https:\/\/api.sandbox.paypal.com\/v1\/payments\/payment\/PAY-5FU04249647764918LTS2IZI","rel":"parent_payment","method":"GET"}],"fmf_details":[],"processor_response":{"avs_code":"Y","cvv_code":"X"}}}]}],"id":"PAY-5FU04249647764918LTS2IZI","create_time":"2019-05-22T19:35:01Z","update_time":"2019-05-22T19:35:08Z","state":"approved","links":[{"href":"https:\/\/api.sandbox.paypal.com\/v1\/payments\/payment\/PAY-5FU04249647764918LTS2IZI","rel":"self","method":"GET"}]}}

Notes

{order_id} is integer, obtained from the Checkout API.