{"openapi":"3.0.3","info":{"title":"A-Pay","description":"A-Pay\n\nAuthorization in A-Pay can occur using two parameters `apikey` and `project_id`.","version":"0.0.5"},"servers":[{"url":"https://"}],"tags":[{"name":"Payment system","description":"Payment systems"},{"name":"Payment page","description":"Payment page"},{"name":"Deposit","description":"Deposits"},{"name":"Withdrawal","description":"Withdrawals"},{"name":"Webhooks"},{"name":"Telegram Payments","description":"With Telegram Payments and A-Pay, you can send specially formatted invoice messages to your customers.\n\nInvoice messages feature a photo and description of the product, along with a prominent Pay button. Tapping this button opens a special payment interface in the Telegram app. In this interface, users choose the A-Pay Payment Method and tap the final pay button in Telegram.\n\nAt that moment, the A-Pay Payment Page opens, and the customers can choose the preferable Payment Method among all the A-Pay provides for the current currency. After that, customers should follow the steps for the selected method.\n\nWhen it’s done, your bot should proceed crediting the funds to the customer’s account.\n\nBelow there is a brief description of the integration process. You can find detailed instructions [here](https://app.gitbook.com/o/LNbZs3dNMDs1xm16Y9hk/s/dRt6CV4HPvnslXUaqL9U/api-documentation/telegram-payments).\n\n### Step 0\n\nIf you don’t have your own bot already, create one with [@BotFather](https://t.me/BotFather), following [Telegram instructions](https://core.telegram.org/bots).\n\n### Step 1\n\nFind the `Paykassma Payments` in Bot Settings and choose `Connect Paykassma Live`. You will go to [@paykassma_bot](https://t.me/paykassma_bot).\n\n### Step 2\n\nSend all the necessary Data from A-Pay Dashboard. The [@paykassma_bot](https://t.me/paykassma_bot) will request the following data:\n\n1. `apikey**:** (32 characters: [a-z0-9]{32})`\n\n2. `project id**:** (up to 7 digits: [0-9]{1,7})`\n\n3. `webhook id**:** (7 digits: [0-9]{7})`\n\n4. `webhook access key**:** (32 characters: [a-z0-9]{32})`\n\n5. `webhook private key**:** (32 characters: [a-z0-9]{32})`\n\n#### Example:\n> e8cb4vsat8e154rd4p7x85w1z6wth3h7\n\n> 6737955\n\n> 4324078\n\n> 299i20d8bb99rgazl62oxpford0pw8qb\n\n> 3jxs4i5pbopbbgc8pvev92c1vgumut1c\n\nIf the data is correct, [@paykassma_bot](https://t.me/paykassma_bot) will respond with: _\"The project data has been successfully saved\"_\n\n### Step 3\n\nOnce the data is saved, you can return to [@BotFather](https://t.me/BotFather) to obtain the token to implement payments to your merchant bot.\n\n### Step 4\n\nPass the obtained token to your dev team, so they can use it in the implementation of Telegram Payments in your merchant bot. You can find the necessary methods for building your payment implementation in the [Payments Section of the Bot API Manual](https://core.telegram.org/bots/api#payments)."}],"paths":{"/Remotes/payment-systems-info":{"get":{"tags":["Payment system"],"summary":"Getting data about payment systems","description":"Getting data about payment systems for the project.","parameters":[{"in":"query","name":"project_id","schema":{"type":"number"},"description":"Project ID in the A-Pay system","example":123,"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"title":"Success","required":["success","payment_systems"],"properties":{"success":{"type":"boolean","example":true,"description":"`true` if there are no errors"},"payment_systems":{"type":"array","items":{"type":"object","description":"Information about payment system","required":["name","min_deposit","max_deposit","min_withdrawal","max_withdrawal"],"properties":{"name":{"$ref":"#/components/schemas/ps_all"},"currency":{"$ref":"#/components/schemas/currency"},"min_deposit":{"type":"string","example":"10.00","description":"Minimum deposit amount"},"max_deposit":{"type":"string","example":"10000.00","description":"Maximum deposit amount"},"min_withdrawals":{"type":"string","example":"10.00","description":"Minimum withdrawal amount"},"max_withdrawals":{"type":"string","example":"10000.00","description":"Maximum withdrawal amount"}}}}}},{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"}}}]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"}}}}}}},"security":[{"apikey":[]}]}},"/Remotes/create-payment-page":{"post":{"tags":["Payment page"],"summary":"Create payment page","description":"The endpoint for creating a single payment link.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["currency","return_url","custom_user_id"],"properties":{"amount":{"type":"integer","example":10,"description":"Deposit amount. If the amount is undefined, then it must be set by user on the payment page. `Optional`"},"currency":{"$ref":"#/components/schemas/currency"},"buttons":{"type":"array","items":{"type":"integer"},"example":[100,200,300,400],"description":"A list of fixed deposit amounts, for quick selection by clients. Displayed in the order passed in the request. `Optional`"},"payment_system":{"example":["upi_fast","upi_fast_v","upi_p2p"],"oneOf":[{"type":"array","example":["upi_fast","upi_fast_v","upi_p2p"],"items":{"$ref":"#/components/schemas/ps_payment_page"}},{"$ref":"#/components/schemas/ps_payment_page"}],"enum":["easypaisa","mpesa","bankalfalah","upi_fast","upi_fast_v","upi_p2p","upi_a","bkash_a","apaybdt","upay","nagad_api_v","payme","paytm","phonepe","bkash_b","upi_link","nagad_a","nagad_b","easypaisa_l","upi_push","jazzcash_l","wavepay_l","d17_l","pix_p2p","spei_p2p","phonepe_fast","upi_fast_vip","wing_l","esewa","khalti","nayapay_l","ababank","jazzcash_fast","pkr_w","flouci","ipay_l","imps","jazzcash","etb_fast"],"description":"Name of the payment system in A-Pay. `Optional`"},"custom_transaction_id":{"type":"string","maximum":200,"example":"custom123","description":"Transaction ID in the client's system. `Optional`"},"custom_user_id":{"type":"string","maximum":200,"example":"user123","description":"User ID in the client's system. Must be unique for each user"},"return_url":{"type":"string","example":"https://example.com","minimum":1,"maximum":512,"description":"Return URL with Query Parameters\n\nExample parameters: \n- `status`: the result of the payment (`Created`, `Fail`, `Cancel`).\n - **`Created`** - parameter is passed in the link when the user successfully created a deposit but, for some reason, didn't complete the payment.\n - **`Fail`** - parameter is sent when the user encountered an error while creating the payment.\n - **`Cancel`** - parameter is sent when the user initiated payment on the payment provider's site but, for some reason, did not complete it.\n\nThe difference between `created` and `cancel` is that with `created`, the user hasn’t begun the payment process—they saw the payment details but chose not to proceed. In the case of `cancel`, the user started the payment on the payment provider’s site but interrupted it and returned to the merchant’s site.\n\nExample of the returned URL: \n`https://example.com?status=Created`\n\nThese parameters provide insight into the stage at which the user interrupted the payment process.\n"},"language":{"oneOf":[{"type":"string","enum":["EN","HI","BN","SW","UZ","MY","PT-BR","ES-MX","KM","NE"]},{"type":"array","items":{"type":"string","enum":["EN","HI","BN","SW","UZ","MY","PT-BR","ES-MX","KM","NE"]}}],"example":"EN","enum":["EN","HI","BN","SW","UZ","MY","PT-BR","ES-MX","KM","NE"],"description":"Payment page language. `Optional`"},"webhook_id":{"type":"string","example":42798,"minimum":7,"maximum":7,"description":"Id of a webhook that will be used to send a postback. If not filled then default webhook url will be used"},"data":{"description":"Data depending on the specific payment system","anyOf":[{"type":"object","title":"mpesa","example":{"phone_number":"254712345678"},"properties":{"phone_number":{"type":"string","minimum":12,"maximum":12,"pattern":"^254[0-9]{9}$","example":"254712345678","description":"Phone number Safariccon for money sending. Should consist of 12 digits and start with 254"}}},{"type":"object","description":"Easypaisa data","title":"easypaisa","properties":{"account_number":{"type":"string","example":"03123456789","pattern":"^03[0-9]{9}$","minimum":11,"maximum":11,"description":"Account number"}}},{"type":"object","description":"Nagad API V","title":"nagad_api_v","properties":{"account_number":{"type":"string","example":"01234567891","pattern":"^01[0-9]{9}$","minimum":11,"maximum":11,"description":"Account number"}}},{"type":"object","title":"bkash_a","properties":{"account_number":{"type":"string","example":"12345678912","pattern":"^01[0-9]{9}$","minimum":11,"maximum":11,"description":"Account number"}}},{"type":"object","description":"ApayBDT data","title":"apaybdt","properties":{"customer_name":{"type":"string","example":"John Doe","maximum":30,"description":"Customer name"},"customer_email":{"type":"string","example":"johndoe@gmail.com","description":"Customer email"},"customer_phone":{"type":"string","example":123456789,"pattern":"^[0-9]{6,15}$","minimum":6,"maximum":15,"description":"Customer phone"}}},{"type":"object","title":"payme","description":"Payme data","properties":{"card_number":{"type":"string","example":"1234123412341234","pattern":"^[0-9]{16}$","minimum":16,"maximum":16,"description":"Card number"},"card_expire":{"type":"string","minimum":4,"maximum":4,"pattern":"^[0-9]{4}$","example":"\"0399\"","description":"Card expiry date. Format four numbers MMYY, where MM is the month, YY is the year"}}},{"type":"object","title":"upi_a","description":"Upi-a data","properties":{"name":{"type":"string","example":"John Doe","minimum":1,"maximum":100,"description":"Customer name"},"email":{"type":"string","minimum":1,"maximum":100,"example":"johndoe@gmail.com","description":"Customer email"},"phone_number":{"type":"string","minimum":10,"maximum":12,"example":"91123456789","pattern":"^[0-9]{10,12}$","description":"Customer phone number"}}},{"type":"object","title":"bkash_b","properties":{"account_number":{"type":"string","example":"12345678912","pattern":"^01[0-9]{9}$","minimum":11,"maximum":11,"description":"Account number"}}},{"type":"object","description":"UPI Push data","title":"upi_push","properties":{"upi_address":{"type":"string","description":"UPI address"}}},{"type":"object","description":"Jazzcash fast data","title":"jazzcash_fast","properties":{"account_number":{"type":"string","example":"03123456789","pattern":"^03[0-9]{9}$","minimum":11,"maximum":11,"description":"Account number"}}},{"type":"object","description":"Jazzcash data","title":"jazzcash","properties":{"phone_number":{"type":"string","example":"03123456789","pattern":"^03[0-9]{9}$","minimum":11,"maximum":11,"description":"Phone number"},"account_number":{"type":"string","example":"1234567890123","pattern":"^[0-9]+$'","minimum":13,"maximum":13,"description":"Cnic number"}}},{"type":"object","description":"Etd Fast data","title":"etb_fast","properties":{"return_url":{"type":"string","example":"https://example.com","description":"Return url"}}}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"title":"Success","required":["success","payment_systems"],"properties":{"success":{"type":"boolean","example":true,"description":"`true` if there are no errors"},"url":{"type":"string","example":"https://a-pay.one/pay?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MjI5LCJleHAiOjE3MDE0NDMwODd9.zZXK5K1ipGYj01G2MGFzERdRW5vIXQgxKo1B6GSmYcQ&order_id=7fa13dbc3b79e05e","description":"Link to payment page.\n\nThe link received in response to the payment page request should be converted into the QR code\nand placed on the desktop version of your site if you are using our p2c methods in India;\notherwise, redirect the user to the received link."},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Deposit ID in the A-Pay system"}}},{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"}}}]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"}}}}}}},"security":[{"apikey":[]}]}},"/Remotes/create-deposit":{"post":{"tags":["Deposit"],"summary":"Request to create a deposit","description":"Deposit creation.\n\nWhen the deposit is confirmed, a callback request will be sent to the client's application handler with the [Deposit webhook](#operation/DepositWebhook) body","parameters":[{"in":"query","name":"project_id","schema":{"type":"number"},"description":"Project ID in the A-Pay system","example":123,"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["amount","currency","payment_system","custom_user_id","data"],"properties":{"amount":{"type":"integer","description":"Deposit amount","example":10},"currency":{"$ref":"#/components/schemas/currency"},"payment_system":{"$ref":"#/components/schemas/ps_deposit"},"custom_transaction_id":{"type":"string","maximum":200,"example":"custom123","description":"Transaction ID in the client's system"},"custom_user_id":{"type":"string","maximum":200,"example":"user123","description":"User ID in the client's system. Must be unique for each user"},"webhook_id":{"type":"string","example":42798,"minimum":7,"maximum":7,"description":"Id of a webhook that will be used to send a postback. If not filled then default webhook url will be used"},"data":{"description":"Data depending on the specific payment system","oneOf":[{"type":"object","summary":"Mpesa data","title":"mpesa","example":{"phone_number":"254712345678"},"properties":{"":{"type":"Description:","description":"Currency: `KES`"},"phone_number":{"type":"string","minimum":12,"maximum":12,"pattern":"^254[0-9]{9}$","example":"254712345678","description":"Phone number Safariccon for money sending. Should consist of 12 digits and start with 254"}},"required":["phone_number"]},{"type":"object","description":"Easypaisa data","title":"easypaisa","properties":{"":{"type":"Description:","description":"Currency: `PKR`"},"account_number":{"type":"string","example":"03123456789","pattern":"^03[0-9]{9}$","minimum":11,"maximum":11,"description":"Account number"}},"required":["account_number"]},{"type":"object","description":"Nagad API V","title":"nagad_api_v","properties":{"":{"type":"Description:","description":"Currency: `BDT`"},"account_number":{"type":"string","example":"01234567891","pattern":"^01[0-9]{9}$","minimum":11,"maximum":11,"description":"Account number"}},"required":["account_number"]},{"type":"object","description":"BankAlfalah data","title":"bankalfalah","properties":{"":{"type":"Description:","description":"Currency: `PKR`"},"return_url":{"type":"string","description":"Return link to the user's shop after the payment page"}},"required":["return_url"]},{"type":"object","description":"UPI Fast data (empty)\n\nFor example: `\"data\": {}`\n\nCurrency: `INR`","title":"upi_fast","example":{}},{"type":"object","title":"upi_fast_v","description":"UPI Fast V data (empty)\n\nFor example: `\"data\": {}`\n\nCurrency: `INR`"},{"type":"object","title":"bkash_a","description":"[Deposit activation](#operation/DepositActivation) is optional","properties":{"":{"type":"Description:","description":"[Deposit activation](#operation/DepositActivation) is optional.\n\nCurrency: `BDT`"},"return_url":{"type":"string","description":"Return link to the user's shop after the payment page"},"account_number":{"type":"string","example":"12345678912","pattern":"^01[0-9]{9}$","minimum":11,"maximum":11,"description":"Account number"}},"required":["return_url"]},{"type":"object","description":"UPI-p2p data (empty)\n\nThis deposit requires activation [Deposit activation](#operation/DepositActivation)\n\nFor example: `\"data\": {}`\n\nCurrency: `INR`","title":"upi_p2p","example":{}},{"type":"object","description":"UPI Fast QR data (empty)\n\nFor example: `\"data\": {}`\n\nCurrency: `INR`","title":"upi_fast_qr","example":{}},{"type":"object","description":"PayTM data (empty)\n\nThis deposit requires activation [Deposit activation](#operation/DepositActivation)\n\nFor example: `\"data\": {}`\n\nCurrency: `INR`","title":"paytm","example":{}},{"type":"object","description":"PhonePe data (empty)\n\nThis deposit requires activation [Deposit activation](#operation/DepositActivation)\n\nFor example: `\"data\": {}`\n\nCurrency: `INR`","title":"phonepe","example":{}},{"type":"object","description":"ApayBDT data","title":"apaybdt","properties":{"":{"type":"Description:","description":"Currency: `BDT`"},"success_url":{"type":"string","example":"https://clientstore.com/success","description":"Return link to the user's shop after the successful payment"},"cancel_url":{"type":"string","example":"https://clientstore.com/success","description":"Return link to the user's shop after the canceled payment"},"fail_url":{"type":"string","example":"https://clientstore.com/success","description":"Return link to the user's shop after the failed payment"},"customer_name":{"type":"string","example":"John Doe","maximum":30,"description":"Customer name"},"customer_email":{"type":"string","example":"johndoe@gmail.com","description":"Customer email"},"customer_phone":{"type":"string","example":123456789,"pattern":"^[0-9]{6,15}$","minimum":6,"maximum":15,"description":"Customer phone"}},"required":["success_url","cancel_url","fail_url","customer_name","customer_email","customer_phone"]},{"type":"object","description":"UPAY data","title":"upay","properties":{"":{"type":"Description:","description":"Currency: `BDT`"},"return_url":{"type":"string","description":"Return link to the user's shop after the payment page"}},"required":["return_url"]},{"type":"object","title":"payme","description":"Payme data","properties":{"":{"type":"Description:","description":"[Deposit activation](#operation/DepositActivation) is required.\n\nCurrency: `UZS`"},"card_number":{"type":"string","example":"1234123412341234","pattern":"^[0-9]{16}$","minimum":16,"maximum":16,"description":"Card number"},"card_expire":{"type":"string","minimum":4,"maximum":4,"pattern":"^[0-9]{4}$","example":"\"0399\"","description":"Card expiry date. Format four numbers MMYY, where MM is the month, YY is the year"}},"required":["card_number","card_expire"]},{"type":"object","title":"upi_a","description":"Upi-a data","properties":{"":{"type":"Description:","description":"Currency: `INR`"},"name":{"type":"string","example":"John Doe","minimum":1,"maximum":100,"description":"Customer name"},"email":{"type":"string","minimum":1,"maximum":100,"example":"johndoe@gmail.com","description":"Customer email"},"phone_number":{"type":"string","minimum":10,"maximum":12,"example":"91123456789","pattern":"^[0-9]{10,12}$","description":"Customer phone number"}},"required":["name","email","phone_number"]},{"type":"object","title":"bkash_b","description":"[Deposit activation](#operation/DepositActivation) is optional","properties":{"":{"type":"Description:","description":"[Deposit activation](#operation/DepositActivation) is optional.\n\nCurrency: `BDT`"},"return_url":{"type":"string","description":"Return link to the user's shop after the payment page"},"account_number":{"type":"string","example":"12345678912","pattern":"^01[0-9]{9}$","minimum":11,"maximum":11,"description":"Account number"}},"required":["return_url"]},{"type":"object","description":"UPI Link data (empty)\n\nFor example: `\"data\": {}`\n\nCurrency: `INR`","title":"upi_link","example":{}},{"type":"object","description":"Nagad A","title":"nagad_a","properties":{"":{"type":"Description:","description":"Currency: `BDT`"},"return_url":{"type":"string","description":"Return link to the user's shop after the payment page"}},"required":["return_url"]},{"type":"object","description":"Nagad B","title":"nagad_b","properties":{"":{"type":"Description:","description":"Currency: `BDT`"},"return_url":{"type":"string","description":"Return link to the user's shop after the payment page"}},"required":["return_url"]},{"type":"object","description":"Easypaisa-l data (empty)\n\nThis deposit requires activation [Deposit activation](#operation/DepositActivation)\n\nFor example: `\"data\": {}`\n\nCurrency: `PKR`","title":"easypaisa_l","example":{}},{"type":"object","description":"UPI Push data","title":"upi_push","properties":{"":{"type":"Description:","description":"Currency: `INR`"},"upi_address":{"type":"string","description":"UPI address"}},"required":["upi_address"]},{"type":"object","title":"jazzcash_l","description":"Jazzcash-l data (empty)\n\nThis deposit requires activation [Deposit activation](#operation/DepositActivation)\n\nFor example: `\"data\": {}`\n\nCurrency: `PKR`"},{"type":"object","title":"wavepay_l","description":"Wavepay-l data (empty)\n\nThis deposit requires activation [Deposit activation](#operation/DepositActivation)\n\nFor example: `\"data\": {}`\n\nCurrency: `MMK`"},{"type":"object","title":"d17_l","description":"D17-l data (empty)\n\nThis deposit requires activation [Deposit activation](#operation/DepositActivation)\n\nFor example: `\"data\": {}`\n\nCurrency: `TND`"},{"type":"object","title":"pix_p2p","description":"Pix-p2p data (empty)\n\nFor example: `\"data\": {}`\n\nCurrency: `BRL`"},{"type":"object","title":"spei_p2p","description":"Spei-p2p data (empty)\n\nFor example: `\"data\": {}`\n\nCurrency: `MXN`"},{"type":"object","title":"phonepe_fast","description":"Phonepe_fast data (empty)\n\nFor example: `\"data\": {}`\n\nCurrency: `INR`"},{"type":"object","title":"upi_fast_vip","description":"UPI Fast VIP data (empty)\n\nFor example: `\"data\": {}`\n\nCurrency: `INR`"},{"type":"object","title":"wing_l","description":"Wing-l data (empty)\n\nThis deposit requires activation [Deposit activation](#operation/DepositActivation)\n\nFor example: `\"data\": {}`\n\nCurrency: `KHR`"},{"type":"object","description":"Esewa data","title":"esewa","properties":{"":{"type":"Description:","description":"Currency: `NPR`"},"return_url":{"type":"string","description":"Return link to the user's shop after the payment page"}},"required":["return_url"]},{"type":"object","description":"Khalti data","title":"khalti","properties":{"":{"type":"Description:","description":"Currency: `NPR`"},"return_url":{"type":"string","description":"Return link to the user's shop after the payment page"}},"required":["return_url"]},{"type":"object","title":"nayapay_l","description":"Nayapay-l data (empty)\n\nThis deposit requires activation [Deposit activation](#operation/DepositActivation)\n\nFor example: `\"data\": {}`\n\nCurrency: `PKR`"},{"type":"object","description":"Ababank data (empty)\n\nFor example: `\"data\": {}`\n\nCurrency: `KHR`","title":"ababank"},{"type":"object","description":"Jazzcash fast data","title":"jazzcash_fast","properties":{"":{"type":"Description:","description":"Currency: `PKR`"},"account_number":{"type":"string","example":"03123456789","pattern":"^03[0-9]{9}$","minimum":11,"maximum":11,"description":"Account number"}},"required":["account_number"]},{"type":"object","description":"Flouci data","title":"flouci","properties":{"":{"type":"Description:","description":"Currency: `TND`"},"return_url":{"type":"string","example":"https://example.com/","description":"Return link to the user's shop after the payment page"}},"required":["return_url"]},{"type":"object","title":"ipay_l","description":"Ipay-l data (empty)\n\nThis deposit requires activation [Deposit activation](#operation/DepositActivation)\n\nFor example: `\"data\": {}`\n\nCurrency: `LKR`"},{"type":"object","title":"imps","description":"Imps data (empty)\n\nThis deposit requires activation [Deposit activation](#operation/DepositActivation)\n\nFor example: `\"data\": {}`\n\nCurrency: `INR`"},{"type":"object","title":"jazzcash","description":"Jazzcash data","properties":{"":{"type":"Description:","description":"Currency: `PKR`"},"phone_number":{"type":"string","example":"03123456789","pattern":"^03[0-9]{9}$","minimum":11,"maximum":11,"description":"Phone number"},"account_number":{"type":"string","example":"1234567890123","pattern":"^[0-9]+$'","minimum":13,"maximum":13,"description":"Cnic number"}},"required":["phone_number","account_number"]},{"type":"object","title":"etb_fast","description":"Etd Fast Data","properties":{"":{"type":"Description:","description":"Currency: `ETB`"},"return_url":{"type":"string","example":"https://example.com","description":"Return url"}},"required":["return_url"]}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"title":"Success","required":["success","order_id"],"properties":{"success":{"type":"boolean","example":true,"description":"`true` if there are no errors"},"status":{"type":"string","enum":["Pending"],"example":"Pending","description":"Deposit status"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Deposit ID in the A-Pay system"},"data":{"type":"object","description":"Payment system specific data","oneOf":[{"type":"object","description":"BankAlfalah data","title":"bankalfalah","properties":{"paymentpage_url":{"type":"string","description":"Link to payment page"}},"required":["paymentpage_url"]},{"type":"object","description":"UPI Fast data","title":"upi_fast","properties":{"paymentpage_url":{"type":"string","example":"upi://pay?pa=test@bank&pn=Test%20test&am=100&tn=IT32021661770570987&tr=IT32021661770570987","description":"UPI payment app deep link\n\nOur system, using the method Upi_fast, sends a link of the form `upi://`,\nwhich in theory should lead to the opening of the desired application on mobile OS.\nBut, on mobile OSs, there are cases when the universal link doesn't work and opens the wrong application.\nTo fix it you can use the solution on your side:\n[https://stackoverflow.com/questions/65273125/invoking-upi-apps-from-my-react-native-app-works-in-ios-but-not-in-android](https://stackoverflow.com/questions/65273125/invoking-upi-apps-from-my-react-native-app-works-in-ios-but-not-in-android),\ni.e. for the specified mobile applications write the exact link → replacing `upi://` from the link with the following data for mobile solutions:\n\n\n- `Paytm` → paytmmp://;\n- `Phonepe` → phonepe://;\n- `GPay` → tez://upi/.\n\n\nAnd let the user select the desired solution first and then get the link for the specific app.\nUse the payment app links in the mobile version. Use the same links converted to QR in the desktop version."}},"required":["paymentpage_url"]},{"type":"object","description":"UPI Fast V data","title":"upi_fast_v","properties":{"paymentpage_url":{"type":"string","example":"upi://pay?pa=test@bank&pn=Test%20test&am=100&tn=IT32021661770570987&tr=IT32021661770570987","description":"UPI payment app deep link\n\nOur system, using the method Upi_fast, sends a link of the form `upi://`,\nwhich in theory should lead to the opening of the desired application on mobile OS.\nBut, on mobile OSs, there are cases when the universal link doesn't work and opens the wrong application.\nTo fix it you can use the solution on your side:\n[https://stackoverflow.com/questions/65273125/invoking-upi-apps-from-my-react-native-app-works-in-ios-but-not-in-android](https://stackoverflow.com/questions/65273125/invoking-upi-apps-from-my-react-native-app-works-in-ios-but-not-in-android),\ni.e. for the specified mobile applications write the exact link → replacing `upi://` from the link with the following data for mobile solutions:\n\n\n- `Paytm` → paytmmp://;\n- `Phonepe` → phonepe://;\n- `GPay` → tez://upi/.\n\n\nAnd let the user select the desired solution first and then get the link for the specific app.\nUse the payment app links in the mobile version. Use the same links converted to QR in the desktop version."}},"required":["paymentpage_url"]},{"type":"object","description":"UPI Fast QR data","title":"upi_fast_qr","properties":{"paymentpage_url":{"type":"string","example":"upi://pay?pa=test@bank&pn=Test%20test&am=100&tn=IT32021661770570987&tr=IT32021661770570987","description":"UPI payment app deep link\n\nOur system, using the method Upi_fast_qr, sends a link of the form `upi://`,\nwhich in theory should lead to the opening of the desired application on mobile OS.\nBut, on mobile OSs, there are cases when the universal link doesn't work and opens the wrong application.\nTo fix it you can use the solution on your side:\n[https://stackoverflow.com/questions/65273125/invoking-upi-apps-from-my-react-native-app-works-in-ios-but-not-in-android](https://stackoverflow.com/questions/65273125/invoking-upi-apps-from-my-react-native-app-works-in-ios-but-not-in-android),\ni.e. for the specified mobile applications write the exact link → replacing `upi://` from the link with the following data for mobile solutions:\n\n\n- `Paytm` → paytmmp://;\n- `Phonepe` → phonepe://;\n- `GPay` → tez://upi/.\n\n\nAnd let the user select the desired solution first and then get the link for the specific app.\nUse this links converted to QR in the desktop and mobile version."}},"required":["paymentpage_url"]},{"type":"object","description":"Paytm data","title":"paytm","properties":{"upi_address":{"type":"string","description":"UPI address"},"paymentpage_url":{"type":"string","description":"UPI deeplink which can be used to generate QR code. `Optional`"}},"required":["upi_address"]},{"type":"object","description":"Phonepe data","title":"phonepe","properties":{"upi_address":{"type":"string","description":"UPI address"},"paymentpage_url":{"type":"string","description":"UPI deeplink which can be used to generate QR code. `Optional`"}},"required":["upi_address"]},{"type":"object","description":"BKash_a data","title":"bkash_a","properties":{"paymentpage_url":{"type":"string","description":"Link to payment page"}},"required":["paymentpage_url"]},{"type":"object","description":"UPI p2p data","title":"upi_p2p","properties":{"upi_address":{"type":"string","description":"UPI address"},"paymentpage_url":{"type":"string","description":"UPI deeplink which can be used to generate QR code. `Optional`"}},"required":["upi_address"]},{"type":"object","description":"ApayBDT data","title":"apaybdt","properties":{"paymentpage_url":{"type":"string","description":"Link to payment page"}},"required":["paymentpage_url"]},{"type":"object","description":"UPAY data","title":"upay","properties":{"paymentpage_url":{"type":"string","description":"Link to payment page"}},"required":["paymentpage_url"]},{"type":"object","description":"PayMe data","title":"payme","properties":{"sent":{"type":"boolean"},"phone":{"type":"string"},"wait":{"type":"integer"}},"required":["sent","phone","wait"]},{"type":"object","description":"Nagad API V data","title":"nagad_api_v","properties":{"receiver_account_number":{"type":"string","description":"The recipient's account number to which user must transfer the funds"}},"required":["receiver_account_number"]},{"type":"object","description":"Upi-a data","title":"upi_a","properties":{"paymentpage_url":{"type":"string","description":"UPI payment app deep link\n\nOur system, using the method Upi_fast, sends a link of the form `upi://`,\nwhich in theory should lead to the opening of the desired application on mobile OS.\nBut, on mobile OSs, there are cases when the universal link doesn't work and opens the wrong application.\nTo fix it you can use the solution on your side:\n[https://stackoverflow.com/questions/65273125/invoking-upi-apps-from-my-react-native-app-works-in-ios-but-not-in-android](https://stackoverflow.com/questions/65273125/invoking-upi-apps-from-my-react-native-app-works-in-ios-but-not-in-android),\ni.e. for the specified mobile applications write the exact link → replacing `upi://` from the link with the following data for mobile solutions:\n\n\n- `Paytm` → paytmmp://;\n- `Phonepe` → phonepe://;\n- `GPay` → tez://upi/.\n\n\nAnd let the user select the desired solution first and then get the link for the specific app.\nUse the payment app links in the mobile version. Use the same links converted to QR in the desktop version."}},"required":["paymentpage_url"]},{"type":"object","description":"BKash_b data","title":"bkash_b","properties":{"paymentpage_url":{"type":"string","description":"Link to payment page"}},"required":["paymentpage_url"]},{"type":"object","description":"UPI Link data","title":"upi_link","properties":{"paymentpage_url":{"type":"string","example":"upi://pay?pa=test@bank&pn=Test%20test&am=100&tn=IT32021661770570987&tr=IT32021661770570987","description":"UPI payment app deep link"}},"required":["paymentpage_url"]},{"type":"object","description":"Nagad A","title":"nagad_a","properties":{"paymentpage_url":{"type":"string","description":"Link to payment page"}},"required":["paymentpage_url"]},{"type":"object","description":"Nagad B","title":"nagad_b","properties":{"paymentpage_url":{"type":"string","description":"Link to payment page"}},"required":["paymentpage_url"]},{"type":"object","description":"Easypaisa-l data","title":"easypaisa_l","properties":{"receiver_account_number":{"type":"string","description":"The recipient's account number to which user must transfer the funds"}},"required":["receiver_account_number"]},{"type":"object","description":"Jazzcash-l data","title":"jazzcash_l","properties":{"receiver_account_number":{"type":"string","description":"The recipient's account number to which user must transfer the funds"}},"required":["receiver_account_number"]},{"type":"object","description":"Wavepay_l data","title":"wavepay_l","properties":{"receiver_account_number":{"type":"string","description":"The recipient's account number to which user must transfer the funds"}},"required":["receiver_account_number"]},{"type":"object","description":"D17_l data","title":"d17_l","properties":{"receiver_account_number":{"type":"string","description":"The recipient's account number to which user must transfer the funds"}},"required":["receiver_account_number"]},{"type":"object","description":"Pix-p2p Link data","title":"pix_p2p","properties":{"paymentpage_url":{"type":"string","description":"Payment app deep link"}},"required":["paymentpage_url"]},{"type":"object","description":"Spei-p2p Link data","title":"spei_p2p","properties":{"receiver_bank_name":{"type":"string","description":"Receiver bank name"},"receiver_account_number":{"type":"string","description":"Receiver account number"}},"required":["receiver_bank_name","receiver_account_number"]},{"type":"object","description":"Phonepe_fast data","title":"phonepe_fast","properties":{"paymentpage_url":{"type":"string","example":"upi://pay?pa=test@bank&pn=Test%20test&am=100&tn=IT32021661770570987&tr=IT32021661770570987","description":"UPI payment app deep link\n\nOur system, using the method Phonepe_fast, sends a link of the form `upi://`,\nwhich in theory should lead to the opening of the desired application on mobile OS.\nBut, on mobile OSs, there are cases when the universal link doesn't work and opens the wrong application.\nTo fix it you can use the solution on your side:\n[https://stackoverflow.com/questions/65273125/invoking-upi-apps-from-my-react-native-app-works-in-ios-but-not-in-android](https://stackoverflow.com/questions/65273125/invoking-upi-apps-from-my-react-native-app-works-in-ios-but-not-in-android),\ni.e. for the specified mobile applications write the exact link → replacing `upi://` from the link with the following data for mobile solutions:\n\n\n- `Phonepe` → phonepe://.\n\n\nAnd let the user select the desired solution first and then get the link for the specific app.\nUse the payment app links in the mobile version. Use the same links converted to QR in the desktop version."}},"required":["paymentpage_url"]},{"type":"object","description":"UPI Fast VIP data","title":"upi_fast_vip","properties":{"paymentpage_url":{"type":"string","example":"upi://pay?pa=test@bank&pn=Test%20test&am=100&tn=IT32021661770570987&tr=IT32021661770570987","description":"UPI payment app deep link\n\nOur system, using the method Upi_fast_vip, sends a link of the form `upi://`,\nwhich in theory should lead to the opening of the desired application on mobile OS.\nBut, on mobile OSs, there are cases when the universal link doesn't work and opens the wrong application.\nTo fix it you can use the solution on your side:\n[https://stackoverflow.com/questions/65273125/invoking-upi-apps-from-my-react-native-app-works-in-ios-but-not-in-android](https://stackoverflow.com/questions/65273125/invoking-upi-apps-from-my-react-native-app-works-in-ios-but-not-in-android),\ni.e. for the specified mobile applications write the exact link → replacing `upi://` from the link with the following data for mobile solutions:\n\n\n- `Paytm` → paytmmp://;\n- `Phonepe` → phonepe://;\n- `GPay` → tez://upi/.\n\n\nAnd let the user select the desired solution first and then get the link for the specific app.\nUse the payment app links in the mobile version. Use the same links converted to QR in the desktop version."}},"required":["paymentpage_url"]},{"type":"object","description":"Wing_l data","title":"wing_l","properties":{"receiver_account_number":{"type":"string","description":"The recipient's account number to which user must transfer the funds"}},"required":["receiver_account_number"]},{"type":"object","description":"Esewa data","title":"esewa","properties":{"paymentpage_url":{"type":"string","description":"Link to payment page"}},"required":["paymentpage_url"]},{"type":"object","description":"Khalti data","title":"khalti","properties":{"paymentpage_url":{"type":"string","description":"Link to payment page"}},"required":["paymentpage_url"]},{"type":"object","description":"Nayapay_l data","title":"nayapay_l","properties":{"receiver_account_number":{"type":"string","description":"The recipient's account number to which user must transfer the funds"}},"required":["receiver_account_number"]},{"type":"object","description":"Ababank data","title":"ababank","properties":{"qr_code":{"type":"string","description":"Generate the QR with this data and display the code in your interface"}},"required":["qr_code"]},{"type":"object","title":"imps","description":"Imps data","properties":{"account_number":{"type":"string","description":"Account number"},"account_name":{"type":"string","description":"Account name"},"ifsc_code":{"type":"string","description":"Ifsc code"}},"required":["account_number","account_name","ifsc_code"]},{"type":"object","title":"etb_fast","description":"Etb Fast Data","properties":{"paymentpage_url":{"type":"string","description":"Link to payment page"}},"required":["paymentpage_url"]}]}}},{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"status":{"type":"string","enum":["Failed"],"example":"Failed","description":"Deposit status"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Deposit ID in the A-Pay system"}}}]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"message":{"description":"Description of error","oneOf":[{"type":"string","title":"Easypaisa","description":"Easypaisa errors","$ref":"#/components/schemas/easypaisa"}]},"status":{"type":"string","enum":["Failed"],"example":"Failed","description":"Deposit status"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Deposit ID in the A-Pay system"}}}}}}},"security":[{"apikey":[]}]}},"/Remotes/deposit-activate":{"post":{"tags":["Deposit"],"summary":"Deposit activation","operationId":"DepositActivation","description":"For payment system that require payment activation","parameters":[{"in":"query","name":"project_id","schema":{"type":"number"},"description":"Project ID in the A-Pay system","example":123,"required":true},{"in":"query","name":"order_id","schema":{"type":"string"},"description":"Deposit ID in the A-Pay system","example":"7fa13dbc3b79e05e","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["payment_system","data"],"properties":{"payment_system":{"type":"string","enum":["upi_p2p","bkash_a","bkash_b","payme","paytm","phonepe","easypaisa_l","jazzcash_l","wavepay_l","d17_l","wing_l","nayapay_l","ipay_l","imps"],"example":"nagad","description":"Name of the payment system in A-Pay"},"data":{"description":"Data depending on the specific payment system","oneOf":[{"type":"object","title":"bkash_a","description":"BKash_a data (empty)\n\nFor example: `\"data\": {}`","example":{}},{"type":"object","description":"UPI p2p data","title":"upi_p2p","properties":{"key":{"type":"string","example":"123-ABC-456-DEF","maximum":190,"description":"A code on which activation is performed (Transaction ID), received from the user"}},"required":["key"]},{"type":"object","description":"PayTM data","title":"paytm","properties":{"key":{"type":"string","example":"123-ABC-456-DEF","maximum":190,"description":"A code on which activation is performed (Transaction ID), received from the user"}},"required":["key"]},{"type":"object","description":"PhonePe data","title":"phonepe","properties":{"key":{"type":"string","example":"123-ABC-456-DEF","maximum":190,"description":"A code on which activation is performed (Transaction ID), received from the user"}},"required":["key"]},{"type":"object","description":"Payme data","title":"payme","properties":{"otp_code":{"type":"string","example":666666,"pattern":"^[0-9]{6}$","minimum":6,"maximum":6,"description":"Otp code can be entered several times.\nCheck the validity of the otp code by the `verify_otp` field in activation response.\n\nUse [Deposit resend OTP](#operation/DepositResendOTP) to resend otp code."}},"required":["otp_code"]},{"type":"object","title":"bkash_b","description":"BKash_b data (empty)\n\nFor example: `\"data\": {}`","example":{}},{"type":"object","description":"Easypaisa-l data","title":"easypaisa_l","properties":{"key":{"type":"string","example":123456789,"pattern":"^[0-9]+$","description":"A code on which activation is performed (Transaction ID), received from the user"}},"required":["key"]},{"type":"object","description":"Jazzcash-l data","title":"jazzcash_l","properties":{"key":{"type":"string","example":123456789,"pattern":"^[0-9]+$","description":"A code on which activation is performed (Transaction ID), received from the user"}},"required":["key"]},{"type":"object","description":"Wavepay_l data","title":"wavepay_l","properties":{"key":{"type":"string","example":123456789,"maximum":20,"description":"A code on which activation is performed (Transaction ID), received from the user"}},"required":["key"]},{"type":"object","description":"D17_l data","title":"d17_l","properties":{"key":{"type":"string","example":123456789,"maximum":20,"description":"A code on which activation is performed (Transaction ID), received from the user"}},"required":["key"]},{"type":"object","description":"Wing_l data","title":"wing_l","properties":{"key":{"type":"string","example":123456789,"maximum":20,"description":"A code on which activation is performed (Transaction ID), received from the user"}},"required":["key"]},{"type":"object","description":"Nayapay_l data","title":"nayapay_l","properties":{"key":{"type":"string","example":123456789,"maximum":24,"description":"A code on which activation is performed (Transaction ID), received from the user"}},"required":["key"]},{"type":"object","description":"Ipai_l data","title":"ipay_l","properties":{"key":{"type":"string","example":123456789,"maximum":20,"description":"A code on which activation is performed (Transaction ID), received from the user"}},"required":["key"]},{"type":"object","description":"Imps data","title":"imps","properties":{"key":{"type":"string","maximum":20,"description":"A code on which activation is performed (Transaction ID), received from the user"}},"required":["key"]}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"title":"Success","required":["success","order_id"],"properties":{"success":{"type":"boolean","example":true,"description":"`true` if there are no errors"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Deposit ID in the A-Pay system"},"message":{"type":"string","example":"Transaction was already activated","description":"Description of error"},"code":{"type":"number","example":201,"description":"Error code in the A-pay system"},"data":{"type":"object","description":"Payment system specific data","oneOf":[{"type":"object","description":"Payme data","title":"payme","properties":{"verify_otp":{"type":"boolean","example":true,"description":"Returns `true` if the otp code has passed verification, otherwise, client can enter the otp code again"},"require_new_otp":{"type":"boolean","example":false,"description":"If `true` than you need to resend the OTP code.\nUse [Deposit resend OTP](#operation/DepositResendOTP) to resend otp code."}},"required":["verify_otp"]}]}}},{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Deposit ID in the A-Pay system"}}}]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Deposit ID in the A-Pay system"}}}}}}},"security":[{"apikey":[]}]}},"/Remotes/deposit-resend-otp":{"post":{"tags":["Deposit"],"summary":"Deposit resend OTP","operationId":"DepositResendOTP","description":"For payment systems that support resending OTP codes","parameters":[{"in":"query","name":"project_id","schema":{"type":"number"},"description":"Project ID in the A-Pay system","example":123,"required":true},{"in":"query","name":"order_id","schema":{"type":"string"},"description":"Deposit ID in the A-Pay system","example":"7fa13dbc3b79e05e","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["payment_system"],"properties":{"payment_system":{"type":"string","enum":["payme"],"example":"payme","description":"Name of the payment system in A-Pay"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"title":"Success","required":["success","order_id"],"properties":{"success":{"type":"boolean","example":true,"description":"`true` if there are no errors"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Deposit ID in the A-Pay system"},"data":{"type":"object","description":"Payment system specific data","oneOf":[{"type":"object","description":"PayMe data","title":"payme","properties":{"sent":{"type":"boolean"},"phone":{"type":"string"},"wait":{"type":"integer"}},"required":["sent","phone","wait"]}]}}},{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Deposit ID in the A-Pay system"}}}]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Deposit ID in the A-Pay system"}}}}}}},"security":[{"apikey":[]}]}},"/Remotes/deposit-info":{"get":{"tags":["Deposit"],"summary":"Deposit information","description":"The data are taken from the table `deposit` by `order_id` field based on the selected project from the table `project`","parameters":[{"in":"query","name":"project_id","schema":{"type":"number"},"description":"Project ID in the A-Pay system","example":123,"required":true},{"in":"query","name":"order_id","schema":{"type":"string"},"description":"Deposit ID in the A-Pay system","example":"7fa13dbc3b79e05e","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"title":"Success","required":["success","status","order_id","amount","currency","payment_system","created_at"],"properties":{"success":{"type":"boolean","example":true,"description":"`true` if there are no errors"},"status":{"type":"string","enum":["Pending","Success","Failed","Rejected"],"example":"Success","description":"Deposit status"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Deposit ID in the A-Pay system"},"amount":{"type":"number","description":"Deposit amount","example":10},"currency":{"$ref":"#/components/schemas/currency"},"payment_system":{"$ref":"#/components/schemas/ps_deposit"},"custom_transaction_id":{"type":"string","minimum":0,"maximum":200,"example":"custom123","description":"Transaction ID in the client's system"},"custom_user_id":{"type":"string","minimum":0,"maximum":200,"example":"user123","description":"User ID in the client's system"},"created_at":{"type":"integer","example":1665135515,"description":"Deposit creation time in timestamp format"}}},{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"}}}]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"}}}}}}},"security":[{"apikey":[]}]}},"/Remotes/create-withdrawal":{"post":{"security":[{"apikey":[]}],"tags":["Withdrawal"],"summary":"Request to create a withdrawal","description":"Withdrawal creation.\n\nWhen the withdrawal is confirmed, a callback request will be sent to the client's application handler with the [Withdrawal webhook](#operation/WithdrawalWebhook) body","parameters":[{"in":"query","name":"project_id","schema":{"type":"number"},"description":"Project ID in the A-Pay system","example":123,"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["amount","currency","payment_system","custom_user_id","data"],"properties":{"amount":{"type":"integer","description":"Withdrawal amount","example":10},"currency":{"$ref":"#/components/schemas/currency"},"payment_system":{"$ref":"#/components/schemas/ps_withdrawal"},"custom_transaction_id":{"type":"string","maximum":200,"example":"custom123","description":"Transaction ID in the client's system"},"custom_user_id":{"type":"string","maximum":200,"example":"user123","description":"User ID in the client's system. Must be unique for each user"},"webhook_id":{"type":"string","example":42798,"minimum":7,"maximum":7,"description":"Id of a webhook that will be used to send a postback. If not filled then default webhook url will be used"},"data":{"description":"Data depending on the specific payment system","oneOf":[{"type":"object","description":"Mpesa data","title":"mpesa","example":{"phone_number":"254712345678"},"properties":{"":{"type":"Description:","description":"Currency: `KES`"},"phone_number":{"type":"string","minimum":12,"maximum":12,"pattern":"^254[0-9]{9}$","example":"254712345678","description":"Phone number Safariccon for money sending. Should consist of 12 digits and start with 254"}},"required":["phone_number"]},{"type":"object","description":"Bankalfalah data","title":"bankalfalah","properties":{"":{"type":"Description:","description":"Currency: `PKR`"},"account_title":{"type":"string","example":"John Doe","maximum":50,"description":"Receiver account name"},"account_number":{"type":"string","example":"12345678912345","pattern":"^[0-9]{6,18}$","minimum":6,"maximum":18,"description":"Account number"},"iban_number":{"type":"string","pattern":"^PK[A-Za-z0-9]{22}$","minimum":24,"maximum":24,"example":null,"description":"IBAN number"},"customer_phone":{"type":"string","example":"12345678912","pattern":"^[0-9]{11}$","minimum":11,"maximum":11,"description":"Phone number"}},"required":["iban_number","account_title","account_number","customer_phone"]},{"type":"object","description":"Easypaisa data","title":"easypaisa","properties":{"":{"type":"Description:","description":"Currency: `PKR`"},"wallet_type":{"type":"string","enum":["easypaisa","jazzcash"],"example":"easypaisa","description":"Wallet type"},"account_name":{"type":"string","example":"John Doe","maximum":50,"description":"Receiver account name"},"account_number":{"type":"string","example":12345678912,"pattern":"^[0-9]{11}$","minimum":11,"maximum":11,"description":"Account number"}},"required":["wallet_type","account_name","account_number"]},{"type":"object","description":"IMPS data","title":"imps","properties":{"":{"type":"Description:","description":"Currency: `INR`"},"account_name":{"type":"string","example":"John Doe","pattern":"^[a-zA-Z\\s]{1,30}$","maximum":30,"description":"Receiver account name"},"account_number":{"type":"string","example":123456789,"pattern":"^[0-9]+$","description":"Receiver account number"},"bank_code":{"type":"string","example":"BKID0000001","pattern":"^[A-Z]{4}0[A-Z0-9]{6}$","minimum":11,"maximum":11,"description":"IFSC code bank"}},"required":["account_name","account_number","bank_code"]},{"type":"object","description":"IMPS_top data","title":"imps_top","properties":{"":{"type":"Description:","description":"Currency: `INR`"},"account_name":{"type":"string","example":"John Doe","pattern":"^[a-zA-Z\\s]{1,30}$","maximum":30,"description":"Receiver account name"},"account_number":{"type":"string","example":123456789,"pattern":"^[0-9]+$","description":"Receiver account number"},"bank_code":{"type":"string","example":"BKID0000001","pattern":"^[A-Z]{4}0[A-Z0-9]{6}$","minimum":11,"maximum":11,"description":"IFSC code bank"}},"required":["account_name","account_number","bank_code"]},{"type":"object","description":"BKash_a data","title":"bkash_a","properties":{"":{"type":"Description:","description":"Currency: `BDT`"},"account_email":{"type":"string","example":"johndoe@gmail.com","maximum":100,"description":"Receiver account email"},"account_number":{"type":"string","example":243874227,"pattern":"^0[0-9]{10}$","minimum":11,"maximum":11,"description":"Receiver account number"}},"required":["account_email","account_number"]},{"type":"object","description":"UPI p2p data","title":"upi_p2p","properties":{"":{"type":"Description:","description":"Currency: `INR`"},"account_email":{"type":"string","example":"johndoe@gmail.com","maximum":100,"description":"Receiver account email"},"account_number":{"type":"string","example":243874227,"pattern":"^0[0-9]{11}$","minimum":11,"maximum":11,"description":"Receiver account number"}},"required":["account_email","account_number"]},{"type":"object","description":"ApayBDT data","title":"apaybdt","properties":{"":{"type":"Description:","description":"Currency: `BDT`"},"account_email":{"type":"string","example":"johndoe@gmail.com","maximum":100,"description":"Receiver account email"},"account_number":{"type":"string","example":243874227,"pattern":"^0[0-9]{11}$","minimum":11,"maximum":11,"description":"Receiver account number"}},"required":["account_email","account_number"]},{"type":"object","description":"UPAY data","title":"upay","properties":{"":{"type":"Description:","description":"Currency: `BDT`"},"account_email":{"type":"string","example":"johndoe@gmail.com","maximum":100,"description":"Receiver account email"},"account_number":{"type":"string","example":243874227,"pattern":"^0[0-9]{10}$","minimum":11,"maximum":11,"description":"Receiver account number"}},"required":["account_number"]},{"type":"object","description":"Payme data","title":"payme","properties":{"":{"type":"Description:","description":"Currency: `UZS`"},"card_number":{"type":"string","example":1234123412341234,"pattern":"^[0-9]{16}$","minimum":16,"maximum":16,"description":"Card number"}},"required":["card_number"]},{"type":"object","description":"Nagad API V","title":"nagad_api_v","properties":{"":{"type":"Description:","description":"Currency: `BDT`"},"account_number":{"type":"string","example":12345678912,"pattern":"^[0-9]{11,11}$","minimum":11,"maximum":11,"description":"Account number"}},"required":["account_number"]},{"type":"object","description":"Paytm data","title":"paytm","properties":{"":{"type":"Description:","description":"Currency: `INR`"},"account_number":{"type":"string","example":1234567890,"pattern":"^[0-9]{10}$","minimum":10,"maximum":10,"description":"Receiver account number"}},"required":["account_number"]},{"type":"object","description":"BKash_b data","title":"bkash_b","properties":{"":{"type":"Description:","description":"Currency: `BDT`"},"account_email":{"type":"string","example":"johndoe@gmail.com","maximum":100,"description":"Receiver account email"},"account_number":{"type":"string","example":243874227,"pattern":"^0[0-9]{10}$","minimum":11,"maximum":11,"description":"Receiver account number"}},"required":["account_email","account_number"]},{"type":"object","description":"Nagad A","title":"nagad_a","properties":{"":{"type":"Description:","description":"Currency: `BDT`"},"account_number":{"type":"string","example":12345678912,"pattern":"^[0-9]{11,11}$","minimum":11,"maximum":11,"description":"Account number"}},"required":["account_number"]},{"type":"object","description":"Nagad B","title":"nagad_b","properties":{"":{"type":"Description:","description":"Currency: `BDT`"},"account_number":{"type":"string","example":12345678912,"pattern":"^[0-9]{11,11}$","minimum":11,"maximum":11,"description":"Account number"}},"required":["account_number"]},{"type":"object","description":"Jazzcash_l data","title":"jazzcash_l","properties":{"":{"type":"Description:","description":"Currency: `PKR`"},"account_name":{"type":"string","example":"John Doe","maximum":50,"description":"Receiver account name"},"account_number":{"type":"string","example":12345678912,"pattern":"^[0-9]{11}$","minimum":11,"maximum":11,"description":"Account number"}},"required":["account_name","account_number"]},{"type":"object","description":"wavepay_l data","title":"wavepay_l","properties":{"":{"type":"Description:","description":"Currency: `MMK`"},"phone_number":{"type":"string","example":12345678912,"pattern":"^0[0-9]{8,10}$","minimum":9,"maximum":11,"description":"Phone number"}},"required":["phone_number"]},{"type":"object","description":"d17_l data","title":"d17_l","properties":{"":{"type":"Description:","description":"Currency: `TND`"},"phone_number":{"type":"string","example":12345678,"pattern":"^[0-9]{8}$","minimum":8,"maximum":8,"description":"Phone number"}},"required":["phone_number"]},{"type":"object","description":"Pix-p2p data","title":"pix_p2p","properties":{"":{"type":"Description:","description":"Currency: `BRL`"},"account_number":{"type":"string","example":12345678912,"pattern":"^[0-9]{11}$","minimum":11,"maximum":11,"description":"Account number"}},"required":["account_number"]},{"type":"object","description":"Spei-p2p data","title":"spei_p2p","properties":{"":{"type":"Description:","description":"Currency: `MXN`"},"account_number":{"type":"string","example":12345678912,"pattern":"^[0-9]{16,18}$","minimum":16,"maximum":18,"description":"- If the account number is 18 digits long, it means the account type is: CLABE\n- if the account number is 16 digits long, it means: BANK_CARD"},"bank_name":{"type":"string","example":"Test Bank","minimum":1,"maximum":50,"description":"Bank name"}},"required":["account_number","bank_name"]},{"type":"object","description":"Wing_l data","title":"wing_l","properties":{"":{"type":"Description:","description":"Currency: `KHR`"},"account_number":{"type":"string","example":12345678912,"pattern":"^[0-9]{9,11}$","minimum":9,"maximum":11,"description":"Account number"}},"required":["account_number"]},{"type":"object","description":"Esewa data","title":"esewa","properties":{"":{"type":"Description:","description":"Currency: `NPR`"},"phone_number":{"type":"string","example":1234567891,"pattern":"^[0-9]{10}$","minimum":10,"maximum":10,"description":"Phone number"}},"required":["phone_number"]},{"type":"object","description":"Khalti data","title":"khalti","properties":{"":{"type":"Description:","description":"Currency: `NPR`"},"phone_number":{"type":"string","example":1234567891,"pattern":"^[0-9]{10}$","minimum":10,"maximum":10,"description":"Phone number without country code (+977)"}},"required":["phone_number"]},{"type":"object","description":"Nayapay_l data","title":"nayapay_l","properties":{"":{"type":"Description:","description":"Currency: `PKR`"},"account_name":{"type":"string","example":"John Doe","maximum":50,"description":"Receiver account name"},"account_number":{"type":"string","example":12345678912,"pattern":"^[0-9]{11}$","minimum":11,"maximum":11,"description":"Account number"}},"required":["account_name","account_number"]},{"type":"object","description":"Ababank data","title":"ababank","properties":{"":{"type":"Description:","description":"Currency: `KHR`"},"account_name":{"type":"string","example":"John Doe","maximum":50,"description":"Receiver account name"},"account_number":{"type":"string","example":123456789,"pattern":"^[0-9]{9}$","minimum":9,"maximum":9,"description":"Account number"}},"required":["account_name","account_number"]},{"type":"object","description":"Jazzcash Withdrawal data","title":"pkr_w","properties":{"":{"type":"Description:","description":"Currency: `PKR`"},"account_number":{"type":"string","example":12345678900987,"minimum":10,"maximum":14,"pattern":"^[0-9]+$","description":"If you wish to make a withdrawal via EasyPaisa or JazzCash, please use the CNIC number without any dashes or spaces. \nFor any other banking method, please refer to the bank account details."},"phone_number":{"type":"string","example":"03123456789","minimum":11,"maximum":11,"pattern":"^03[0-9]+$","description":"Account phone number"},"bank_name":{"type":"string","example":"Alfalah","minimum":3,"maximum":65,"pattern":"^[A-Za-z\\s]+$","description":"Bank name to make a withdrawal. The supported bank names are listed below:\n| № | Bank Name |\n|-----|--------------------------------------------|\n| 1 | ABHI FINANCE SERVICES LIMITED |\n| 2 | AFT |\n| 3 | AFT IBFT |\n| 4 | Advans |\n| 5 | Al Meezan Investment Management Limited |\n| 6 | AlHabib |\n| 7 | Albarka |\n| 8 | Alfalah |\n| 9 | Allied |\n| 10 | Apna |\n| 11 | Askari |\n| 12 | BOK |\n| 13 | BYKEA |\n| 14 | BankIslami |\n| 15 | Burj |\n| 16 | Central Directorate of National Savings |\n| 17 | Central Directorate of National Savings (CDNS) |\n| 18 | Central Directorate of National Savings (CDNS) – 1IBFT IMD Addition |\n| 19 | Citi |\n| 20 | DubaiIslamic |\n| 21 | EZ wage |\n| 22 | EasyPaisa |\n| 23 | FINCA |\n| 24 | FINJA |\n| 25 | FWBL |\n| 26 | Faysal |\n| 27 | First Microfinance Bank |\n| 28 | HBL |\n| 29 | HBL ASSET MANAGEMENT |\n| 30 | Habib Metro Bank – Bulk 1IBFT |\n| 31 | HabibMetro |\n| 32 | Humrah Financial Services |\n| 33 | ICBC |\n| 34 | JS |\n| 35 | KASB |\n| 36 | KBL |\n| 37 | KEENU |\n| 38 | KEENU Bank |\n| 39 | KEENU – IMD and 1IBFT Screen Addition |\n| 40 | Keenu1 |\n| 41 | MCB |\n| 42 | MCB-Arif Habib |\n| 43 | MIB |\n| 44 | Meezan |\n| 45 | MobilinkBank Pakistan |\n| 46 | NAYAPAY |\n| 47 | NBP |\n| 48 | NBP Fund Management Limited |\n| 49 | NBP1 |\n| 50 | NIB |\n| 51 | NRSP |\n| 52 | National Bank |\n| 53 | Numbers Private Limited |\n| 54 | PayMax |\n| 55 | PayMax1 |\n| 56 | PunjabBank |\n| 57 | SADAPAY |\n| 58 | SCB |\n| 59 | SEEDCREED Financial Services Limited |\n| 60 | SIMPAISA |\n| 61 | SIND |\n| 62 | Samba |\n| 63 | Silk |\n| 64 | SindhBank |\n| 65 | Soneri |\n| 66 | Summit |\n| 67 | TAG |\n| 68 | TezPAy |\n| 69 | UBL |\n| 70 | UPaisa |\n| 71 | Waseela |\n| 72 | Waseela bank |\n| 73 | ZTBL1 |\n| 74 | Zarai Taraqiati Bank |\n| 75 | JazzCash |"}},"required":["account_number","phone_number","bank_name"]},{"type":"object","description":"Flouci Withdrawal data","title":"flouci","properties":{"":{"type":"Description:","description":"Currency: `TND`"},"phone_number":{"type":"string","example":12345678,"minimum":8,"maximum":8,"pattern":"^[0-9]{8}$","description":"Phone number"}},"required":["phone_number"]},{"type":"object","description":"Ipay_l Withdrawal data","title":"ipay_l","oneOf":[{"type":"object","title":"phone","properties":{"":{"type":"Description:","description":"Currency: `LKR`"},"payment_method":{"type":"string","enum":["phone"],"example":"phone","description":"Payment method type, must be `phone` for phone payment method"},"phone_number":{"type":"string","example":1234567890,"minimum":10,"maximum":10,"pattern":"^[0-9]+$","description":"Phone number"}},"required":["payment_method","phone_number"]},{"type":"object","title":"bank","properties":{"":{"type":"Description:","description":"Currency: `LKR`"},"payment_method":{"type":"string","enum":["bank"],"example":"bank","description":"Payment method type, must be `bank` for bank payment method"},"account_name":{"type":"string","example":"Name","minimum":1,"maximum":50,"pattern":"^[A-Za-z\\\\s]+$","description":"Account name"},"account_number":{"type":"string","example":1234567890,"minimum":5,"maximum":28,"pattern":"^[0-9]+$","description":"Account number"},"bank_name":{"type":"string","example":"Bank","minimum":3,"maximum":65,"pattern":"^[A-Za-z\\\\s]+$","description":"
\n Bank name to make a withdrawal. The supported bank names are listed below:\n \n | № | Bank Name |\n |-----|---------------------------------------------|\n | 1 | LOLC Finance PLC |\n | 2 | Amana Bank PLC |\n | 3 | Axis Bank LTD |\n | 4 | Bank of Ceylon |\n | 5 | Cargills Bank |\n | 6 | Central Finance PLC |\n | 7 | CITI Bank N.A. |\n | 8 | Citizen Development Business Finance PLC |\n | 9 | Commercial Bank PLC |\n | 10 | Deutsche Bank (ASIA) |\n | 11 | DFCC Wardhana Bank |\n | 12 | Dialog Finance Plc |\n | 13 | HABIB Bank LTD |\n | 14 | Hatton National Bank PLC |\n | 15 | HDFC Bank |\n | 16 | HSBC |\n | 17 | ICICI Bank LTD |\n | 18 | LB Finance PLC |\n | 19 | Muslim Commercial Bank LTD |\n | 20 | National Development Bank PLC |\n | 21 | National Savings Bank |\n | 22 | Nations Trust Bank |\n | 23 | Pan Asia Bank LTD |\n | 24 | People's Bank |\n | 25 | People's Leasing |\n | 26 | Public Bank Berhard |\n | 27 | Regional Development Bank |\n | 28 | Richard Pieris Finance |\n | 29 | Sampath Bank PLC |\n | 30 | Sanasa Development Bank |\n | 31 | Sarvodaya Development Finance LTD |\n | 32 | Senkadagala Finance PLC |\n | 33 | Seylan Bank LTD |\n | 34 | Singer Finance (Lanka) PLC |\n | 35 | Standard Chartered Bank |\n | 36 | State Bank Of India |\n | 37 | Union Bank of Colombo PLC |\n | 38 | Union Pay International |\n
"}},"required":["payment_method","account_name","account_number","bank_name"]}]}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"title":"Success","required":["success","status","order_id"],"properties":{"success":{"type":"boolean","example":true,"description":"`true` if there are no errors"},"status":{"type":"string","enum":["Pending"],"example":"Pending","description":"Withdrawal status"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Withdrawal ID in the A-Pay system"},"data":{"type":"object","description":"Payment system specific data"}}},{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"status":{"type":"string","enum":["Failed"],"example":"Failed","description":"Withdrawal status"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Withdrawal ID in the A-Pay system"}}}]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"status":{"type":"string","enum":["Failed"],"example":"Failed","description":"Withdrawal status"},"message":{"type":"string","example":"Invalid request","description":"Description of error"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Withdrawal ID in the A-Pay system"}}}}}}}}},"/Remotes/withdrawal-info":{"get":{"security":[{"apikey":[]}],"tags":["Withdrawal"],"summary":"Withdrawal information","parameters":[{"in":"query","name":"project_id","schema":{"type":"number"},"description":"Project ID in the A-Pay system","example":123,"required":true},{"in":"query","name":"order_id","schema":{"type":"string"},"description":"Deposit ID in the A-Pay system","example":"7fa13dbc3b79e05e","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"title":"Success","required":["success","status","order_id","amount","currency","payment_system","custom_user_id","created_at"],"properties":{"success":{"type":"boolean","example":true,"description":"`true` if there are no errors"},"status":{"type":"string","enum":["Pending","Success","Failed","Rejected"],"example":"Success","description":"Withdrawal status"},"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Withdrawal ID in the A-Pay system"},"amount":{"type":"number","description":"Withdrawal amount","example":10},"currency":{"$ref":"#/components/schemas/currency"},"payment_system":{"$ref":"#/components/schemas/ps_withdrawal"},"custom_transaction_id":{"type":"string","maximum":200,"example":"custom123","description":"Transaction ID in the client's system"},"custom_user_id":{"type":"string","maximum":200,"example":"user123","description":"User ID in the client's system. Must be unique for each user"},"created_at":{"type":"integer","example":1665135515,"description":"Withdrawal creation time in timestamp format"}}},{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"},"message":{"type":"string","example":"Invalid request","description":"Description of error"}}}]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","example":false,"description":"`false` if an error occurred"},"code":{"type":"number","example":400,"description":"Error code in the A-pay system"},"message":{"type":"string","example":"Invalid request","description":"Description of error"}}}}}}}}}},"components":{"securitySchemes":{"apikey":{"type":"apiKey","name":"apikey","in":"header"}},"schemas":{"easypaisa":{"oneOf":[{"type":"string","title":"Error: too many requests","description":"No more than two requests per minute allowed per `account number`."},{"type":"string","title":"Error: Limit of Failed Requests Exceeded","description":"Deposits are blocked for 24 hours after three failed deposit attempts within the same hour, identified by account_number."}]},"ps_payment_page":{"type":"string","example":"upi_fast","enum":["easypaisa","mpesa","bankalfalah","upi_fast","upi_fast_v","upi_p2p","upi_a","bkash_a","apaybdt","upay","nagad_api_v","payme","paytm","phonepe","bkash_b","upi_link","nagad_a","nagad_b","easypaisa_l","upi_push","wavepay_l","d17_l","pix_p2p","spei_p2p","phonepe_fast","upi_fast_vip","wing_l","esewa","khalti","nayapay_l","ababank","jazzcash_fast","pkr_w","flouci","ipay_l","imps","jazzcash","etb_fast"]},"ps_all":{"type":"string","example":"mpesa","title":"Payment system","enum":["mpesa","easypaisa","bankalfalah","upi_fast","upi_fast_v","upi_fast_qr","upi_p2p","upi_a","bkash_a","apaybdt","upay","nagad_api_v","payme","paytm","phonepe","imps","imps_top","bkash_b","upi_link","nagad_a","nagad_b","easypaisa_l","upi_push","jazzcash_l","wavepay_l","d17_l","pix_p2p","spei_p2p","phonepe_fast","upi_fast_vip","wing_l","esewa","khalti","nayapay_l","ababank","jazzcash_fast","pkr_w","flouci","ipay_l","imps","jazzcash","etb_fast"],"description":"Payment system ID connected to the project"},"ps_deposit":{"type":"string","example":"mpesa","title":"Payment system","enum":["mpesa","easypaisa","bankalfalah","upi_fast","upi_fast_v","upi_fast_qr","upi_p2p","upi_a","bkash_a","apaybdt","upay","nagad_api_v","payme","paytm","phonepe","bkash_b","upi_link","nagad_a","nagad_b","easypaisa_l","upi_push","jazzcash_l","wavepay_l","d17_l","pix_p2p","spei_p2p","phonepe_fast","upi_fast_vip","wing_l","esewa","khalti","nayapay_l","ababank","jazzcash_fast","flouci","ipay_l","imps","jazzcash","etb_fast"],"description":"Name of the payment system in A-Pay"},"ps_withdrawal":{"type":"string","title":"Payment system","enum":["mpesa","easypaisa","bankalfalah","upi_fast","upi_fast_v","upi_p2p","bkash_a","apaybdt","upay","nagad_api_v","payme","paytm","phonepe","imps","imps_top","bkash_b","nagad_a","nagad_b","jazzcash_l","wavepay_l","d17_l","pix_p2p","spei_p2p","wing_l","esewa","khalti","nayapay_l","ababank","pkr_w","flouci","ipay_l"],"example":"mpesa","description":"Name of the payment system in A-Pay"},"currency":{"type":"string","example":"INR","title":"Currency","enum":["INR","BDT","PKR","KES","UZS","MMK","TND","BRL","MXN","KHR","NPR","LKR","ETB"],"description":"
\n Payment system currency\n\n | Currency | Payment systems |\n |----------|-----------------|\n | INR | `upi_fast`, `upi_fast_v`, `upi_fast_qr`, `upi_p2p`, `upi_a`, `paytm`, `phonepe`, `imps`, `imps_top`, `upi_link`, `upi_push`, `phonepe_fast`, `upi_fast_vip`, `imps` |\n | BDT | `nagad_api_v`, `bkash_a`, `apaybdt`, `upay`, `bkash_b`, `nagad_a`, `nagad_b` |\n | PKR | `bankalfalah`, `easypaisa`, `jazzcash_l`, `nayapay_l`, `jazzcash_fast`, `pkr_w`, `jazzcash` |\n | KES | `mpesa` |\n | UZS | `payme` |\n | MMK | `wavepay_l` |\n | TND | `d17_l`, `flouci` |\n | BRL | `pix_p2p` |\n | MXN | `spei_p2p` |\n | KHR | `wing_l`, `ababank` |\n | NPR | `esewa`, `khalti` |\n | LKR | `ipay_l` |\n | ETB | `etb_fast` |\n
"}}},"x-webhooks":{"DepositWebhook":{"post":{"summary":"Deposit","operationId":"DepositWebhook","tags":["Webhooks"],"description":"Signature generation (signature)\n\nWhen sending webhooks A-Pay also sends signature: specifically generated hash string that is created using a private key.\n\nThe signature itself is calculated as follows:\n\n```php\n$signature = sha1($access_key . $private_key . md5($transactions->toJson(JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)));\n```\n\na string of three parameters is passed to the sha1 function:\n| Parameter | Description |\n|--------------|------------------------------------------------------------------------|\n| $access_key | The public key is specified in the settings of the A-Pay technical support personal account |\n| $private_key | The private key is specified in the settings of the A-Pay technical support personal account |\n| md5(...) | Hash from the MD5 function of the entire array of transactions in JSON format |\n\nAs a result of executing this code, a string is obtained that cannot be faked without having a private key that is not passed in webhooks.\n\nThe client can compare the generated signature with the received signature from the webhook and thereby make sure that the data that came was actually sent, and not faked by scammer.\n\nFunds should only be credited to your users based on the amount specified in the webhook.\n\nThe webhook will include the status of the transactions:\n - If the status is “Success”, the client should proceed with depositing the funds into the user account.\n - If the status is “Failed” or “Rejected,” no funds should be deposited, or the deposit should be canceled.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["access_key","signature","transactions"],"properties":{"access_key":{"type":"string","example":"mrOYReXJphqo7lkL","description":"The access key is specified in the settings of the A-Pay technical support personal account"},"signature":{"type":"string","example":"dfsfrwe3344d","description":"The signature used to verify the validity of the postback. Concept of generation in the description of the deposit webhook"},"transactions":{"description":"Information about the deposits made (one or more) is passed.","type":"array","items":{"type":"object","required":["order_id","status","amount","currency","payment_system","created_at"],"properties":{"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Deposit ID in the A-Pay system"},"status":{"type":"string","enum":["Success","Failed","Rejected"],"description":"Deposit status, if the deposit was successful, the status will be `Success`"},"amount":{"type":"number","example":6008.39,"minimum":0,"description":"Deposit amount"},"currency":{"$ref":"#/components/schemas/currency"},"payment_system":{"$ref":"#/components/schemas/ps_deposit"},"custom_transaction_id":{"type":"string","description":"Transaction ID in the client's system"},"custom_user_id":{"type":"string","description":"User ID in the client's system"},"created_at":{"type":"integer","example":1665731710,"description":"Deposit creation time, in timestamp UTC format"},"activated_at":{"type":"integer","example":1665731710,"description":"Deposit activation date, in timestamp UTC format"}}}}}}}}},"responses":{"default":{"description":"If `{\"status\":\"OK\"}` was passed we consider webhook successfully delivered.","content":{"application/json":{"schema":{"required":["status"],"properties":{"status":{"type":"string","example":"OK","description":"If `OK` was passed we consider webhook successfully delivered."}}}}}}}}},"WithdrawalWebhook":{"post":{"summary":"Withdrawal","operationId":"WithdrawalWebhook","tags":["Webhooks"],"description":"Signature generation (signature)\n\nWhen sending webhooks A-Pay also sends signature: specifically generated hash string that is created using a private key.\n\nThe signature itself is calculated as follows:\n\n```php\n$signature = sha1($access_key . $private_key . md5($transactions->toJson(JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)));\n```\n\na string of three parameters is passed to the sha1 function:\n| Parameter | Description |\n|--------------|------------------------------------------------------------------------|\n| $access_key | The public key is specified in the settings of the A-Pay technical support personal account |\n| $private_key | The private key is specified in the settings of the A-Pay technical support personal account |\n| md5(...) | Hash from the MD5 function of the entire array of transactions in JSON format |\n\nAs a result of executing this code, a string is obtained that cannot be faked without having a private key that is not passed in webhooks.\n\nThe client can compare the generated signature with the received signature from the webhook and thereby make sure that the data that came was actually sent, and not faked by scammer.\n\nThe webhook will include the status of the transactions:\n - If the status is “Success”, the client should proceed with withdrawal the funds from the user account.\n - If the status is “Failed” or “Rejected,” no funds should be withdrawal, or the withdrawal should be canceled.\n\nFunds should only be debited from your users according to the amount indicated in the webhook.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["access_key","signature","transactions"],"properties":{"access_key":{"type":"string","example":"mrOYReXJphqo7lkL","description":"The access key is specified in the settings of the A-Pay technical support personal account"},"signature":{"type":"string","example":"dfsfrwe3344d","description":"The signature used to verify the validity of the postback. Concept of generation in the description of the deposit webhook"},"transactions":{"description":"Information about the deposits made (one or more) is passed.","type":"array","items":{"type":"object","required":["order_id","status","amount","currency","payment_system","created_at"],"properties":{"order_id":{"type":"string","example":"7fa13dbc3b79e05e","description":"Withdrawal ID in the A-Pay system"},"status":{"type":"string","enum":["Success","Failed","Rejected"],"description":"Withdrawal status, if the withdrawal was successful, the status will be `Success`"},"amount":{"type":"number","example":6008.39,"minimum":0,"description":"Withdrawal amount"},"currency":{"$ref":"#/components/schemas/currency"},"payment_system":{"$ref":"#/components/schemas/ps_withdrawal"},"custom_transaction_id":{"type":"string","description":"Transaction ID in the client's system"},"custom_user_id":{"type":"string","description":"User ID in the client's system"},"created_at":{"type":"integer","example":1665731710,"description":"Deposit creation time, in timestamp UTC format"},"activated_at":{"type":"integer","example":1665731710,"description":"Deposit activation date, in timestamp UTC format"}}}}}}}}},"responses":{"default":{"description":"If `{\"status\":\"OK\"}` was passed we consider webhook successfully delivered.","content":{"application/json":{"schema":{"required":["status"],"properties":{"status":{"type":"string","example":"OK","description":"If `OK` was passed we consider webhook successfully delivered."}}}}}}}}}}}