{"swagger":"2.0","info":{"title":"mard2p API","description":"This is a payment pending using Mobile Money API and Credit Card. This API allows merchant to get payment information of the consumer which have its own account and money manage by the solution. The merchant can receive its money if only the consumer agreed [1st case].","contact":{"name":"Steve Mbakop","email":"mard@mardets.com"},"license":{"name":"MIT","url":"http://opensource.org/licenses/MIT"},"version":"0.0.2-dev"},"host":"api.apibuilder.io","basePath":"/","schemes":["https"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/accounts/create":{"post":{"description":"Used to create an account.","parameters":[{"name":"accountid","in":"form","required":true,"type":"integer","format":"int64"},{"name":"ownerid","in":"form","required":true,"type":"string"},{"name":"total_amount","in":"form","required":true,"type":"number","format":"double"},{"name":"sold","in":"form","required":true,"type":"number","format":"double"},{"name":"debit","in":"form","required":true,"type":"number","format":"double"},{"name":"currency","in":"form","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/account"}},"409":{"description":"409 response"}}}},"/accounts/update/{accountid}":{"put":{"description":"Used to update an account.","parameters":[{"name":"accountid","in":"path","required":true,"type":"integer","format":"int64"},{"name":"ownerid","in":"form","required":true,"type":"string"},{"name":"total_amount","in":"form","required":true,"type":"number","format":"double"},{"name":"currency","in":"form","required":true,"type":"string"},{"name":"sold","in":"form","required":true,"type":"number","format":"double"},{"name":"debit","in":"form","required":true,"type":"number","format":"double"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/account"}},"409":{"description":"409 response"}}}},"/accounts/delete/{accountid}":{"delete":{"description":"Delete some account.","parameters":[{"name":"accountid","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"204":{"description":"204 response"},"401":{"description":"401 response"},"404":{"description":"404 response"}}}},"/accounts/{accountid}":{"get":{"description":"Find account by its id","parameters":[{"name":"accountid","in":"path","required":true,"type":"integer","format":"int64"},{"name":"ownerid","in":"query","required":true,"type":"string"},{"name":"total_amount","in":"query","required":true,"type":"number","format":"double"},{"name":"sold","in":"query","required":true,"type":"number","format":"double"},{"name":"debit","in":"query","required":true,"type":"number","format":"double"},{"name":"currency","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/account"}},"404":{"description":"404 response"}}}},"/accounts/list":{"get":{"description":"Find all the accounts.","parameters":[{"name":"accountid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"ownerid","in":"query","required":true,"type":"string"},{"name":"total_amount","in":"query","required":true,"type":"number","format":"double"},{"name":"currency","in":"query","required":true,"type":"string"},{"name":"sold","in":"query","required":true,"type":"number","format":"double"},{"name":"debit","in":"query","required":true,"type":"number","format":"double"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/account"}}},"404":{"description":"404 response"}}}},"/deposits/delete/{depid}":{"delete":{"description":"Delete some deposit.","parameters":[{"name":"depid","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"204":{"description":"204 response"},"401":{"description":"401 response"},"404":{"description":"404 response"}}}},"/deposits/{depid}":{"get":{"description":"Find deposit by its id.","parameters":[{"name":"depid","in":"path","required":true,"type":"integer","format":"int64"},{"name":"payment_method","in":"query","required":true,"type":"string"},{"name":"actorid","in":"query","required":true,"type":"string"},{"name":"ref_accountid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"operatorid","in":"query","required":true,"type":"string"},{"name":"amount","in":"query","required":true,"type":"number","format":"double"},{"name":"phone","in":"query","required":true,"type":"integer","format":"int64"},{"name":"pin","in":"query","required":true,"type":"integer","format":"int64"},{"name":"currency","in":"query","required":true,"type":"string"},{"name":"payment_context","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/payment"}},"404":{"description":"404 response"}}}},"/deposits/list":{"get":{"description":"List all the deposits","parameters":[{"name":"payid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"payment_method","in":"query","required":true,"type":"string"},{"name":"actorid","in":"query","required":true,"type":"string"},{"name":"ref_accountid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"operatorid","in":"query","required":true,"type":"string"},{"name":"amount","in":"query","required":true,"type":"number","format":"double"},{"name":"phone","in":"query","required":true,"type":"integer","format":"int64"},{"name":"pin","in":"query","required":true,"type":"integer","format":"int64"},{"name":"currency","in":"query","required":true,"type":"string"},{"name":"payment_context","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/payment"}}},"404":{"description":"404 response"}}}},"/payments/create":{"post":{"description":"Used to create a payment.","parameters":[{"name":"payid","in":"form","required":true,"type":"integer","format":"int64"},{"name":"payment_method","in":"form","required":true,"type":"string"},{"name":"actorid","in":"form","required":true,"type":"string"},{"name":"ref_accountid","in":"form","required":true,"type":"integer","format":"int64"},{"name":"operatorid","in":"form","required":true,"type":"string"},{"name":"amount","in":"form","required":true,"type":"number","format":"double"},{"name":"currency","in":"form","required":true,"type":"string"},{"name":"phone","in":"form","required":true,"type":"integer","format":"int64"},{"name":"pin","in":"form","required":true,"type":"integer","format":"int32"},{"name":"payment_context","in":"form","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/payment"}},"409":{"description":"409 response"}}}},"/payments/update/{payid}":{"put":{"description":"Used to update a payment.","parameters":[{"name":"payid","in":"path","required":true,"type":"integer","format":"int64"},{"name":"payment_method","in":"form","required":true,"type":"string"},{"name":"actorid","in":"form","required":true,"type":"string"},{"name":"ref_accountid","in":"form","required":true,"type":"integer","format":"int64"},{"name":"operatorid","in":"form","required":true,"type":"string"},{"name":"amount","in":"form","required":true,"type":"number","format":"double"},{"name":"phone","in":"form","required":true,"type":"integer","format":"int64"},{"name":"pin","in":"form","required":true,"type":"integer","format":"int32"},{"name":"currency","in":"form","required":true,"type":"string"},{"name":"payment_context","in":"form","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/payment"}},"409":{"description":"409 response"}}}},"/payments/delete/{payid}":{"delete":{"description":"Delete some payment.","parameters":[{"name":"payid","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"204":{"description":"204 response"},"401":{"description":"401 response"},"404":{"description":"404 response"}}}},"/payments/{payid}":{"get":{"description":"Find payment by its id.","parameters":[{"name":"payid","in":"path","required":true,"type":"integer","format":"int64"},{"name":"payment_method","in":"query","required":true,"type":"string"},{"name":"actorid","in":"query","required":true,"type":"string"},{"name":"ref_accountid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"operatorid","in":"query","required":true,"type":"string"},{"name":"amount","in":"query","required":true,"type":"number","format":"double"},{"name":"phone","in":"query","required":true,"type":"integer","format":"int64"},{"name":"pin","in":"query","required":true,"type":"integer","format":"int64"},{"name":"currency","in":"query","required":true,"type":"string"},{"name":"payment_context","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/payment"}},"404":{"description":"404 response"}}}},"/payments/{ref_accountid}":{"get":{"description":"Find payment by id accountid","parameters":[{"name":"ref_accountid","in":"path","required":true,"type":"integer","format":"int64"},{"name":"payid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"payment_method","in":"query","required":true,"type":"string"},{"name":"actorid","in":"query","required":true,"type":"string"},{"name":"operatorid","in":"query","required":true,"type":"string"},{"name":"amount","in":"query","required":true,"type":"number","format":"double"},{"name":"phone","in":"query","required":true,"type":"integer","format":"int64"},{"name":"pin","in":"query","required":true,"type":"integer","format":"int32"},{"name":"currency","in":"query","required":true,"type":"string"},{"name":"payment_context","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/payment"}},"404":{"description":"404 response"}}}},"/payments/list":{"get":{"description":"List all the payments","parameters":[{"name":"payid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"payment_method","in":"query","required":true,"type":"string"},{"name":"actorid","in":"query","required":true,"type":"string"},{"name":"ref_accountid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"operatorid","in":"query","required":true,"type":"string"},{"name":"amount","in":"query","required":true,"type":"number","format":"double"},{"name":"phone","in":"query","required":true,"type":"integer","format":"int64"},{"name":"pin","in":"query","required":true,"type":"integer","format":"int64"},{"name":"currency","in":"query","required":true,"type":"string"},{"name":"payment_context","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/payment"}}},"404":{"description":"404 response"}}}},"/transfers/create":{"post":{"description":"Used to create a transfer resource.","parameters":[{"name":"transferid","in":"form","required":true,"type":"integer","format":"int64"},{"name":"senderid","in":"form","required":true,"type":"string"},{"name":"amount","in":"form","required":true,"type":"number","format":"double"},{"name":"currency","in":"form","required":true,"type":"string"},{"name":"ref_accountid_receiver","in":"form","required":true,"type":"integer","format":"int64"},{"name":"ref_accountid_sender","in":"form","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/transfer"}},"409":{"description":"409 response"}}}},"/transfers/update/{transferid}":{"put":{"description":"Used to update a transfer resource.","parameters":[{"name":"transferid","in":"path","required":true,"type":"integer","format":"int64"},{"name":"senderid","in":"form","required":true,"type":"string"},{"name":"amount","in":"form","required":true,"type":"number","format":"double"},{"name":"currency","in":"form","required":true,"type":"string"},{"name":"ref_accountid_receiver","in":"form","required":true,"type":"integer","format":"int64"},{"name":"ref_accountid_sender","in":"form","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/transfer"}},"409":{"description":"409 response"}}}},"/transfers/delete/{transferid}":{"delete":{"description":"Delete some transfer.","parameters":[{"name":"transferid","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"204":{"description":"204 response"},"401":{"description":"401 response"},"404":{"description":"404 response"}}}},"/transfers/{transferid}":{"get":{"description":"Find transfer by its id","parameters":[{"name":"transferid","in":"path","required":true,"type":"integer","format":"int64"},{"name":"senderid","in":"query","required":true,"type":"string"},{"name":"amount","in":"query","required":true,"type":"number","format":"double"},{"name":"currency","in":"query","required":true,"type":"string"},{"name":"ref_accountid_receiver","in":"query","required":true,"type":"integer","format":"int64"},{"name":"ref_accountid_sender","in":"query","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/account"}},"404":{"description":"404 response"}}}},"/transfers/list":{"get":{"description":"Find all the transfers.","parameters":[{"name":"transferid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"senderid","in":"query","required":true,"type":"string"},{"name":"amount","in":"query","required":true,"type":"number","format":"double"},{"name":"currency","in":"query","required":true,"type":"string"},{"name":"ref_accountid_receiver","in":"query","required":true,"type":"integer","format":"int64"},{"name":"ref_accountid_sender","in":"query","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/account"}}},"404":{"description":"404 response"}}}},"/validations":{"post":{"parameters":[{"name":"string","in":"body","schema":{"$ref":"#/definitions/string"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/validation"}}}}},"/withdraws/delete/{wdwid}":{"delete":{"description":"Delete some withdraw.","parameters":[{"name":"wdwid","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"204":{"description":"204 response"},"401":{"description":"401 response"},"404":{"description":"404 response"}}}},"/withdraws/{wdwid}":{"get":{"description":"Find withdraw by its id.","parameters":[{"name":"wdwid","in":"path","required":true,"type":"integer","format":"int64"},{"name":"depid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"payment_method","in":"query","required":true,"type":"string"},{"name":"actorid","in":"query","required":true,"type":"string"},{"name":"ref_accountid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"operatorid","in":"query","required":true,"type":"string"},{"name":"amount","in":"query","required":true,"type":"number","format":"double"},{"name":"phone","in":"query","required":true,"type":"integer","format":"int64"},{"name":"pin","in":"query","required":true,"type":"integer","format":"int64"},{"name":"currency","in":"query","required":true,"type":"string"},{"name":"payment_context","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/payment"}},"404":{"description":"404 response"}}}},"/withdraws/list":{"get":{"description":"List all the withdraws","parameters":[{"name":"payid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"payment_method","in":"query","required":true,"type":"string"},{"name":"actorid","in":"query","required":true,"type":"string"},{"name":"ref_accountid","in":"query","required":true,"type":"integer","format":"int64"},{"name":"operatorid","in":"query","required":true,"type":"string"},{"name":"amount","in":"query","required":true,"type":"number","format":"double"},{"name":"phone","in":"query","required":true,"type":"integer","format":"int64"},{"name":"pin","in":"query","required":true,"type":"integer","format":"int64"},{"name":"currency","in":"query","required":true,"type":"string"},{"name":"payment_context","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/payment"}}},"404":{"description":"404 response"}}}}},"definitions":{"account":{"type":"object","description":"Account is defined by the app specifically to manage users transactions.","title":"account","required":["accountid","ownerid","total_amount","currency","sold","debit"],"properties":{"accountid":{"description":"Internal unique identifier for this account.","type":"integer","format":"int64"},"ownerid":{"description":"The username registered in the application","type":"string"},"total_amount":{"description":"The amount specific to the debit and sold account. This field allows the process transactions.","type":"number","format":"double"},"currency":{"description":"The currency specific to location.","type":"string"},"sold":{"description":"The amount specific to the balance account. This field allows the process transactions.","type":"number","format":"double"},"debit":{"description":"The amount specific to the money merchant have to collect and pay. This field allows the process transactions.","type":"number","format":"double"}}},"account_form":{"type":"object","title":"account_form","required":["accountid","ownerid","sold","currency"],"properties":{"accountid":{"description":"Internal unique identifier for this account.","type":"integer","format":"int64"},"ownerid":{"description":"The username registered in the application.","type":"string"},"total_amount":{"description":"The amount specific to the debit and sold account. This field allows the process transactions.","type":"number","format":"double"},"sold":{"description":"The amount specific to the balance account. This field allows the process transactions.","type":"number","format":"double"},"debit":{"description":"The amount specific to the money merchant have to collect and pay. This field allows the process transactions.","type":"number","format":"double"},"currency":{"description":"The currency specific to location.","type":"string"}}},"deposit":{"type":"object","description":"Deposit describes a way a payment is handled. It depends of Payment Resource","title":"deposit","required":["depid","paymentid"],"properties":{"depid":{"description":"Internal unique identifier for this account.","type":"integer","format":"int64"},"paymentid":{"description":"The added paymentid used to proceed the deposit transaction.","type":"integer","format":"int64"}}},"payment":{"type":"object","description":"Payment is defined by the app specifically to emit users transactions.","title":"payment","required":["payid","actorid","amount","ref_accountid","payment_method","operatorid","phone","pin","currency","payment_context"],"properties":{"payid":{"description":"Internal unique identifier for this payment.","type":"integer","format":"int64"},"actorid":{"description":"The username registered in the application","type":"string"},"amount":{"description":"The amount to send. This field allowed the processing transactions.","type":"number","format":"double"},"ref_accountid":{"description":"The accountid to use to send money to the specific account.","type":"integer","format":"int64"},"payment_method":{"description":"The type of payment to use [Mobile Money or Credit Card].","type":"string"},"operatorid":{"description":"The operator specified the type of payment if Mobile Money.","type":"string"},"phone":{"description":"The phone identifying specific account of consumer.","type":"integer","format":"int64"},"pin":{"description":"The code used to validate the transaction.","type":"integer","format":"int32"},"currency":{"description":"The phone identifying specific account of consumer.","type":"string"},"payment_context":{"description":"This field specify the type of transaction [Buying, Deposit, Withdraw].","type":"string"}}},"payment_form":{"type":"object","title":"payment_form","required":["payid","actorid","amount","ref_accountid","payment_method","operatorid","phone","pin","currency","payment_context"],"properties":{"payid":{"description":"Internal unique identifier for this payment.","type":"integer","format":"int64"},"actorid":{"description":"The username registered in the application","type":"string"},"amount":{"description":"The amount to send. This field allowed the processing transactions.","type":"number","format":"double"},"ref_accountid":{"description":"The accountid to use to send money to the specific account.","type":"integer","format":"int64"},"payment_method":{"description":"The type of payment to use [Mobile Money or Credit Card].","type":"string"},"operatorid":{"description":"The operator specified the type of payment if Mobile Money.","type":"string"},"phone":{"description":"The phone identifying specific account of consumer.","type":"integer","format":"int64"},"pin":{"description":"The code used to validate the transaction.","type":"integer","format":"int32"},"currency":{"description":"The phone identifying specific account of consumer.","type":"string"},"payment_context":{"description":"This field specify the type of transaction [Buying, Deposit, Withdraw].","type":"string"}}},"transfer":{"type":"object","description":"Transfer is defined by the app specifically to manage users transactions (sending and receiving).","title":"transfer","required":["transferid","senderid","amount","ref_accountid_receiver","ref_accountid_sender","currency"],"properties":{"transferid":{"description":"Internal unique identifier for this account.","type":"integer","format":"int64"},"senderid":{"description":"The username registered in the application","type":"string"},"amount":{"description":"The amount to be send. This field allows the process transactions.","type":"number","format":"double"},"ref_accountid_receiver":{"description":"The accountid to use to send money and referencing the receiver.","type":"integer","format":"int64"},"ref_accountid_sender":{"description":"The accountid to use to send money and referencing the sender.","type":"integer","format":"int64"},"currency":{"description":"The currency specific to a country.","type":"string"}}},"transfer_form":{"type":"object","title":"transfer_form","required":["transferid","senderid","amount","ref_accountid_receiver","ref_accountid_sender","currency"],"properties":{"transferid":{"description":"Internal unique identifier for this account.","type":"integer","format":"int64"},"senderid":{"description":"The username registered in the application.","type":"string"},"amount":{"description":"The amount to be send. This field allows the process transactions.","type":"number","format":"double"},"ref_accountid_receiver":{"description":"The accountid to use to send money and referencing the receiver.","type":"integer","format":"int64"},"ref_accountid_sender":{"description":"The accountid to use to send money and referencing the sender.","type":"integer","format":"int64"},"currency":{"description":"The currency specific to a country.","type":"string"}}},"validation":{"type":"object","description":"Used only to validate json files - used as a resource where http status code defines success","title":"validation","required":["valid","errors"],"properties":{"valid":{"description":"If true, the json schema is valid. If false, there is at least one validation error.","type":"boolean"},"errors":{"description":"Contains any validation errors that result from parsing the json document. If empty, the document is valid.","default":"[]","type":"array","items":{"type":"string"}}}},"withdraw":{"type":"object","description":"Withdraw describes a way a payment is handled. It depends of Payment Resource","title":"withdraw","required":["wdwid","paymentid"],"properties":{"wdwid":{"description":"Internal unique identifier for this account.","type":"integer","format":"int64"},"paymentid":{"description":"The added paymentid used to proceed the deposit transaction.","type":"integer","format":"int64"}}}}}