Onramp API Integration.
Orders
Create Order Onramp
2 min
tab examples url https stg api onmeta in v1 orders create name create order method post request pathparameters queryparameters headerparameters kind required name x api key type string children description api key from dashboard kind required name authorization type string children description bearer authtoken bodydataparameters kind required name buytokensymbol type string description example usdc kind required name chainid type number children description example 80001 polygon testnet chain id kind required name fiatcurrency type string children description example inr kind required name fiatamount type number children description example 100 kind required name buytokenaddress type string children description example 0x9c3c9283d3e44854697cd22d3faa240cfb032889 kind required name receiveraddress type string children description example 0xcdf10bc7a1fae391ff18f4c220ace912547971cc kind required name paymentmode type string children description example inr upi this is supported paymentmode code from supported currency endpoint ninr imps for imps ninr neft for neft kind optional name metadata type object children description datatype json object n nexample n n metadata json stringify n userid abcxxx n username user n n nnote metadata object should be set as key value pairs of strings only name upiid kind required type object description upi id object required only for upi orders children name upiid kind optional type string description upi id payment will be made from name name kind optional type string description name of the bank linked to upi id name bankdetails kind required type object description linked bank account of the user only required for imps neft orders children name accountname kind optional type string description account name in full name accountnumber kind optional type string description bank account number name ifsc kind optional type string description bank branch ifsc code formdataparameters results languages id sdoxyhdser7cpc7e3j ae code n success true n data n orderid 989073230 n pgorderid 1212121 n upicode n redirect actions n qr checkout string upi pay?pa sample upi pn abhibha tr 12g3 am 100 00 tn 645bc6387581a1d780 n deeplinks n n name phonepe n url phonepe pay?pa sample upi pn abhibha am 100 00 cu inr tn 645bc63870aed00581a1d780 n imageurl https ik imagekit io z3vwasz5xwz meta widget payment icons phonepe 53ukywiqw\ svg n n n name google pay n url tez upi pay?pa sample upi pn abhibha am 100 00 cu inr tn 645bc63870aed00581a1d780 n imageurl https ik imagekit io z3vwasz5xwz meta widget payment icons gpay cqioypphf svg n n n name paytm n url paytmmp pay?pa yap124664 equitas pn abhibha am 100 00 cu inr tn 645bc63870aed00581a1d780 n imageurl https ik imagekit io z3vwasz5xwz meta widget payment icons paytm owarcqfdy svg n n n name others n url upi pay?pa yap124664 equitas pn abhibha tr 12g3 am 100 00 tn 645bc63870aed00581a1d780 n imageurl https ik imagekit io z3vwasz5xwz meta widget payment icons bhim t366jhpdh svg n n n name qr n url upi pay?pa onmeta upi pn abhibha tr 12g3 am 100 00 tn 645bc63870aed00581a1d780 n imageurl https ik imagekit io z3vwasz5xwz meta widget payment icons bhim t366jhpdh svg n n n n n error n language 200 customlabel id u o5gvrtpwtuwnnuqiowg code n success false n error n code 400 n message bad request n n language 400 customlabel id cbb2gm5bivscucq vphse code n success false n error n code 401 n message unauthorized to access n n language 401 customlabel selectedlanguageid sdoxyhdser7cpc7e3j ae examples languages id wbuo qnrt9geewf3crmt1 language curl code curl location request post https stg api onmeta in v1 orders create n header accept application json n header content type application json n data raw buytokensymbol string chainid number fiatcurrency string fiatamount number buytokenaddress string receiveraddress string paymentmode string metadata object upiid object bankdetails object customlabel id w6kyfejetsuv0mt6idtus language nodejs code var request require request ; nvar options n method post n url https stg api onmeta in v1 orders create n headers n accept application json n content type application json n n body json stringify n buytokensymbol string n chainid number n fiatcurrency string n fiatamount number n buytokenaddress string n receiveraddress string n paymentmode string n metadata object n upiid object n bankdetails object n n n ; nrequest options function error response n if error throw new error error ; n console log response body ; n ; n customlabel id o75ng5jkq7f2jwiongw30 language javascript code var myheaders new headers ; nmyheaders append accept application json ; nmyheaders append content type application json ; n nvar raw json stringify n buytokensymbol string n chainid number n fiatcurrency string n fiatamount number n buytokenaddress string n receiveraddress string n paymentmode string n metadata object n upiid object n bankdetails object n ; n nvar requestoptions n method post n headers myheaders n body raw n redirect follow n ; n nfetch https stg api onmeta in v1 orders create requestoptions n then response response text n then result console log result n catch error console log error error ; customlabel id wodipbhyki6ln0upujtz language python code import requests nimport json n nurl https stg api onmeta in v1 orders create n npayload json dumps n buytokensymbol string n chainid number n fiatcurrency string n fiatamount number n buytokenaddress string n receiveraddress string n paymentmode string n metadata object n upiid object n bankdetails object n nheaders n accept application json n content type application json n n nresponse requests request post url headers headers data payload n nprint response text n customlabel id gc v bte1xngmwwyauwo3 language ruby code require uri nrequire json nrequire net http n nurl uri https stg api onmeta in v1 orders create n nhttps net http new url host url port nhttps use ssl true n nrequest net http post new url nrequest accept application json nrequest content type application json nrequest body json dump n buytokensymbol string n chainid number n fiatcurrency string n fiatamount number n buytokenaddress string n receiveraddress string n paymentmode string n metadata object n upiid object n bankdetails object n n nresponse https request request nputs response read body n customlabel selectedlanguageid wodipbhyki6ln0upujtz description to create onramp order you need to link upi id or bank account of the user before creating orders kindly follow link upi id section under customer login page currentnewparameter label body parameter value bodydataparameters default fiat is only inr , for php contact our sales team to enable it and from api create order with paymentmode as php ewallet gcash or php ewallet paymaya or php ewallet grabpay for php sample request body { "buytokensymbol" "matic", "chainid" 80001, "fiatcurrency" "inr", "fiatamount" 100, // only 100inr order will be success "buytokenaddress" "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "receiveraddress" "0xcdf10bc7a1fae391ff18f4c220ace912547971cc", "paymentmode" "inr upi", //for upi payment mode "upiid" { "upiid" "sample\@okaxis", //already linked upi details "name" "sample" }, "metadata" json stringify({ "userid" "abcxxx", "username" "user"}) } sample request body { "buytokensymbol" "matic", "chainid" 80001, "fiatcurrency" "inr", "fiatamount" 100, "buytokenaddress" "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "receiveraddress" "0xcdf10bc7a1fae391ff18f4c220ace912547971cc", "paymentmode" "inr imps", //inr neft //for imps/neft payment mode "bankdetails" { "accountnumber" "xxxx1121" //already linked bank details "accountname" "sample" "ifsc" "sbin0001234" }, "metadata" json stringify({ "userid" "abcxxx", "username" "user"}) }