Advertisement
shangyi

Untitled

Jun 20th, 2017
538
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 188.03 KB | None | 0 0
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "version": "1.0",
  5. "title": "Billing API"
  6. },
  7. "host": "api-dev.ezypay.com",
  8. "basePath": "/",
  9. "tags": [
  10. {
  11. "name": "merchant-controller",
  12. "description": "Merchants"
  13. },
  14. {
  15. "name": "x-show-objects-payment-method-controller=[PaymentMethodObject]",
  16. "description": "Payment Methods"
  17. },
  18. {
  19. "name": "note-controller",
  20. "description": "Notes"
  21. },
  22. {
  23. "name": "x-show-objects-customer-controller=[CustomerObject]",
  24. "description": "Customers"
  25. },
  26. {
  27. "name": "x-show-objects-settlement-controller=[SettlementObject]",
  28. "description": "Settlements"
  29. },
  30. {
  31. "name": "x-show-objects-invoice-controller=[InvoiceObject]",
  32. "description": "Invoices"
  33. },
  34. {
  35. "name": "future-invoice-controller",
  36. "description": "Future invoices"
  37. },
  38. {
  39. "name": "subscription-controller",
  40. "description": "Subscriptions"
  41. },
  42. {
  43. "name": "customer-controller",
  44. "description": "Customers"
  45. },
  46. {
  47. "name": "x-show-objects-plan-controller=[PlanObject]",
  48. "description": "Plans"
  49. },
  50. {
  51. "name": "transaction-controller",
  52. "description": "Transactions"
  53. },
  54. {
  55. "name": "x-show-objects-subscription-controller=[SubscriptionObject]",
  56. "description": "Subscriptions"
  57. },
  58. {
  59. "name": "x-show-objects-credit-note-controller=[CreditNoteObject]",
  60. "description": "Credit Notes"
  61. },
  62. {
  63. "name": "invoice-controller",
  64. "description": "Invoices"
  65. },
  66. {
  67. "name": "x-show-objects-transfer-controller=[TransferObject]",
  68. "description": "Transfers"
  69. },
  70. {
  71. "name": "x-show-objects-note-controller=[NoteObject]",
  72. "description": "Notes"
  73. },
  74. {
  75. "name": "payment-method-controller",
  76. "description": "Payment Methods"
  77. },
  78. {
  79. "name": "plan-controller",
  80. "description": "Plans"
  81. },
  82. {
  83. "name": "settlement-controller",
  84. "description": "Settlements"
  85. },
  86. {
  87. "name": "x-show-objects-merchant-controller=[MerchantObject]",
  88. "description": "Merchants"
  89. },
  90. {
  91. "name": "transfer-controller",
  92. "description": "Transfers"
  93. },
  94. {
  95. "name": "x-show-objects-future-invoice-controller=[FutureInvoiceObject]",
  96. "description": "Future invoices"
  97. },
  98. {
  99. "name": "credit-note-controller",
  100. "description": "Credit Notes"
  101. },
  102. {
  103. "name": "x-show-objects-transaction-controller=[TransactionObject]",
  104. "description": "Transactions"
  105. }
  106. ],
  107. "paths": {
  108. "/v2/billing/creditnotes": {
  109. "get": {
  110. "tags": [
  111. "credit-note-controller",
  112. "x-show-objects-credit-note-controller=[CreditNoteObject]"
  113. ],
  114. "summary": "List credit notes",
  115. "description": "Retrieve a list of credit notes using the available filter options.",
  116. "operationId": "list_credit_note",
  117. "consumes": [
  118. "application/json"
  119. ],
  120. "produces": [
  121. "application/json"
  122. ],
  123. "parameters": [
  124. {
  125. "name": "customerId",
  126. "in": "query",
  127. "description": "Filter by unique identifier of the customer.",
  128. "required": false,
  129. "type": "string"
  130. },
  131. {
  132. "name": "subscriptionId",
  133. "in": "query",
  134. "description": "Filter by unique identifier of the subscription.",
  135. "required": false,
  136. "type": "string"
  137. },
  138. {
  139. "name": "invoiceId",
  140. "in": "query",
  141. "description": "Filter by unique identifier of the invoice.",
  142. "required": false,
  143. "type": "string"
  144. },
  145. {
  146. "name": "status",
  147. "in": "query",
  148. "description": "Filter by credit notes status. Supported values are <code>paid</code>, <code>processing</code>, and <code>failed</code>.",
  149. "required": false,
  150. "type": "string"
  151. },
  152. {
  153. "name": "reason",
  154. "in": "query",
  155. "description": "Filter by action taken on the invoice associated to the credit note. Supported values are <code>chargeback</code> and <code>refund</code>.",
  156. "required": false,
  157. "type": "string"
  158. },
  159. {
  160. "name": "from",
  161. "in": "query",
  162. "description": "Start date for range of credit notes to view. Filter by date defined in <code>crediNoteDate</code>.",
  163. "required": false,
  164. "type": "string"
  165. },
  166. {
  167. "name": "until",
  168. "in": "query",
  169. "description": "End date for range of credit notes to view. Filter by date defined in <code>crediNoteDate</code>.",
  170. "required": false,
  171. "type": "string"
  172. },
  173. {
  174. "name": "limit",
  175. "in": "query",
  176. "description": "Apply a limit to the number of objects to be returned. Supported limit range is 1 to 100. Defaults to 10.",
  177. "required": false,
  178. "type": "integer",
  179. "default": 10,
  180. "format": "int32"
  181. },
  182. {
  183. "name": "cursor",
  184. "in": "query",
  185. "description": "An cursor for use in pagination. By specifying the number of objects to skip, you are able to fetch the next page of objects. For example, if you make a list request with limit=10 and cursor=10, you will retrieve objects 11-20 across the full list.",
  186. "required": false,
  187. "type": "integer",
  188. "default": 0,
  189. "format": "int32"
  190. }
  191. ],
  192. "responses": {
  193. "200": {
  194. "description": "OK",
  195. "schema": {
  196. "$ref": "#/definitions/CreditNotesObject"
  197. }
  198. }
  199. }
  200. }
  201. },
  202. "/v2/billing/creditnotes/{creditNoteId}": {
  203. "get": {
  204. "tags": [
  205. "credit-note-controller",
  206. "x-show-objects-credit-note-controller=[CreditNoteObject]"
  207. ],
  208. "summary": "Retrieve a credit note",
  209. "description": "Get the full details of a credit note.",
  210. "operationId": "retrieve_credit_note",
  211. "consumes": [
  212. "application/json"
  213. ],
  214. "produces": [
  215. "application/json"
  216. ],
  217. "parameters": [
  218. {
  219. "name": "creditNoteId",
  220. "in": "path",
  221. "description": "Auto-generated identifier of the credit note.",
  222. "required": true,
  223. "type": "string"
  224. }
  225. ],
  226. "responses": {
  227. "200": {
  228. "description": "OK",
  229. "schema": {
  230. "$ref": "#/definitions/CreditNoteObject"
  231. }
  232. }
  233. }
  234. }
  235. },
  236. "/v2/billing/customers": {
  237. "get": {
  238. "tags": [
  239. "customer-controller",
  240. "x-show-objects-customer-controller=[CustomerObject]"
  241. ],
  242. "summary": "List customers",
  243. "description": "Retrieve a list of customers that belong to the merchant.",
  244. "operationId": "list_customer",
  245. "consumes": [
  246. "application/json"
  247. ],
  248. "produces": [
  249. "application/json"
  250. ],
  251. "parameters": [
  252. {
  253. "name": "name",
  254. "in": "query",
  255. "description": "Customer's name. Max 100 characters.",
  256. "required": false,
  257. "type": "string"
  258. },
  259. {
  260. "name": "firstName",
  261. "in": "query",
  262. "description": "Customer's first name. Max 50 characters.",
  263. "required": false,
  264. "type": "string"
  265. },
  266. {
  267. "name": "lastName",
  268. "in": "query",
  269. "description": "Customer's last name. Max 50 characters.",
  270. "required": false,
  271. "type": "string"
  272. },
  273. {
  274. "name": "companyName",
  275. "in": "query",
  276. "description": "The company name if the company is registered as a customer.",
  277. "required": false,
  278. "type": "string"
  279. },
  280. {
  281. "name": "referenceCode",
  282. "in": "query",
  283. "description": "The reference code of the customer. A unique identifier from a third-party software integration.",
  284. "required": false,
  285. "type": "string"
  286. },
  287. {
  288. "name": "customerNumber",
  289. "in": "query",
  290. "description": "Auto-generated numeric identifier of the customer. This identifier is customer facing and is automatically included in all communications to the customer.",
  291. "required": false,
  292. "type": "integer",
  293. "format": "int32"
  294. },
  295. {
  296. "name": "createdDate",
  297. "in": "query",
  298. "description": "The date the customer's record was created.",
  299. "required": false,
  300. "type": "string"
  301. },
  302. {
  303. "name": "sortExpression",
  304. "in": "query",
  305. "description": "Apply the expression to sort the customer's list based on the preferred argument. For e.g., enter lastname,ASC to sort the customer list in alphabetical order based on the lastname parameter.",
  306. "required": false,
  307. "type": "string"
  308. },
  309. {
  310. "name": "limit",
  311. "in": "query",
  312. "description": "To paginate a large result set, use the 'limit' argument to limit the number of results returned per page up to a maximum of 100 records. For example, <code>limit</code>=20 will show results 1-20. The default value is 100.",
  313. "required": false,
  314. "type": "integer",
  315. "format": "int32"
  316. },
  317. {
  318. "name": "cursor",
  319. "in": "query",
  320. "description": "To paginate a large result set, use the 'cursor' argument together with the 'limit' argument to specify the number of records to skip or show. For example, <code>limit</code>=10 and <code>cursor</code>=10 will show results for record 11 - 20.",
  321. "required": false,
  322. "type": "integer",
  323. "format": "int32"
  324. }
  325. ],
  326. "responses": {
  327. "200": {
  328. "description": "OK",
  329. "schema": {
  330. "$ref": "#/definitions/CustomersObject"
  331. }
  332. }
  333. }
  334. },
  335. "post": {
  336. "tags": [
  337. "customer-controller",
  338. "x-show-objects-customer-controller=[CustomerObject]"
  339. ],
  340. "summary": "Create a customer",
  341. "description": "Add the customer along with optional details such as address, payment method, and subscriptions which you can provide later on. System does not check for duplication during a new customer creation.",
  342. "operationId": "create_customer",
  343. "consumes": [
  344. "application/json"
  345. ],
  346. "produces": [
  347. "*/*"
  348. ],
  349. "parameters": [
  350. {
  351. "in": "body",
  352. "name": "createCustomerCommand",
  353. "description": "createCustomerCommand",
  354. "required": true,
  355. "schema": {
  356. "$ref": "#/definitions/CreateCustomer"
  357. }
  358. }
  359. ],
  360. "responses": {
  361. "200": {
  362. "description": "OK",
  363. "schema": {
  364. "$ref": "#/definitions/CustomerObject"
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "/v2/billing/customers/{customerId}": {
  371. "get": {
  372. "tags": [
  373. "customer-controller",
  374. "x-show-objects-customer-controller=[CustomerObject]"
  375. ],
  376. "summary": "Retrieve a customer",
  377. "description": "Retrieve the customer's personal details, including address, payment method information and any available subscription details.",
  378. "operationId": "retrieve_customer",
  379. "consumes": [
  380. "application/json"
  381. ],
  382. "produces": [
  383. "application/json"
  384. ],
  385. "parameters": [
  386. {
  387. "name": "customerId",
  388. "in": "path",
  389. "description": "Auto-generated identifier of the customer.",
  390. "required": true,
  391. "type": "string"
  392. }
  393. ],
  394. "responses": {
  395. "200": {
  396. "description": "OK",
  397. "schema": {
  398. "$ref": "#/definitions/CustomerObject"
  399. }
  400. }
  401. }
  402. },
  403. "put": {
  404. "tags": [
  405. "customer-controller",
  406. "x-show-objects-customer-controller=[CustomerObject]"
  407. ],
  408. "summary": "Update a customer",
  409. "description": "Update an existing customer's personal details.",
  410. "operationId": "update_customer",
  411. "consumes": [
  412. "application/json"
  413. ],
  414. "produces": [
  415. "application/json"
  416. ],
  417. "parameters": [
  418. {
  419. "in": "body",
  420. "name": "updateCustomerCommand",
  421. "description": "updateCustomerCommand",
  422. "required": true,
  423. "schema": {
  424. "$ref": "#/definitions/UpdateCustomerCommand"
  425. }
  426. },
  427. {
  428. "name": "customerId",
  429. "in": "path",
  430. "description": "Auto-generated identifier of the customer.",
  431. "required": true,
  432. "type": "string"
  433. }
  434. ],
  435. "responses": {
  436. "200": {
  437. "description": "OK",
  438. "schema": {
  439. "$ref": "#/definitions/CustomerObject"
  440. }
  441. }
  442. }
  443. }
  444. },
  445. "/v2/billing/customers/{customerId}/paymentmethods": {
  446. "get": {
  447. "tags": [
  448. "payment-method-controller",
  449. "x-show-objects-payment-method-controller=[PaymentMethodObject]"
  450. ],
  451. "summary": "List payment methods",
  452. "description": "Retrieve a list of payment methods and the details for an existing customer. The list would include both valid and invalid payment methods.",
  453. "operationId": "list_payment_methods",
  454. "consumes": [
  455. "application/json"
  456. ],
  457. "produces": [
  458. "application/json"
  459. ],
  460. "parameters": [
  461. {
  462. "name": "limit",
  463. "in": "query",
  464. "description": "Apply a limit to the number of objects to be returned. Supported limit range is 1 to 100. Defaults to 10.",
  465. "required": false,
  466. "type": "integer",
  467. "default": 10,
  468. "format": "int32"
  469. },
  470. {
  471. "name": "cursor",
  472. "in": "query",
  473. "description": "An cursor for use in pagination. By specifying the number of objects to skip, you are able to fetch the next page of objects. For example, if you make a list request with limit=10 and cursor=10, you will retrieve objects 11-20 across the full list.",
  474. "required": false,
  475. "type": "integer",
  476. "default": 0,
  477. "format": "int32"
  478. },
  479. {
  480. "name": "customerId",
  481. "in": "path",
  482. "description": "Auto-generated unique identifier of the customer.",
  483. "required": true,
  484. "type": "string"
  485. }
  486. ],
  487. "responses": {
  488. "200": {
  489. "description": "OK",
  490. "schema": {
  491. "$ref": "#/definitions/PaymentMethodsObject"
  492. }
  493. }
  494. }
  495. },
  496. "post": {
  497. "tags": [
  498. "payment-method-controller",
  499. "x-show-objects-payment-method-controller=[PaymentMethodObject]"
  500. ],
  501. "summary": "Create a payment method",
  502. "description": "Links a new payment method token to an existing customer. If the customer has no primary payment method specified, then the new token will become the primary payment method by default. No verification is performed during the linking of payment method.",
  503. "operationId": "create_payment_method",
  504. "consumes": [
  505. "application/json"
  506. ],
  507. "produces": [
  508. "application/json"
  509. ],
  510. "parameters": [
  511. {
  512. "in": "body",
  513. "name": "command",
  514. "description": "command",
  515. "required": true,
  516. "schema": {
  517. "$ref": "#/definitions/LinkPaymentMethodToken"
  518. }
  519. },
  520. {
  521. "name": "customerId",
  522. "in": "path",
  523. "description": "Auto-generated unique identifier of the customer that will be associated with the payment method token.",
  524. "required": true,
  525. "type": "string"
  526. }
  527. ],
  528. "responses": {
  529. "200": {
  530. "description": "OK",
  531. "schema": {
  532. "$ref": "#/definitions/PaymentMethodObject"
  533. }
  534. }
  535. }
  536. }
  537. },
  538. "/v2/billing/customers/{customerId}/paymentmethods/primary": {
  539. "get": {
  540. "tags": [
  541. "payment-method-controller",
  542. "x-show-objects-payment-method-controller=[PaymentMethodObject]"
  543. ],
  544. "summary": "Retrieve primary payment method",
  545. "description": "Retrieve the payment method details of the customer's primary payment method.",
  546. "operationId": "retrieve_primary_payment_method",
  547. "consumes": [
  548. "application/json"
  549. ],
  550. "produces": [
  551. "application/json"
  552. ],
  553. "parameters": [
  554. {
  555. "name": "customerId",
  556. "in": "path",
  557. "description": "Auto-generated unique identifier of the customer.",
  558. "required": true,
  559. "type": "string"
  560. }
  561. ],
  562. "responses": {
  563. "200": {
  564. "description": "OK",
  565. "schema": {
  566. "$ref": "#/definitions/PaymentMethodObject"
  567. }
  568. }
  569. }
  570. }
  571. },
  572. "/v2/billing/customers/{customerId}/paymentmethods/{paymentMethodToken}": {
  573. "get": {
  574. "tags": [
  575. "payment-method-controller",
  576. "x-show-objects-payment-method-controller=[PaymentMethodObject]"
  577. ],
  578. "summary": "Retrieve a payment method",
  579. "description": "Retrieves the payment method token details that belong to a customer.",
  580. "operationId": "retrieve_payment_method",
  581. "consumes": [
  582. "application/json"
  583. ],
  584. "produces": [
  585. "application/json"
  586. ],
  587. "parameters": [
  588. {
  589. "name": "paymentMethodToken",
  590. "in": "path",
  591. "description": "Auto-generated unique identifier of the payment method token generated by the Ezypay Vault.",
  592. "required": true,
  593. "type": "string"
  594. },
  595. {
  596. "name": "customerId",
  597. "in": "path",
  598. "description": "Auto-generated unique identifier of the customer.",
  599. "required": true,
  600. "type": "string"
  601. }
  602. ],
  603. "responses": {
  604. "200": {
  605. "description": "OK",
  606. "schema": {
  607. "$ref": "#/definitions/PaymentMethodObject"
  608. }
  609. }
  610. }
  611. },
  612. "delete": {
  613. "tags": [
  614. "payment-method-controller",
  615. "x-show-objects-payment-method-controller=[PaymentMethodObject]"
  616. ],
  617. "summary": "Delete a payment method",
  618. "description": "Remove an obsolete or invalid payment method from a customer. Removing a payment method will also delete the payment method token from the Ezypay Vault if no other customers are linked to that token. However, a payment method with an active subscription or is the customer’s only (i.e. primary) payment method cannot be removed.",
  619. "operationId": "delete_payment_method",
  620. "consumes": [
  621. "application/json"
  622. ],
  623. "produces": [
  624. "application/json"
  625. ],
  626. "parameters": [
  627. {
  628. "name": "paymentMethodToken",
  629. "in": "path",
  630. "description": "Auto-generated unique identifier of the payment method token generated by vault.",
  631. "required": true,
  632. "type": "string"
  633. },
  634. {
  635. "name": "customerId",
  636. "in": "path",
  637. "description": "Auto-generated unique identifier of the customer.",
  638. "required": true,
  639. "type": "string"
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "OK",
  645. "schema": {
  646. "$ref": "#/definitions/DeletedEntityObject"
  647. }
  648. }
  649. }
  650. }
  651. },
  652. "/v2/billing/customers/{customerId}/paymentmethods/{paymentMethodToken}/new": {
  653. "put": {
  654. "tags": [
  655. "payment-method-controller",
  656. "x-show-objects-payment-method-controller=[PaymentMethodObject]"
  657. ],
  658. "summary": "Replace a payment method",
  659. "description": "Replace a payment method with another payment method while keeping all existing customer, subscription and invoice links. This is useful when replacing invalid payment methods to existing customers without needing to additionally update their subscription and invoice details. \n\nReplaced payment methods and their linked tokens are then removed from the Vault. However, a payment method with an active subscriptions cannot be removed. Also, if any additional payment methods are still linked to the token, the payment method is removed only from the customer but not from the Vault. ",
  660. "operationId": "replace_payment_method",
  661. "consumes": [
  662. "application/json"
  663. ],
  664. "produces": [
  665. "application/json"
  666. ],
  667. "parameters": [
  668. {
  669. "in": "body",
  670. "name": "command",
  671. "description": "command",
  672. "required": true,
  673. "schema": {
  674. "$ref": "#/definitions/SetNewPaymentMethodCommand"
  675. }
  676. },
  677. {
  678. "name": "paymentMethodToken",
  679. "in": "path",
  680. "description": "Auto-generated unique identifier of the payment method token generated by vault.",
  681. "required": true,
  682. "type": "string"
  683. },
  684. {
  685. "name": "customerId",
  686. "in": "path",
  687. "description": "Auto-generated unique identifier of the customer.",
  688. "required": true,
  689. "type": "string"
  690. }
  691. ],
  692. "responses": {
  693. "200": {
  694. "description": "OK",
  695. "schema": {
  696. "$ref": "#/definitions/PaymentMethodObject"
  697. }
  698. }
  699. }
  700. }
  701. },
  702. "/v2/billing/customers/{customerId}/paymentmethods/{paymentMethodToken}/primary": {
  703. "put": {
  704. "tags": [
  705. "payment-method-controller",
  706. "x-show-objects-payment-method-controller=[PaymentMethodObject]"
  707. ],
  708. "summary": "Update primary payment method",
  709. "description": "Change the primary payment method token for an existing customer. Ensure that the new primary token is valid prior to the request.",
  710. "operationId": "update_primary_payment_method",
  711. "consumes": [
  712. "application/json"
  713. ],
  714. "produces": [
  715. "application/json"
  716. ],
  717. "parameters": [
  718. {
  719. "name": "paymentMethodToken",
  720. "in": "path",
  721. "description": "Auto-generated unique identifier of the payment method token generated by vault.",
  722. "required": true,
  723. "type": "string"
  724. },
  725. {
  726. "name": "customerId",
  727. "in": "path",
  728. "description": "Auto-generated unique identifier of the customer.",
  729. "required": true,
  730. "type": "string"
  731. }
  732. ],
  733. "responses": {
  734. "200": {
  735. "description": "OK",
  736. "schema": {
  737. "$ref": "#/definitions/PaymentMethodObject"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "/v2/billing/futureinvoices": {
  744. "get": {
  745. "tags": [
  746. "future-invoice-controller",
  747. "x-show-objects-future-invoice-controller=[FutureInvoiceObject]"
  748. ],
  749. "summary": "List future invoices",
  750. "description": "Retrieve a list of future invoices. The results can then be filtered using the available filter options.",
  751. "operationId": "list_future_invoices",
  752. "consumes": [
  753. "application/json"
  754. ],
  755. "produces": [
  756. "application/json"
  757. ],
  758. "parameters": [
  759. {
  760. "name": "subscriptionId",
  761. "in": "query",
  762. "description": "Auto-generated unique identifier of the subscription.",
  763. "required": false,
  764. "type": "string"
  765. },
  766. {
  767. "name": "customerId",
  768. "in": "query",
  769. "description": "Auto-generated unique identifier of the customer.",
  770. "required": false,
  771. "type": "string"
  772. },
  773. {
  774. "name": "limit",
  775. "in": "query",
  776. "description": "Maximum records to return per pagination call. Limit can range between 1 to 100 records.",
  777. "required": false,
  778. "type": "integer",
  779. "default": 10,
  780. "format": "int32"
  781. },
  782. {
  783. "name": "from",
  784. "in": "query",
  785. "description": "Start date for range of future invoices to view. Supported format is YYYY-MM-DD.",
  786. "required": false,
  787. "type": "string"
  788. },
  789. {
  790. "name": "until",
  791. "in": "query",
  792. "description": "End date for range of future invoices to view. Supported format is YYYY-MM-DD.",
  793. "required": false,
  794. "type": "string"
  795. }
  796. ],
  797. "responses": {
  798. "200": {
  799. "description": "OK",
  800. "schema": {
  801. "$ref": "#/definitions/FutureInvoicesObject"
  802. }
  803. }
  804. }
  805. },
  806. "put": {
  807. "tags": [
  808. "future-invoice-controller",
  809. "x-show-objects-future-invoice-controller=[FutureInvoiceObject]"
  810. ],
  811. "summary": "Update a future invoice",
  812. "description": "Update the future invoice.",
  813. "operationId": "update_future_invoice",
  814. "consumes": [
  815. "application/json"
  816. ],
  817. "produces": [
  818. "*/*"
  819. ],
  820. "parameters": [
  821. {
  822. "in": "body",
  823. "name": "updateFutureInvoiceCommand",
  824. "description": "updateFutureInvoiceCommand",
  825. "required": true,
  826. "schema": {
  827. "$ref": "#/definitions/UpdateFutureInvoiceCommand"
  828. }
  829. }
  830. ],
  831. "responses": {
  832. "200": {
  833. "description": "OK",
  834. "schema": {
  835. "$ref": "#/definitions/FutureInvoiceObject"
  836. }
  837. }
  838. }
  839. },
  840. "delete": {
  841. "tags": [
  842. "future-invoice-controller",
  843. "x-show-objects-future-invoice-controller=[FutureInvoiceObject]"
  844. ],
  845. "summary": "Delete a future invoice",
  846. "description": "Delete the future invoice.",
  847. "operationId": "delete_future_invoice",
  848. "consumes": [
  849. "application/json"
  850. ],
  851. "produces": [
  852. "*/*"
  853. ],
  854. "parameters": [
  855. {
  856. "name": "subscriptionId",
  857. "in": "query",
  858. "description": "Auto-generated unique identifier of the subscription.",
  859. "required": false,
  860. "type": "string"
  861. },
  862. {
  863. "name": "cycleStartDate",
  864. "in": "query",
  865. "description": "The start date of the future invoice.",
  866. "required": false,
  867. "type": "string"
  868. }
  869. ],
  870. "responses": {
  871. "200": {
  872. "description": "OK",
  873. "schema": {
  874. "$ref": "#/definitions/DeletedEntityObject"
  875. }
  876. }
  877. }
  878. }
  879. },
  880. "/v2/billing/invoices": {
  881. "get": {
  882. "tags": [
  883. "invoice-controller",
  884. "x-show-objects-invoice-controller=[InvoiceObject]"
  885. ],
  886. "summary": "List invoices",
  887. "description": "Get a list of invoices for a specific merchant, customer or subscription. The invoices are returned sorted by creation date, with the most recently created invoice appearing first.",
  888. "operationId": "list_invoices",
  889. "consumes": [
  890. "application/json"
  891. ],
  892. "produces": [
  893. "application/json"
  894. ],
  895. "parameters": [
  896. {
  897. "name": "customerId",
  898. "in": "query",
  899. "description": "Filter by unique identifier of the customer.",
  900. "required": false,
  901. "type": "string"
  902. },
  903. {
  904. "name": "subscriptionId",
  905. "in": "query",
  906. "description": "Filter by unique identifier of the subscription.",
  907. "required": false,
  908. "type": "string"
  909. },
  910. {
  911. "name": "status",
  912. "in": "query",
  913. "description": "Filter by invoice status. Supported values are <code>paid</code>, <code>processing</code>, <code>past_due</code>, <code>refunded</code> and <code>partially_refunded</code>.",
  914. "required": false,
  915. "type": "string"
  916. },
  917. {
  918. "name": "from",
  919. "in": "query",
  920. "description": "Start date for range of invoices to view. Filter by date defined in <code>invoiceDate</code>.",
  921. "required": false,
  922. "type": "string"
  923. },
  924. {
  925. "name": "until",
  926. "in": "query",
  927. "description": "End date for range of invoices to view. Filter by date defined in <code>invoiceDate</code>.",
  928. "required": false,
  929. "type": "string"
  930. },
  931. {
  932. "name": "limit",
  933. "in": "query",
  934. "description": "Apply a limit to the number of objects to be returned. Supported limit range is 1 to 100. Defaults to 10.",
  935. "required": false,
  936. "type": "integer",
  937. "default": 10,
  938. "format": "int32"
  939. },
  940. {
  941. "name": "cursor",
  942. "in": "query",
  943. "description": "An cursor for use in pagination. By specifying the number of objects to skip, you are able to fetch the next page of objects. For example, if you make a list request with limit=10 and cursor=10, you will retrieve objects 11-20 across the full list.",
  944. "required": false,
  945. "type": "integer",
  946. "default": 0,
  947. "format": "int32"
  948. }
  949. ],
  950. "responses": {
  951. "200": {
  952. "description": "OK",
  953. "schema": {
  954. "$ref": "#/definitions/InvoicesObject"
  955. }
  956. }
  957. }
  958. },
  959. "post": {
  960. "tags": [
  961. "invoice-controller",
  962. "x-show-objects-invoice-controller=[InvoiceObject]"
  963. ],
  964. "summary": "Create an invoice",
  965. "description": "Create an ad-hoc invoice to bill a customer on an on-demand basis. Invoices created from this end point are not associated to any subscriptions.",
  966. "operationId": "create_invoice",
  967. "consumes": [
  968. "application/json"
  969. ],
  970. "produces": [
  971. "application/json"
  972. ],
  973. "parameters": [
  974. {
  975. "in": "body",
  976. "name": "command",
  977. "description": "command",
  978. "required": true,
  979. "schema": {
  980. "$ref": "#/definitions/CreateInvoice"
  981. }
  982. }
  983. ],
  984. "responses": {
  985. "200": {
  986. "description": "OK",
  987. "schema": {
  988. "$ref": "#/definitions/InvoiceObject"
  989. }
  990. }
  991. }
  992. }
  993. },
  994. "/v2/billing/invoices/{invoiceId}": {
  995. "get": {
  996. "tags": [
  997. "invoice-controller",
  998. "x-show-objects-invoice-controller=[InvoiceObject]"
  999. ],
  1000. "summary": "Retrieve an invoice",
  1001. "description": "Get the full details of an invoice.",
  1002. "operationId": "retrieve_invoice",
  1003. "consumes": [
  1004. "application/json"
  1005. ],
  1006. "produces": [
  1007. "application/json"
  1008. ],
  1009. "parameters": [
  1010. {
  1011. "name": "invoiceId",
  1012. "in": "path",
  1013. "description": "Auto-generated identifier of the invoice.",
  1014. "required": true,
  1015. "type": "string"
  1016. }
  1017. ],
  1018. "responses": {
  1019. "200": {
  1020. "description": "OK",
  1021. "schema": {
  1022. "$ref": "#/definitions/InvoiceObject"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "put": {
  1028. "tags": [
  1029. "invoice-controller",
  1030. "x-show-objects-invoice-controller=[InvoiceObject]"
  1031. ],
  1032. "summary": "Update an invoice",
  1033. "description": "Change the details of an invoice with status <code>past_due</code>.",
  1034. "operationId": "update_invoice",
  1035. "consumes": [
  1036. "application/json"
  1037. ],
  1038. "produces": [
  1039. "application/json"
  1040. ],
  1041. "parameters": [
  1042. {
  1043. "in": "body",
  1044. "name": "command",
  1045. "description": "command",
  1046. "required": true,
  1047. "schema": {
  1048. "$ref": "#/definitions/UpdateInvoicePaymentMethod"
  1049. }
  1050. },
  1051. {
  1052. "name": "invoiceId",
  1053. "in": "path",
  1054. "description": "Auto-generated identifier of the invoice.",
  1055. "required": true,
  1056. "type": "string"
  1057. }
  1058. ],
  1059. "responses": {
  1060. "200": {
  1061. "description": "OK",
  1062. "schema": {
  1063. "$ref": "#/definitions/InvoiceObject"
  1064. }
  1065. }
  1066. }
  1067. }
  1068. },
  1069. "/v2/billing/invoices/{invoiceId}/recordpayment": {
  1070. "post": {
  1071. "tags": [
  1072. "invoice-controller",
  1073. "x-show-objects-invoice-controller=[InvoiceObject]"
  1074. ],
  1075. "summary": "Record an external payment for an invoice",
  1076. "description": "Record a payment from a customer that occurred outside the Ezypay system (for example an over-the-counter cash transaction) and mark the invoice as paid. Only applicable for invoices that have failed payment with status <code>past_due</code>.",
  1077. "operationId": "record_payment",
  1078. "consumes": [
  1079. "application/json"
  1080. ],
  1081. "produces": [
  1082. "application/json"
  1083. ],
  1084. "parameters": [
  1085. {
  1086. "in": "body",
  1087. "name": "command",
  1088. "description": "command",
  1089. "required": true,
  1090. "schema": {
  1091. "$ref": "#/definitions/RecordPayment"
  1092. }
  1093. },
  1094. {
  1095. "name": "invoiceId",
  1096. "in": "path",
  1097. "description": "Auto-generated identifier of the invoice.",
  1098. "required": true,
  1099. "type": "string"
  1100. }
  1101. ],
  1102. "responses": {
  1103. "200": {
  1104. "description": "OK",
  1105. "schema": {
  1106. "$ref": "#/definitions/InvoiceObject"
  1107. }
  1108. }
  1109. }
  1110. }
  1111. },
  1112. "/v2/billing/invoices/{invoiceId}/refund": {
  1113. "put": {
  1114. "tags": [
  1115. "invoice-controller",
  1116. "x-show-objects-invoice-controller=[InvoiceObject]"
  1117. ],
  1118. "summary": "Refund an invoice",
  1119. "description": "Refund an invoice. An online refund will reuse the same invoice payment method that was used in the original transaction.",
  1120. "operationId": "refund_invoice",
  1121. "consumes": [
  1122. "application/json"
  1123. ],
  1124. "produces": [
  1125. "application/json"
  1126. ],
  1127. "parameters": [
  1128. {
  1129. "in": "body",
  1130. "name": "command",
  1131. "description": "command",
  1132. "required": true,
  1133. "schema": {
  1134. "$ref": "#/definitions/RefundInvoice"
  1135. }
  1136. },
  1137. {
  1138. "name": "invoiceId",
  1139. "in": "path",
  1140. "description": "Auto-generated identifier of the invoice.",
  1141. "required": true,
  1142. "type": "string"
  1143. }
  1144. ],
  1145. "responses": {
  1146. "200": {
  1147. "description": "OK",
  1148. "schema": {
  1149. "$ref": "#/definitions/InvoiceObject"
  1150. }
  1151. }
  1152. }
  1153. }
  1154. },
  1155. "/v2/billing/invoices/{invoiceId}/retrypayment": {
  1156. "post": {
  1157. "tags": [
  1158. "invoice-controller",
  1159. "x-show-objects-invoice-controller=[InvoiceObject]"
  1160. ],
  1161. "summary": "Retry a payment on an invoice",
  1162. "description": "Retry a payment on-demand for an invoice with status <code>past_due</code>.",
  1163. "operationId": "retry_payment",
  1164. "consumes": [
  1165. "application/json"
  1166. ],
  1167. "produces": [
  1168. "application/json"
  1169. ],
  1170. "parameters": [
  1171. {
  1172. "in": "body",
  1173. "name": "command",
  1174. "description": "command",
  1175. "required": true,
  1176. "schema": {
  1177. "$ref": "#/definitions/RetryPayment"
  1178. }
  1179. },
  1180. {
  1181. "name": "invoiceId",
  1182. "in": "path",
  1183. "description": "Auto-generated identifier of the invoice.",
  1184. "required": true,
  1185. "type": "string"
  1186. }
  1187. ],
  1188. "responses": {
  1189. "200": {
  1190. "description": "OK",
  1191. "schema": {
  1192. "$ref": "#/definitions/InvoiceObject"
  1193. }
  1194. }
  1195. }
  1196. }
  1197. },
  1198. "/v2/billing/invoices/{invoiceId}/writeoff": {
  1199. "post": {
  1200. "tags": [
  1201. "invoice-controller",
  1202. "x-show-objects-invoice-controller=[InvoiceObject]"
  1203. ],
  1204. "summary": "Write off a payment on an invoice",
  1205. "description": "Write-off an invoice on-demand for an invoice with status <code>past_due</code>. The invoice status will be set to <code>writen_off</code> and no billing retries will be attempted for that specific invoice.",
  1206. "operationId": "writeoff_payment",
  1207. "consumes": [
  1208. "application/json"
  1209. ],
  1210. "produces": [
  1211. "application/json"
  1212. ],
  1213. "parameters": [
  1214. {
  1215. "in": "body",
  1216. "name": "command",
  1217. "description": "command",
  1218. "required": true,
  1219. "schema": {
  1220. "$ref": "#/definitions/WriteOffPayment"
  1221. }
  1222. },
  1223. {
  1224. "name": "invoiceId",
  1225. "in": "path",
  1226. "description": "Auto-generated identifier of the invoice.",
  1227. "required": true,
  1228. "type": "string"
  1229. }
  1230. ],
  1231. "responses": {
  1232. "200": {
  1233. "description": "OK",
  1234. "schema": {
  1235. "$ref": "#/definitions/InvoiceObject"
  1236. }
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "/v2/billing/merchant": {
  1242. "get": {
  1243. "tags": [
  1244. "merchant-controller",
  1245. "x-show-objects-merchant-controller=[MerchantObject]"
  1246. ],
  1247. "summary": "Retrieve a merchant",
  1248. "description": "Retrieve the business and address details of the respective merchant.",
  1249. "operationId": "retrieve_merchant",
  1250. "consumes": [
  1251. "application/json"
  1252. ],
  1253. "produces": [
  1254. "application/json"
  1255. ],
  1256. "responses": {
  1257. "200": {
  1258. "description": "OK",
  1259. "schema": {
  1260. "$ref": "#/definitions/MerchantObject"
  1261. }
  1262. }
  1263. }
  1264. }
  1265. },
  1266. "/v2/billing/merchant/{merchantId}/notificationsettings": {
  1267. "put": {
  1268. "tags": [
  1269. "merchant-controller",
  1270. "x-show-objects-merchant-controller=[MerchantObject]"
  1271. ],
  1272. "summary": "Update a merchant's notification settings",
  1273. "description": "Update a merchant's notification settings.",
  1274. "operationId": "update_merchants_notification_settings",
  1275. "consumes": [
  1276. "application/json"
  1277. ],
  1278. "produces": [
  1279. "application/json"
  1280. ],
  1281. "parameters": [
  1282. {
  1283. "in": "body",
  1284. "name": "command",
  1285. "description": "command",
  1286. "required": true,
  1287. "schema": {
  1288. "$ref": "#/definitions/UpdateMerchantNotificationSetting"
  1289. }
  1290. },
  1291. {
  1292. "name": "merchantId",
  1293. "in": "path",
  1294. "description": "Identifier of the merchant to update.",
  1295. "required": true,
  1296. "type": "string"
  1297. }
  1298. ],
  1299. "responses": {
  1300. "200": {
  1301. "description": "OK",
  1302. "schema": {
  1303. "$ref": "#/definitions/MerchantNotificationResult"
  1304. }
  1305. }
  1306. }
  1307. }
  1308. },
  1309. "/v2/billing/notes": {
  1310. "get": {
  1311. "tags": [
  1312. "note-controller",
  1313. "x-show-objects-note-controller=[NoteObject]"
  1314. ],
  1315. "summary": "List Notes",
  1316. "description": "Retrieve a list of notes that belong ",
  1317. "operationId": "list_notes",
  1318. "consumes": [
  1319. "application/json"
  1320. ],
  1321. "produces": [
  1322. "application/json"
  1323. ],
  1324. "parameters": [
  1325. {
  1326. "name": "entity",
  1327. "in": "query",
  1328. "description": "The object type the note belongs to. Supported values are <code>customer</code>, <code>subscription</code>, <code>payment_method</code> and <code>invoice</code>.",
  1329. "required": true,
  1330. "type": "string"
  1331. },
  1332. {
  1333. "name": "entityId",
  1334. "in": "query",
  1335. "description": "Auto-generated identifier of the entity the notes belong to.",
  1336. "required": true,
  1337. "type": "string"
  1338. },
  1339. {
  1340. "name": "limit",
  1341. "in": "query",
  1342. "description": "To paginate a large result set, use the 'limit' argument to limit the number of results returned per page up to a maximum of 100 records. For example, <code>limit</code> = 10 shows results 1-10. The default returned result would be 100.",
  1343. "required": false,
  1344. "type": "integer",
  1345. "default": 10,
  1346. "format": "int32"
  1347. },
  1348. {
  1349. "name": "cursor",
  1350. "in": "query",
  1351. "description": "An cursor for use in pagination. Specify the number of objects to skip to fetch the next page of objects. For example, limit=10 and cursor=10 will show results for record 11 - 20.",
  1352. "required": false,
  1353. "type": "integer",
  1354. "default": 0,
  1355. "format": "int32"
  1356. }
  1357. ],
  1358. "responses": {
  1359. "200": {
  1360. "description": "OK",
  1361. "schema": {
  1362. "$ref": "#/definitions/PagingObject"
  1363. }
  1364. }
  1365. }
  1366. },
  1367. "post": {
  1368. "tags": [
  1369. "note-controller",
  1370. "x-show-objects-note-controller=[NoteObject]"
  1371. ],
  1372. "summary": "Create Note",
  1373. "description": "Add a note to an associated entity to provide additional descriptive information.",
  1374. "operationId": "create_note",
  1375. "consumes": [
  1376. "application/json"
  1377. ],
  1378. "produces": [
  1379. "*/*"
  1380. ],
  1381. "parameters": [
  1382. {
  1383. "in": "body",
  1384. "name": "createNoteCommand",
  1385. "description": "createNoteCommand",
  1386. "required": true,
  1387. "schema": {
  1388. "$ref": "#/definitions/CreateNote"
  1389. }
  1390. }
  1391. ],
  1392. "responses": {
  1393. "200": {
  1394. "description": "OK",
  1395. "schema": {
  1396. "$ref": "#/definitions/NoteObject"
  1397. }
  1398. }
  1399. }
  1400. }
  1401. },
  1402. "/v2/billing/notes/{noteId}": {
  1403. "get": {
  1404. "tags": [
  1405. "note-controller",
  1406. "x-show-objects-note-controller=[NoteObject]"
  1407. ],
  1408. "summary": "Get Note Details",
  1409. "description": "Retrieve the note's details.",
  1410. "operationId": "retrieve_note_details",
  1411. "consumes": [
  1412. "application/json"
  1413. ],
  1414. "produces": [
  1415. "application/json"
  1416. ],
  1417. "parameters": [
  1418. {
  1419. "name": "noteId",
  1420. "in": "path",
  1421. "description": "Auto-generated identifier of the note.",
  1422. "required": true,
  1423. "type": "string"
  1424. }
  1425. ],
  1426. "responses": {
  1427. "200": {
  1428. "description": "OK",
  1429. "schema": {
  1430. "$ref": "#/definitions/NoteObject"
  1431. }
  1432. }
  1433. }
  1434. },
  1435. "put": {
  1436. "tags": [
  1437. "note-controller",
  1438. "x-show-objects-note-controller=[NoteObject]"
  1439. ],
  1440. "summary": "Update Note",
  1441. "description": "Update an existing note along with associated entity that this note belongs to.",
  1442. "operationId": "update_note",
  1443. "consumes": [
  1444. "application/json"
  1445. ],
  1446. "produces": [
  1447. "application/json"
  1448. ],
  1449. "parameters": [
  1450. {
  1451. "in": "body",
  1452. "name": "updateNoteCommand",
  1453. "description": "updateNoteCommand",
  1454. "required": true,
  1455. "schema": {
  1456. "$ref": "#/definitions/UpdateNoteCommand"
  1457. }
  1458. },
  1459. {
  1460. "name": "noteId",
  1461. "in": "path",
  1462. "description": "Auto-generated identifier of the note.",
  1463. "required": true,
  1464. "type": "string"
  1465. }
  1466. ],
  1467. "responses": {
  1468. "200": {
  1469. "description": "OK",
  1470. "schema": {
  1471. "$ref": "#/definitions/NoteObject"
  1472. }
  1473. }
  1474. }
  1475. },
  1476. "delete": {
  1477. "tags": [
  1478. "note-controller",
  1479. "x-show-objects-note-controller=[NoteObject]"
  1480. ],
  1481. "summary": "Delete Note",
  1482. "description": "Delete a note associated with an object.",
  1483. "operationId": "delete_note",
  1484. "consumes": [
  1485. "application/json"
  1486. ],
  1487. "produces": [
  1488. "application/json"
  1489. ],
  1490. "parameters": [
  1491. {
  1492. "name": "noteId",
  1493. "in": "path",
  1494. "description": "Auto-generated identifier of the note.",
  1495. "required": true,
  1496. "type": "string"
  1497. }
  1498. ],
  1499. "responses": {
  1500. "200": {
  1501. "description": "OK",
  1502. "schema": {
  1503. "$ref": "#/definitions/DeletedEntityObject"
  1504. }
  1505. }
  1506. }
  1507. }
  1508. },
  1509. "/v2/billing/plans": {
  1510. "get": {
  1511. "tags": [
  1512. "plan-controller",
  1513. "x-show-objects-plan-controller=[PlanObject]"
  1514. ],
  1515. "summary": "List plans",
  1516. "description": "Get a list of plans.",
  1517. "operationId": "list_plans",
  1518. "consumes": [
  1519. "application/json"
  1520. ],
  1521. "produces": [
  1522. "application/json"
  1523. ],
  1524. "parameters": [
  1525. {
  1526. "name": "limit",
  1527. "in": "query",
  1528. "description": "Apply a limit to the number of objects to be returned. Supported limit range is 1 to 100. Defaults to 10.",
  1529. "required": false,
  1530. "type": "integer",
  1531. "default": 10,
  1532. "format": "int32"
  1533. },
  1534. {
  1535. "name": "cursor",
  1536. "in": "query",
  1537. "description": "An cursor for use in pagination. By specifying the number of objects to skip, you are able to fetch the next page of objects. For example, if you make a list request with limit=10 and cursor=10, you will retrieve objects 11-20 across the full list.",
  1538. "required": false,
  1539. "type": "integer",
  1540. "default": 0,
  1541. "format": "int32"
  1542. },
  1543. {
  1544. "name": "name",
  1545. "in": "query",
  1546. "description": "Filter list of returned plans by name. Partial world search supported. For example, when name=mem, all plans with \"mem\" as part of the name will be returned.",
  1547. "required": false,
  1548. "type": "string"
  1549. },
  1550. {
  1551. "name": "status",
  1552. "in": "query",
  1553. "description": "Filter list of returned plans by status. Supported values are <code>active</code> or <code>inactive</code>.",
  1554. "required": false,
  1555. "type": "string"
  1556. }
  1557. ],
  1558. "responses": {
  1559. "200": {
  1560. "description": "OK",
  1561. "schema": {
  1562. "$ref": "#/definitions/PlansObject"
  1563. }
  1564. }
  1565. }
  1566. },
  1567. "post": {
  1568. "tags": [
  1569. "plan-controller",
  1570. "x-show-objects-plan-controller=[PlanObject]"
  1571. ],
  1572. "summary": "Create a plan",
  1573. "description": "Plans can be easily created in the Plans section of the Merchant Site, or by using this API to have plans created on the fly.",
  1574. "operationId": "create_plan",
  1575. "consumes": [
  1576. "application/json"
  1577. ],
  1578. "produces": [
  1579. "*/*"
  1580. ],
  1581. "parameters": [
  1582. {
  1583. "in": "body",
  1584. "name": "command",
  1585. "description": "command",
  1586. "required": true,
  1587. "schema": {
  1588. "$ref": "#/definitions/CreatePlan"
  1589. }
  1590. }
  1591. ],
  1592. "responses": {
  1593. "200": {
  1594. "description": "OK",
  1595. "schema": {
  1596. "$ref": "#/definitions/PlanObject"
  1597. }
  1598. }
  1599. }
  1600. }
  1601. },
  1602. "/v2/billing/plans/{planId}": {
  1603. "get": {
  1604. "tags": [
  1605. "plan-controller",
  1606. "x-show-objects-plan-controller=[PlanObject]"
  1607. ],
  1608. "summary": "Retrieve a plan",
  1609. "description": "Gets the full details of a plan.",
  1610. "operationId": "retrieve_plan",
  1611. "consumes": [
  1612. "application/json"
  1613. ],
  1614. "produces": [
  1615. "application/json"
  1616. ],
  1617. "parameters": [
  1618. {
  1619. "name": "planId",
  1620. "in": "path",
  1621. "description": "Identifier of the plan to retrieve.",
  1622. "required": true,
  1623. "type": "string"
  1624. }
  1625. ],
  1626. "responses": {
  1627. "200": {
  1628. "description": "OK",
  1629. "schema": {
  1630. "$ref": "#/definitions/PlanObject"
  1631. }
  1632. }
  1633. }
  1634. },
  1635. "put": {
  1636. "tags": [
  1637. "plan-controller",
  1638. "x-show-objects-plan-controller=[PlanObject]"
  1639. ],
  1640. "summary": "Update a plan",
  1641. "description": "Update details of a plan. Changes will be effective for subscriptions created after the update. Existing subscriptions will not be affected and remain grandfathered at terms agreed previously when subscribing to the plan.",
  1642. "operationId": "update_plan",
  1643. "consumes": [
  1644. "application/json"
  1645. ],
  1646. "produces": [
  1647. "*/*"
  1648. ],
  1649. "parameters": [
  1650. {
  1651. "in": "body",
  1652. "name": "command",
  1653. "description": "command",
  1654. "required": true,
  1655. "schema": {
  1656. "$ref": "#/definitions/UpdatePlan"
  1657. }
  1658. },
  1659. {
  1660. "name": "planId",
  1661. "in": "path",
  1662. "description": "Identifier of the plan to update.",
  1663. "required": true,
  1664. "type": "string"
  1665. }
  1666. ],
  1667. "responses": {
  1668. "200": {
  1669. "description": "OK",
  1670. "schema": {
  1671. "$ref": "#/definitions/PlanObject"
  1672. }
  1673. }
  1674. }
  1675. }
  1676. },
  1677. "/v2/billing/settlements": {
  1678. "get": {
  1679. "tags": [
  1680. "settlement-controller",
  1681. "x-show-objects-settlement-controller=[SettlementObject]"
  1682. ],
  1683. "summary": "List Settlements",
  1684. "description": "List of settlements",
  1685. "operationId": "list_settlements",
  1686. "consumes": [
  1687. "application/json"
  1688. ],
  1689. "produces": [
  1690. "application/json"
  1691. ],
  1692. "parameters": [
  1693. {
  1694. "name": "from",
  1695. "in": "query",
  1696. "description": "Start date for range of settlements to view. Filter by settlement run date defined in <code>settlementDate</code>.",
  1697. "required": false,
  1698. "type": "string"
  1699. },
  1700. {
  1701. "name": "until",
  1702. "in": "query",
  1703. "description": "End date for range of settlements to view. Filter by settlement run date defined in <code>settlementDate</code>.",
  1704. "required": false,
  1705. "type": "string"
  1706. },
  1707. {
  1708. "name": "limit",
  1709. "in": "query",
  1710. "description": "Apply a limit to the number of objects to be returned. Supported limit range is 1 to 100. Defaults to 10.",
  1711. "required": false,
  1712. "type": "integer",
  1713. "default": 10,
  1714. "format": "int32"
  1715. },
  1716. {
  1717. "name": "cursor",
  1718. "in": "query",
  1719. "description": "An cursor for use in pagination. By specifying the number of objects to skip, you are able to fetch the next page of objects. For example, if you make a list request with limit=10 and cursor=10, you will retrieve objects 11-20 across the full list.",
  1720. "required": false,
  1721. "type": "integer",
  1722. "default": 0,
  1723. "format": "int32"
  1724. }
  1725. ],
  1726. "responses": {
  1727. "200": {
  1728. "description": "OK",
  1729. "schema": {
  1730. "$ref": "#/definitions/SettlementObject"
  1731. }
  1732. }
  1733. }
  1734. }
  1735. },
  1736. "/v2/billing/subscriptions": {
  1737. "get": {
  1738. "tags": [
  1739. "subscription-controller",
  1740. "x-show-objects-subscription-controller=[SubscriptionObject]"
  1741. ],
  1742. "summary": "List subscriptions",
  1743. "description": "List all subscriptions belonging to a customer.",
  1744. "operationId": "list_subscriptions",
  1745. "consumes": [
  1746. "application/json"
  1747. ],
  1748. "produces": [
  1749. "application/json"
  1750. ],
  1751. "parameters": [
  1752. {
  1753. "name": "customerId",
  1754. "in": "query",
  1755. "description": "Auto-generated identifier of the customer.",
  1756. "required": true,
  1757. "type": "string"
  1758. },
  1759. {
  1760. "name": "limit",
  1761. "in": "query",
  1762. "description": "To paginate a large result set, use the 'limit' argument to limit the number of results returned per page up to a maximum of 100 records. For example, <code>limit</code> = 10 shows results 1-10. The default returned result would be 100.",
  1763. "required": false,
  1764. "type": "integer",
  1765. "default": 10,
  1766. "format": "int32"
  1767. },
  1768. {
  1769. "name": "cursor",
  1770. "in": "query",
  1771. "description": "An cursor for use in pagination. Specify the number of objects to skip to fetch the next page of objects. For example, limit=10 and cursor=10 will show results for record 11 - 20.",
  1772. "required": false,
  1773. "type": "integer",
  1774. "default": 0,
  1775. "format": "int32"
  1776. }
  1777. ],
  1778. "responses": {
  1779. "200": {
  1780. "description": "OK",
  1781. "schema": {
  1782. "$ref": "#/definitions/SubscriptionsObject"
  1783. }
  1784. }
  1785. }
  1786. },
  1787. "post": {
  1788. "tags": [
  1789. "subscription-controller",
  1790. "x-show-objects-subscription-controller=[SubscriptionObject]"
  1791. ],
  1792. "summary": "Create a subscription",
  1793. "description": "Creates a new subscription for a customer. By default, Subscriptions will inherit values from the Plan template. Specify new values in the Subscription to override values inherited from the Plan.",
  1794. "operationId": "create_subscription",
  1795. "consumes": [
  1796. "application/json"
  1797. ],
  1798. "produces": [
  1799. "*/*"
  1800. ],
  1801. "parameters": [
  1802. {
  1803. "in": "body",
  1804. "name": "command",
  1805. "description": "command",
  1806. "required": true,
  1807. "schema": {
  1808. "$ref": "#/definitions/CreateSubscription"
  1809. }
  1810. }
  1811. ],
  1812. "responses": {
  1813. "200": {
  1814. "description": "OK",
  1815. "schema": {
  1816. "$ref": "#/definitions/SubscriptionObject"
  1817. }
  1818. }
  1819. }
  1820. }
  1821. },
  1822. "/v2/billing/subscriptions/preview": {
  1823. "post": {
  1824. "tags": [
  1825. "subscription-controller",
  1826. "x-show-objects-subscription-controller=[SubscriptionObject]"
  1827. ],
  1828. "summary": "Preview a subscription",
  1829. "description": "Before creating a subscription, you can preview a subscription first to double-check that details inherited from the plan object are correct.",
  1830. "operationId": "preview_subscription",
  1831. "consumes": [
  1832. "application/json"
  1833. ],
  1834. "produces": [
  1835. "*/*"
  1836. ],
  1837. "parameters": [
  1838. {
  1839. "in": "body",
  1840. "name": "command",
  1841. "description": "command",
  1842. "required": true,
  1843. "schema": {
  1844. "$ref": "#/definitions/PreviewSubscription"
  1845. }
  1846. }
  1847. ],
  1848. "responses": {
  1849. "200": {
  1850. "description": "OK",
  1851. "schema": {
  1852. "$ref": "#/definitions/SubscriptionObject"
  1853. }
  1854. }
  1855. }
  1856. }
  1857. },
  1858. "/v2/billing/subscriptions/{subscriptionId}": {
  1859. "get": {
  1860. "tags": [
  1861. "subscription-controller",
  1862. "x-show-objects-subscription-controller=[SubscriptionObject]"
  1863. ],
  1864. "summary": "Retrieve a subscription",
  1865. "description": "Retrieves a customer's subscription details.",
  1866. "operationId": "retrieve_subscription",
  1867. "consumes": [
  1868. "application/json"
  1869. ],
  1870. "produces": [
  1871. "application/json"
  1872. ],
  1873. "parameters": [
  1874. {
  1875. "name": "subscriptionId",
  1876. "in": "path",
  1877. "description": "Auto-generated unique identifier of the subscription.",
  1878. "required": true,
  1879. "type": "string"
  1880. }
  1881. ],
  1882. "responses": {
  1883. "200": {
  1884. "description": "OK",
  1885. "schema": {
  1886. "$ref": "#/definitions/SubscriptionObject"
  1887. }
  1888. }
  1889. }
  1890. }
  1891. },
  1892. "/v2/billing/subscriptions/{subscriptionId}/activate": {
  1893. "put": {
  1894. "tags": [
  1895. "subscription-controller",
  1896. "x-show-objects-subscription-controller=[SubscriptionObject]"
  1897. ],
  1898. "summary": "Activate a subscription",
  1899. "description": "Activate a pending subscription and promote its status from 'Pending' to 'Active'. An active subscription will then have payment instruction created.",
  1900. "operationId": "activate_subscription",
  1901. "consumes": [
  1902. "application/json"
  1903. ],
  1904. "produces": [
  1905. "*/*"
  1906. ],
  1907. "parameters": [
  1908. {
  1909. "in": "body",
  1910. "name": "command",
  1911. "description": "command",
  1912. "required": true,
  1913. "schema": {
  1914. "$ref": "#/definitions/ActivatePendingSubscription"
  1915. }
  1916. },
  1917. {
  1918. "name": "subscriptionId",
  1919. "in": "path",
  1920. "description": "Auto-generated unique identifier of the subscription.",
  1921. "required": true,
  1922. "type": "string"
  1923. }
  1924. ],
  1925. "responses": {
  1926. "200": {
  1927. "description": "OK",
  1928. "schema": {
  1929. "$ref": "#/definitions/SubscriptionObject"
  1930. }
  1931. }
  1932. }
  1933. }
  1934. },
  1935. "/v2/billing/subscriptions/{subscriptionId}/cancel": {
  1936. "put": {
  1937. "tags": [
  1938. "subscription-controller",
  1939. "x-show-objects-subscription-controller=[SubscriptionObject]"
  1940. ],
  1941. "summary": "Cancel a subscription",
  1942. "description": "Cancel a subscription. Cancellation stops subsequent billing and payment collections but outstanding payments will remain and need to be resolved separately.",
  1943. "operationId": "cancel_subscription",
  1944. "consumes": [
  1945. "application/json"
  1946. ],
  1947. "produces": [
  1948. "application/json"
  1949. ],
  1950. "parameters": [
  1951. {
  1952. "name": "subscriptionId",
  1953. "in": "path",
  1954. "description": "Auto-generated unique identifier of the subscription.",
  1955. "required": true,
  1956. "type": "string"
  1957. }
  1958. ],
  1959. "responses": {
  1960. "200": {
  1961. "description": "OK",
  1962. "schema": {
  1963. "$ref": "#/definitions/SubscriptionObject"
  1964. }
  1965. }
  1966. }
  1967. }
  1968. },
  1969. "/v2/billing/subscriptions/{subscriptionId}/paymentmethod/{paymentMethodToken}": {
  1970. "put": {
  1971. "tags": [
  1972. "subscription-controller",
  1973. "x-show-objects-subscription-controller=[SubscriptionObject]"
  1974. ],
  1975. "summary": "Update subscription's payment method",
  1976. "description": "Update a subscription's payment method.",
  1977. "operationId": "update_subscription_payment_method",
  1978. "consumes": [
  1979. "application/json"
  1980. ],
  1981. "produces": [
  1982. "application/json"
  1983. ],
  1984. "parameters": [
  1985. {
  1986. "name": "subscriptionId",
  1987. "in": "path",
  1988. "description": "Auto-generated unique identifier of the subscription.",
  1989. "required": true,
  1990. "type": "string"
  1991. },
  1992. {
  1993. "name": "paymentMethodToken",
  1994. "in": "path",
  1995. "description": "Auto-generated unique identifier of the payment method token generated by the Ezypay Vault.",
  1996. "required": true,
  1997. "type": "string"
  1998. }
  1999. ],
  2000. "responses": {
  2001. "200": {
  2002. "description": "OK",
  2003. "schema": {
  2004. "$ref": "#/definitions/SubscriptionObject"
  2005. }
  2006. }
  2007. }
  2008. }
  2009. },
  2010. "/v2/billing/transactions": {
  2011. "get": {
  2012. "tags": [
  2013. "transaction-controller",
  2014. "x-show-objects-transaction-controller=[TransactionObject]"
  2015. ],
  2016. "summary": "List transactions",
  2017. "description": "Get a list of of transactions for a specific customer or invoice. The transactions are returned sorted by creation date, with the most recently created transactions appearing first.",
  2018. "operationId": "list_transaction",
  2019. "consumes": [
  2020. "application/json"
  2021. ],
  2022. "produces": [
  2023. "application/json"
  2024. ],
  2025. "parameters": [
  2026. {
  2027. "name": "transactionNumber",
  2028. "in": "query",
  2029. "description": "Transaction identifier generated by the payment processor.",
  2030. "required": false,
  2031. "type": "string"
  2032. },
  2033. {
  2034. "name": "senderId",
  2035. "in": "query",
  2036. "description": "Identifier of the sender who sent the funds.",
  2037. "required": false,
  2038. "type": "string"
  2039. },
  2040. {
  2041. "name": "receiverId",
  2042. "in": "query",
  2043. "description": "Identifier of the recipient who received the funds..",
  2044. "required": false,
  2045. "type": "string"
  2046. },
  2047. {
  2048. "name": "documentId",
  2049. "in": "query",
  2050. "description": "Identifier of the document that triggered this transaction.",
  2051. "required": false,
  2052. "type": "string"
  2053. },
  2054. {
  2055. "name": "limit",
  2056. "in": "query",
  2057. "description": "Apply a limit to the number of objects to be returned. Supported limit range is 1 to 100. Defaults to 10.",
  2058. "required": false,
  2059. "type": "integer",
  2060. "default": 10,
  2061. "format": "int32"
  2062. },
  2063. {
  2064. "name": "cursor",
  2065. "in": "query",
  2066. "description": "An cursor for use in pagination. By specifying the number of objects to skip, you are able to fetch the next page of objects. For example, if you make a list request with limit=10 and cursor=10, you will retrieve objects 11-20 across the full list.",
  2067. "required": false,
  2068. "type": "integer",
  2069. "default": 0,
  2070. "format": "int32"
  2071. },
  2072. {
  2073. "name": "from",
  2074. "in": "query",
  2075. "description": "Start date for range of transactions to view. Filter by date defined in <code>createdOn</code>. Supported format is YYYY-MM-DD.",
  2076. "required": false,
  2077. "type": "string"
  2078. },
  2079. {
  2080. "name": "until",
  2081. "in": "query",
  2082. "description": "End date for range of transactions to view. Filter by date defined in <code>createdOn</code>. Supported format is YYYY-MM-DD.",
  2083. "required": false,
  2084. "type": "string"
  2085. },
  2086. {
  2087. "name": "status",
  2088. "in": "query",
  2089. "description": "State of the transaction attempt. Supported values are <code>success</code>, <code>processing</code>, <code>failed</code>, <code>settled</code> or <code>chargeback</code>.",
  2090. "required": false,
  2091. "type": "string"
  2092. }
  2093. ],
  2094. "responses": {
  2095. "200": {
  2096. "description": "OK",
  2097. "schema": {
  2098. "$ref": "#/definitions/PaymentsObject"
  2099. }
  2100. }
  2101. }
  2102. }
  2103. },
  2104. "/v2/billing/transactions/{transactionId}": {
  2105. "get": {
  2106. "tags": [
  2107. "transaction-controller",
  2108. "x-show-objects-transaction-controller=[TransactionObject]"
  2109. ],
  2110. "summary": "Retrieve a transaction",
  2111. "description": "Retrieves the full details of a transaction.",
  2112. "operationId": "retrieve_transaction",
  2113. "consumes": [
  2114. "application/json"
  2115. ],
  2116. "produces": [
  2117. "application/json"
  2118. ],
  2119. "parameters": [
  2120. {
  2121. "name": "transactionId",
  2122. "in": "path",
  2123. "description": "Auto-generated unique identifier of the transaction.",
  2124. "required": true,
  2125. "type": "string"
  2126. }
  2127. ],
  2128. "responses": {
  2129. "200": {
  2130. "description": "OK",
  2131. "schema": {
  2132. "$ref": "#/definitions/TransactionObject"
  2133. }
  2134. }
  2135. }
  2136. }
  2137. },
  2138. "/v2/billing/transfers": {
  2139. "post": {
  2140. "tags": [
  2141. "transfer-controller",
  2142. "x-show-objects-transfer-controller=[TransferObject]"
  2143. ],
  2144. "summary": "Create a transfer",
  2145. "description": "Creates an immediate, on-demand transfer of funds between two merchant’s wallet accounts.",
  2146. "operationId": "create_transfer",
  2147. "consumes": [
  2148. "application/json"
  2149. ],
  2150. "produces": [
  2151. "application/json"
  2152. ],
  2153. "parameters": [
  2154. {
  2155. "in": "body",
  2156. "name": "command",
  2157. "description": "command",
  2158. "required": true,
  2159. "schema": {
  2160. "$ref": "#/definitions/CreateTransfer"
  2161. }
  2162. }
  2163. ],
  2164. "responses": {
  2165. "200": {
  2166. "description": "OK",
  2167. "schema": {
  2168. "$ref": "#/definitions/TransferObject"
  2169. }
  2170. }
  2171. }
  2172. }
  2173. }
  2174. },
  2175. "definitions": {
  2176. "SettlementScheduleObject": {
  2177. "type": "object",
  2178. "properties": {
  2179. "intervalUnit": {
  2180. "type": "string",
  2181. "example": "week",
  2182. "description": "Specifies frequency of settlement. Valid values are <code>day</code>, <code>week</code>or <code>month</code>. If no value is provided, the default value is <code>week</code>."
  2183. },
  2184. "interval": {
  2185. "type": "integer",
  2186. "format": "int32",
  2187. "example": 1,
  2188. "description": "Specifies the number of intervals in settlement frequency. For example <code>interval=2</code> and <code>intervalUnit=\"week\"</code> would means billing every 2 weeks. If no value is provided, the default value is 1."
  2189. },
  2190. "settlementDay": {
  2191. "type": "string",
  2192. "example": "wednesday",
  2193. "description": "Specifies the day the settlement schedule runs for the merchant.<ul><li>if <code>intervalUnit = \"day\"</code>, then no value required.</li><li>if <code>intervalUnit = \"week\"</code>, then supported values are <code>monday, tuesday, wednesday, thursday</code>, or <code>friday</code>.</li><li>if <code>intervalUnit = \"month\"</code>, then supported values are numbers between 1 to 31. If the value specified is 29, 30 or 31 and the next month does not have these dates, it will automatically be rounded to the last day of the month.</li></ul>Note: Settlement schedules can run on weekends but, depending on the payment provider, settlements may only get processed on the next working day."
  2194. },
  2195. "nextSettlementDate": {
  2196. "type": "string",
  2197. "example": "2016-12-07",
  2198. "description": "Auto-generated date for next settlement date."
  2199. }
  2200. },
  2201. "description": "The schedule for settlements."
  2202. },
  2203. "ActivatePendingSubscription": {
  2204. "type": "object",
  2205. "properties": {
  2206. "startDate": {
  2207. "type": "string",
  2208. "description": "The preferred start date of the subscription. The subscription start date cannot be back-dated. If not specified, the subscription will start immediately on the current date (however invoices will be generated the next day). "
  2209. },
  2210. "paymentMethodToken": {
  2211. "type": "string",
  2212. "description": "The payment method token that is generated by the vault."
  2213. }
  2214. }
  2215. },
  2216. "Address": {
  2217. "type": "object",
  2218. "required": [
  2219. "address1"
  2220. ],
  2221. "properties": {
  2222. "address1": {
  2223. "type": "string",
  2224. "example": "86, Help Street",
  2225. "description": "The first line of the address. Max of 100 characters."
  2226. },
  2227. "address2": {
  2228. "type": "string",
  2229. "example": "Chatswood",
  2230. "description": "The second line of the address. If there are no details for this field, you may leave this field blank. Max of 100 characters."
  2231. },
  2232. "postalCode": {
  2233. "type": "string",
  2234. "example": "2067",
  2235. "description": "The postal code of the address. Max of 20 characters."
  2236. },
  2237. "city": {
  2238. "type": "string",
  2239. "example": "Sydney",
  2240. "description": "The town/city of the address. Max of 100 characters."
  2241. },
  2242. "state": {
  2243. "type": "string",
  2244. "example": "NSW",
  2245. "description": "The state of the address. Max of 100 characters."
  2246. },
  2247. "countryCode": {
  2248. "type": "string",
  2249. "example": "AU",
  2250. "description": "The country code of the address. Max of 2 characters."
  2251. }
  2252. }
  2253. },
  2254. "BankObject": {
  2255. "type": "object",
  2256. "properties": {
  2257. "accountHolderName": {
  2258. "type": "string",
  2259. "example": "Matt Zimmer",
  2260. "description": "The account holder's name . Max 50 characters."
  2261. },
  2262. "bankNumber": {
  2263. "type": "string",
  2264. "example": "033088",
  2265. "description": "Identifying number of the bank. Country specific rules."
  2266. },
  2267. "branchNumber": {
  2268. "type": "string",
  2269. "description": "Identifying number for a bank branch. Max of 4 digits for New Zealand."
  2270. },
  2271. "last4": {
  2272. "type": "string",
  2273. "example": "4455",
  2274. "description": "The last 4 digits of the bank account number. Full account number is not displayed for security reasons."
  2275. },
  2276. "suffixNumber": {
  2277. "type": "string",
  2278. "description": "Only required by New Zealand Banks. Must be between 2-3 digits."
  2279. }
  2280. }
  2281. },
  2282. "InvoiceItemCommand": {
  2283. "type": "object",
  2284. "required": [
  2285. "amount",
  2286. "description"
  2287. ],
  2288. "properties": {
  2289. "amount": {
  2290. "description": "Gross amount due for this invoice item, inclusive of tax.",
  2291. "$ref": "#/definitions/Amount"
  2292. },
  2293. "tax": {
  2294. "description": "The tax rate applied to this invoice item. If left blank, uses the tax rate specified in the merchant settings by default.",
  2295. "$ref": "#/definitions/Tax"
  2296. },
  2297. "description": {
  2298. "type": "string",
  2299. "description": "Description of the invoice item."
  2300. },
  2301. "accountingCode": {
  2302. "type": "string",
  2303. "description": "Specify an accounting code to categorise revenue collected from the invoice item. Max of 50 characters."
  2304. }
  2305. }
  2306. },
  2307. "SetNewPaymentMethodCommand": {
  2308. "type": "object",
  2309. "required": [
  2310. "newPaymentMethodToken"
  2311. ],
  2312. "properties": {
  2313. "newPaymentMethodToken": {
  2314. "type": "string",
  2315. "example": "d5ac31f8-7989-4ee6-aeeb-87bb764aa760",
  2316. "description": "Auto-generated unique identifier of the payment method token generated by vault."
  2317. },
  2318. "primary": {
  2319. "type": "boolean",
  2320. "example": true,
  2321. "description": "Indicator to set this payment method as Customer's preferred Payment Method"
  2322. }
  2323. }
  2324. },
  2325. "CreatePlan": {
  2326. "type": "object",
  2327. "required": [
  2328. "amount",
  2329. "name"
  2330. ],
  2331. "properties": {
  2332. "name": {
  2333. "type": "string",
  2334. "example": "Orange Plan Fortnightly",
  2335. "description": "Plan name. Max of 50 characters."
  2336. },
  2337. "memo": {
  2338. "type": "string",
  2339. "example": "Full access to gym facilities & fortnightly billing.",
  2340. "description": "Brief memo of the plan. Max of 50 characters."
  2341. },
  2342. "accountingCode": {
  2343. "type": "string",
  2344. "description": "Specify an accounting code to categorise revenue collected from the plan's subscription payment. Max of 50 characters."
  2345. },
  2346. "amount": {
  2347. "description": "The gross amount charged to the customer, inclusive of tax. Supports decimal values for cents. For example, $24.50 would be 24.50.",
  2348. "$ref": "#/definitions/Amount"
  2349. },
  2350. "tax": {
  2351. "description": "The tax rate applied to the plan's amount. If left blank, uses the tax rate specified in the merchant settings by default.",
  2352. "$ref": "#/definitions/Tax"
  2353. },
  2354. "setupPayments": {
  2355. "type": "array",
  2356. "description": "Setup payment settings.",
  2357. "items": {
  2358. "$ref": "#/definitions/SetupPayment"
  2359. }
  2360. },
  2361. "intervalUnit": {
  2362. "type": "string",
  2363. "example": "week",
  2364. "description": "Specifies frequency of billing. Valid values are <code>day</code>, <code>week</code> or <code>month</code>. If no value is provided, the default value is <code>week</code>. ",
  2365. "enum": [
  2366. "DAY",
  2367. "WEEK",
  2368. "MONTH"
  2369. ]
  2370. },
  2371. "interval": {
  2372. "type": "integer",
  2373. "format": "int32",
  2374. "example": 2,
  2375. "description": "Number to be specified as interval to manipulate billing frequency. For example <code>interval=2</code> and <code>intervalUnit=week</code> would means billing every 2 weeks. If no value is provided, the default value is 1."
  2376. },
  2377. "billingStart": {
  2378. "type": "string",
  2379. "example": "immediate",
  2380. "description": "Specifies the default day the billing schedule starts for customers subscribed to the plan. Supported values are:<ul><li><code>immediate</code> - Default value. Subscriptions will start on the same day..<li><code>day_of_week</code> - Subscriptions will start on a specific day as defined in <code>billingStartValue</code>.<li><code>day_of_month</code> - Subscriptions will start on specific day in the month as defined in <code>billingStartValue</code>.</ul>"
  2381. },
  2382. "billingStartValue": {
  2383. "type": "string",
  2384. "description": "Specifies the value corresponding to <code>billingStart</code>. If using <code>immediate</code>, no value is required and default value is null.<ul><li>If <code>billingStart</code> = <code>day_of_week</code> then supported values are <code>monday</code>, <code>tuesday</code>, <code>wednesday</code>, <code>thursday</code>, <code>friday</code>, <code>saturday</code> or <code>sunday</code>. Default value is <code>monday</code> and the billing schedule will start on the first up-coming Monday<li>If <code>billingStart</code> = <code>day_of_month</code> then supported values are numbers between 1 to 31. Default value is 1 and the billing schedule will start on the upcoming 1st of the month. If the value specified is 29, 30 or 31 and the next month does not have these dates, it will automatically be rounded to the last day of the month.</ul>",
  2385. "readOnly": true
  2386. },
  2387. "billingEnd": {
  2388. "type": "string",
  2389. "example": "ongoing",
  2390. "description": "Specifies the rules to automate when a subscription ends. Supported values are:<ul><li><code>ongoing</code> - Default value. Subscriptions created from this plan will have no end date and continue billing on an ongoing basis (until instructions are given to stop billing).<li><code>amount_collected</code> - Subscriptions will end when a specified amount is collected as defined in <code>billingEndValue</code>.<li><code>billing_cycles</code> - Subscriptions will end after a specified number of billing cycles as defined in <code>billingEndValue</code>.<li><code>end_date</code> - Subscriptions will end on specific date. Specify this date when you create a subscription in <code>billingEndValue</code>.</ul>"
  2391. },
  2392. "billingEndValue": {
  2393. "type": "string",
  2394. "description": "Specifies the value corresponding to <code>billingEnd</code>. If using <code>ongoing</code>, no value is required and default value is null.<ul><li>If <code>billingEnd</code> = <code>amount_collected</code> then provide an amount to be collected.</li><li>If <code>billingEnd</code> = <code>billing_cycles</code> then provide a number of billing cycles. If it is a one-off plan, set <code>billingEndValue<code> = 1.</li></ul>",
  2395. "readOnly": true
  2396. },
  2397. "firstBilling": {
  2398. "type": "string",
  2399. "example": "prorate",
  2400. "description": "Specifies the rules to auto-calculate the billing charges for the first scheduled billing. Supported values are:<ul><li><code>full_amount</code> - Default value. The first billing will charge the full amount on the subscription as defined in the plan's <code>amount</code>.</li><li><code>prorate</code> - Prorate will be auto-calculated for the first billing in the subscription for the pro-rated period, with full recurring billing amount starting from the next billing cycle.</li></ul>"
  2401. },
  2402. "recurringBillingDay": {
  2403. "type": "string",
  2404. "example": "friday",
  2405. "description": "Only usable when <code>billingStart</code> is set to <code>immediate</code>. Allows you to specify the day recurring billing will occur after the first billing cycle.<ul><li>If <code>intervalUnit</code> = <code>week</code> then supported values are <code>monday</code>, <code>tuesday</code>, <code>wednesday</code>, <code>thursday</code>, <code>friday</code>, <code>saturday</code> or <code>sunday</code>. Default value is <code>monday</code>.</li><li>If <code>intervalUnit</code> = <code>month</code> then supported values are numbers between 1 and 31. Default value is 1. If the value specified is 29, 30 or 31 and the next month does not have these dates, it will automatically be rounded to the last day of the month.</li></ul>",
  2406. "readOnly": true
  2407. },
  2408. "metadata": {
  2409. "type": "object",
  2410. "description": "Store additional data about the customer object using key/value pairs format.",
  2411. "additionalProperties": {
  2412. "type": "object"
  2413. }
  2414. }
  2415. }
  2416. },
  2417. "CreditNoteItemObject": {
  2418. "type": "object",
  2419. "properties": {
  2420. "id": {
  2421. "type": "string",
  2422. "example": "30d44924-34f0-4580-b691-f3ec0d2c1b7a",
  2423. "description": "Auto-generated identifier of the credit note item."
  2424. },
  2425. "type": {
  2426. "type": "string",
  2427. "example": "refund_payment",
  2428. "description": "The type of the credit note item."
  2429. },
  2430. "description": {
  2431. "type": "string",
  2432. "example": "Bi-weekly subscription fee",
  2433. "description": "Description."
  2434. },
  2435. "accountingCode": {
  2436. "type": "string",
  2437. "description": "Category of revenue streams for finance reconciliation purposes. For example, different codes can categorise revenue made from different items."
  2438. },
  2439. "amount": {
  2440. "description": "The amount charged for this item.",
  2441. "$ref": "#/definitions/AmountObject"
  2442. },
  2443. "tax": {
  2444. "description": "The tax rate applied to this item.",
  2445. "$ref": "#/definitions/TaxObject"
  2446. }
  2447. }
  2448. },
  2449. "Tax": {
  2450. "type": "object",
  2451. "properties": {
  2452. "rate": {
  2453. "type": "number",
  2454. "example": 0,
  2455. "description": "Percent number Rate of the specified tax. Range of 0 to 99.99."
  2456. }
  2457. }
  2458. },
  2459. "EmailNotificationSettings": {
  2460. "type": "object",
  2461. "properties": {
  2462. "pastDueInvoice": {
  2463. "example": "true",
  2464. "description": "Flag to turn on notification for Past due invoice",
  2465. "$ref": "#/definitions/Optional«boolean»"
  2466. },
  2467. "paymentMethodCreation": {
  2468. "example": "true",
  2469. "description": "Flag to turn on notification for Payment method creation",
  2470. "$ref": "#/definitions/Optional«boolean»"
  2471. },
  2472. "subscriptionCreation": {
  2473. "example": "true",
  2474. "description": "Flag to turn on notification for Subscription creation",
  2475. "$ref": "#/definitions/Optional«boolean»"
  2476. }
  2477. }
  2478. },
  2479. "CreditNotesObject": {
  2480. "type": "object",
  2481. "properties": {
  2482. "data": {
  2483. "type": "array",
  2484. "description": "List of search results returned.",
  2485. "items": {
  2486. "$ref": "#/definitions/CreditNoteObject"
  2487. }
  2488. },
  2489. "paging": {
  2490. "description": "Paging information.",
  2491. "$ref": "#/definitions/Paging"
  2492. }
  2493. }
  2494. },
  2495. "CreateSubscription": {
  2496. "type": "object",
  2497. "required": [
  2498. "customerId",
  2499. "planId"
  2500. ],
  2501. "properties": {
  2502. "customerId": {
  2503. "type": "string",
  2504. "example": "8cc57af5-180a-473d-932c-95897a1af970",
  2505. "description": "Auto-generated identifier of the customer."
  2506. },
  2507. "planId": {
  2508. "type": "string",
  2509. "example": "03426a7f-fa7e-447a-a639-bd00023a67a3",
  2510. "description": "Auto-generated identifier of the plan."
  2511. },
  2512. "paymentMethodToken": {
  2513. "type": "string",
  2514. "example": "03426a7f-fa7e-447a-a639-bd00023a67a2",
  2515. "description": "The payment method token generated by the vault."
  2516. },
  2517. "markAsPending": {
  2518. "type": "boolean",
  2519. "example": false,
  2520. "description": "Default value is <code>false</code>. If set to <code>true</code>, creates a subscription with a Pending status. A pending subscription will ignore <code>subscriptionStartDate</code> and no schedules will be created.\nThe status can be changed to Active using the Activate Subscription API."
  2521. },
  2522. "startDate": {
  2523. "type": "string",
  2524. "example": "2017-01-01",
  2525. "description": "The preferred start date of the subscription. The subscription start date cannot be back-dated. The default value follows the plan's start date. Supported format is YYYY-MM-DD."
  2526. },
  2527. "name": {
  2528. "type": "string",
  2529. "example": "Orange Plan Fortnightly",
  2530. "description": "The name of the plan to subscribe the customer to. Max of 50 characters."
  2531. },
  2532. "accountingCode": {
  2533. "type": "string",
  2534. "description": "Specify an accounting code to categorise revenue collected from the subscription's payment. Max of 50 characters."
  2535. },
  2536. "amount": {
  2537. "description": "The gross amount charged to the customer, inclusive of tax. Supports decimal values for cents. For example, $24.50 would be 24.50.",
  2538. "$ref": "#/definitions/Amount"
  2539. },
  2540. "tax": {
  2541. "description": "If provided, each invoice generated for this subscription will include a tax rate.",
  2542. "$ref": "#/definitions/Tax"
  2543. },
  2544. "setupPayments": {
  2545. "type": "array",
  2546. "description": "One-time setup payment applied to the subscription.",
  2547. "items": {
  2548. "$ref": "#/definitions/SetupPayment"
  2549. }
  2550. },
  2551. "interval": {
  2552. "type": "string",
  2553. "example": "2",
  2554. "description": "Number to be specified as interval to manipulate billing frequency. For example <code>interval=2</code> and <code>intervalUnit=week</code> would means billing every 2 weeks. If no value is provided, the default value is 1."
  2555. },
  2556. "intervalUnit": {
  2557. "type": "string",
  2558. "example": "week",
  2559. "description": "Specifies frequency of billing. Valid values are <code>day</code>, <code>week</code> or <code>month</code>. If no value is provided, the default value is <code>week</code>. ",
  2560. "enum": [
  2561. "DAY",
  2562. "WEEK",
  2563. "MONTH"
  2564. ]
  2565. },
  2566. "billingStart": {
  2567. "type": "string",
  2568. "example": "immediate",
  2569. "description": "Specifies the default day the billing schedule starts for customers subscribed to the plan. Supported values are:<ul><li><code>immediate</code> - Default value. Subscriptions will start on the same day.<li><code>day_of_week</code> - Subscriptions will start on a specific day as defined in <code>billingStartValue</code>. Only supported if <code>interval</code> = <code>week</code><li><code>day_of_month</code> - Subscriptions will start on specific day in the month as defined in <code>billingStartValue</code>. Only supported if <code>interval</code> = <code>month</code></ul>"
  2570. },
  2571. "billingStartValue": {
  2572. "type": "string",
  2573. "description": "Specifies the value corresponding to <code>billingStart</code>. If using <code>immediate</code>, no value is required and default value is null.<ul><li>If <code>billingStart</code> = <code>day_of_week</code> then supported values are <code>monday</code>, <code>tuesday</code>, <code>wednesday</code>, <code>thursday</code>, <code>friday</code>, <code>saturday</code> or <code>sunday</code>. Default value is <code>monday</code> and the billing schedule will start on the first up-coming Monday<li>If <code>billingStart</code> = <code>day_of_month</code> then supported values are numbers between 1 to 31. Default value is 1 and the billing schedule will start on the upcoming 1st of the month. If the value specified is 29, 30 or 31 and the next month does not have these dates, it will automatically be rounded to the last day of the month.</ul>",
  2574. "readOnly": true
  2575. },
  2576. "billingEnd": {
  2577. "type": "string",
  2578. "example": "ongoing",
  2579. "description": "Specifies the rules to automate when a subscription ends. Supported values are:<ul><li><code>ongoing</code> - Default value. Subscriptions created from this plan will have no end date and continue billing on an ongoing basis (until instructions are given to stop billing).<li><code>amount_collected</code> - Subscriptions will end when a specified amount is collected as defined in <code>billingEndValue</code>.<li><code>billing_cycles</code> - Subscriptions will end after a specified number of billing cycles as defined in <code>billingEndValue</code>.<li><code>end_date</code> - Subscriptions will end on date defined in <code>billingEndValue</code>.</ul>"
  2580. },
  2581. "billingEndValue": {
  2582. "type": "string",
  2583. "description": "Specifies the value corresponding to <code>billingEnd</code>. If using <code>ongoing</code>, no value is required and default value is null.<ul><li>If <code>billingEnd </code> = <code>amount_collected</code> then provide an amount to be collected.</li><li>If <code>billingEnd</code> = <code>billing_cycles</code> then provide a number of billing cycles. If it is a one-off plan, set <code>billingEndValue</code> = 1.</li><li>If <code>billingEnd</code> = <code>end_date</code> then provide a date. Supported format is YYYY-MM-DD.</li></ul>",
  2584. "readOnly": true
  2585. },
  2586. "firstBilling": {
  2587. "type": "string",
  2588. "example": "prorate",
  2589. "description": "Specifies the rules to auto-calculate the billing charges for the first scheduled billing. The default value follows the plan's firstBilling. Supported values are:<ul><li><code>full_amount</code> - The first billing will charge the full amount on the subscription as defined in the plan's amount.</li><li><code>prorate</code> - Prorate will be auto-calculated for the first billing in the subscription for the pro-rated period, with full recurring billing amount starting from the next billing cycle.</li></ul>"
  2590. },
  2591. "firstBillingAmount": {
  2592. "description": "The amount to pay for the subscription's first scheduled billing.",
  2593. "$ref": "#/definitions/Amount"
  2594. },
  2595. "recurringBillingDate": {
  2596. "type": "string",
  2597. "example": "2016-01-06",
  2598. "description": "Allows you to specify the date recurring billing will occur after the first billing cycle. The default value follows the plan's <code>recurringBillingDay</code>. Supported format is YYYY-MM-DD.",
  2599. "readOnly": true
  2600. },
  2601. "metadata": {
  2602. "type": "object",
  2603. "description": "Store additional data about the subscription object using key/value pairs format. Max of 40 characters for key name and 255 characters for key value.",
  2604. "additionalProperties": {
  2605. "type": "object"
  2606. }
  2607. },
  2608. "autoPayment": {
  2609. "type": "boolean",
  2610. "example": false,
  2611. "description": "Specify if auto payment processing occurs for invoices generated from the subscription. Supported value are:<ul><li><code>true</code> = Default value. Invoices generated will automatically proceed to payment processing.</li><li><code>false</code> = Invoices are generated but will not automatically proceed to payment processing.</li></ul>"
  2612. }
  2613. },
  2614. "description": "Subscriptions provides the means for the merchants to collect payments from the customer on a recurring basis."
  2615. },
  2616. "Optional«boolean»": {
  2617. "type": "object"
  2618. },
  2619. "TransactionObject": {
  2620. "type": "object",
  2621. "properties": {
  2622. "id": {
  2623. "type": "string",
  2624. "example": "20c492d9-19c4-44ac-ab96-db813e01c0f8",
  2625. "description": "Auto-generated unique identifier of the payment."
  2626. },
  2627. "number": {
  2628. "type": "string",
  2629. "example": "29008",
  2630. "description": "Transaction identifier generated by the payment processor."
  2631. },
  2632. "status": {
  2633. "type": "string",
  2634. "example": "SUCCESS",
  2635. "description": "State of the transaction attempt. Supported values are <code>success</code>, <code>processing</code>, <code>failed</code>, <code>settled</code> or <code>chargeback</code>."
  2636. },
  2637. "createdOn": {
  2638. "type": "string",
  2639. "example": "2017-02-10T06:04:05.772",
  2640. "description": "DateTime of transaction."
  2641. },
  2642. "failedOn": {
  2643. "type": "string",
  2644. "description": "DateTime when it failed."
  2645. },
  2646. "amount": {
  2647. "description": "Amount transacted in the payment.",
  2648. "$ref": "#/definitions/Amount"
  2649. },
  2650. "type": {
  2651. "type": "string",
  2652. "example": "PAYMENT",
  2653. "description": "Identifies the transaction type. Supported values are <code>Payment</code> when collecting a payment, <code>Refund</code> when processing a refund."
  2654. },
  2655. "source": {
  2656. "type": "string",
  2657. "example": "payment_processor",
  2658. "description": "Identifies the payment source. Supported values are:<ul><li><code>payment_processor</code> - Transaction was processed by payment processors such as banks, credit or debit cards, or direct debits.<li><code>wallet</code> - Transaction occurred within the Ezypay system between escrow accounts.<li><code>external</code> - Transaction occurred outside the Ezypay system and was not processed by Ezypay.</ul>"
  2659. },
  2660. "paymentMethodType": {
  2661. "type": "string",
  2662. "example": "BANK",
  2663. "description": "Payment method type used in the transaction."
  2664. },
  2665. "paymentMethodDescription": {
  2666. "type": "string",
  2667. "example": "4455",
  2668. "description": "Payment method description used in the transaction."
  2669. },
  2670. "failedPaymentReason": {
  2671. "description": "Failed payment reason explaining reason for transaction failure if available.",
  2672. "$ref": "#/definitions/FailedPaymentReasonObject"
  2673. },
  2674. "paymentProviderResponse": {
  2675. "description": "The response of payment provider.",
  2676. "$ref": "#/definitions/PaymentProviderResponseObject"
  2677. },
  2678. "document": {
  2679. "description": "Details of the document that triggered the transaction.",
  2680. "$ref": "#/definitions/DocumentObject"
  2681. },
  2682. "sender": {
  2683. "description": "Details of the sender.",
  2684. "$ref": "#/definitions/SenderObject"
  2685. },
  2686. "receiver": {
  2687. "description": "Details of the receiver.",
  2688. "$ref": "#/definitions/ReceiverObject"
  2689. }
  2690. },
  2691. "description": "Each attempt of sending a customer's payment details to the payment gateway for an invoice or credit note generates a transaction."
  2692. },
  2693. "TransferObject": {
  2694. "type": "object",
  2695. "required": [
  2696. "issuerId",
  2697. "recipientId"
  2698. ],
  2699. "properties": {
  2700. "id": {
  2701. "type": "string",
  2702. "example": "3a3cd0d2-747f-4f70-9011-49f836613844",
  2703. "description": "Auto-generated identifier of the invoice."
  2704. },
  2705. "documentNumber": {
  2706. "type": "string",
  2707. "example": "100000478",
  2708. "description": "Auto-generated numeric identifier of the invoice. This identifier is customer facing and included in all invoicing related communications with the customer."
  2709. },
  2710. "date": {
  2711. "type": "string",
  2712. "example": "2017-02-10",
  2713. "description": "Issue date of the invoice. Supported format is YYYY-MM-DD."
  2714. },
  2715. "dueDate": {
  2716. "type": "string",
  2717. "example": "2017-02-10",
  2718. "description": "Due date of the invoice. Supported format is YYYY-MM-DD."
  2719. },
  2720. "status": {
  2721. "type": "string",
  2722. "example": "processing",
  2723. "description": "Current state of the transfer invoice. Set by the transaction state of invoice which can be automated payments or manual merchant actions. Supported values are:<ul><li><code>paid</code> - Settlement run has completed and payment transfer was successful.<li><code>failed</code> - Settlement run was unsuccessful because transaction to pay transfer invoice failed. </ul>"
  2724. },
  2725. "memo": {
  2726. "type": "string",
  2727. "description": "Memo of the invoice."
  2728. },
  2729. "items": {
  2730. "type": "array",
  2731. "description": "Details of the individual items that are included in the invoice.",
  2732. "items": {
  2733. "$ref": "#/definitions/TransferItemResultObject"
  2734. }
  2735. },
  2736. "amount": {
  2737. "description": "Gross amount due for the invoice.",
  2738. "$ref": "#/definitions/AmountObject"
  2739. },
  2740. "totalTax": {
  2741. "description": "Total tax amount due for the invoice.",
  2742. "$ref": "#/definitions/AmountObject"
  2743. },
  2744. "issuerId": {
  2745. "type": "string",
  2746. "example": "cc012b2d-829d-44e9-bb74-c8d6badfca2c",
  2747. "description": "Identifier of the source merchant."
  2748. },
  2749. "recipientId": {
  2750. "type": "string",
  2751. "example": "95115500-486f-4448-9671-0bc06c72c54f",
  2752. "description": "Identifier of the targeted merchant."
  2753. }
  2754. },
  2755. "description": "A transfer occurs when funds are moved between merchant accounts."
  2756. },
  2757. "UpdateInvoicePaymentMethod": {
  2758. "type": "object",
  2759. "properties": {
  2760. "paymentMethodToken": {
  2761. "type": "string",
  2762. "description": "The payment method token that will replace the invoice's current token."
  2763. },
  2764. "scheduledPaymentDate": {
  2765. "type": "string",
  2766. "example": "2017-02-10",
  2767. "description": "Next scheduled payment date. Only applicable if invoice has been scheduled for payment retry. Supported format is YYYY-MM-DD"
  2768. }
  2769. },
  2770. "description": "Update invoice's payment method command"
  2771. },
  2772. "Optional«List«SetupPayment»»": {
  2773. "type": "object"
  2774. },
  2775. "CreditNoteObject": {
  2776. "type": "object",
  2777. "properties": {
  2778. "id": {
  2779. "type": "string",
  2780. "example": "33644a49-52b1-44cc-b715-6ef9ee14ffec",
  2781. "description": "Auto-generated identifier of the credit note."
  2782. },
  2783. "invoiceId": {
  2784. "type": "string",
  2785. "example": "a65f37df-da06-4a7e-8d4b-8664dd92bf61",
  2786. "description": "The invoice this credit note belongs to."
  2787. },
  2788. "documentNumber": {
  2789. "type": "string",
  2790. "example": "100000479",
  2791. "description": "Auto-generated numeric identifier of the credit note. This identifier is customer facing and included in all invoicing related communications with the customer."
  2792. },
  2793. "date": {
  2794. "type": "string",
  2795. "example": "2017-02-10",
  2796. "description": "Issue date of the credit note."
  2797. },
  2798. "status": {
  2799. "type": "string",
  2800. "example": "processing",
  2801. "description": "Current state of the credit note, automated based on the associated payments or manually by merchant actions. Supported values are:<ul><li><code>paid</code> - Credit note has been paid back to the customer accordingly.<li><code>PROCESSING</code> - Credit note refund transaction is being processed.<li><code>failed</code> - Attempt at refund transaction on credit note failed. This could be because the credit note gateway transaction failed; or because Ezypay won a customer dispute for a chargeback transaction and thus, the credit note is set to failed as funds are reversed back to the merchant.</ul>"
  2802. },
  2803. "items": {
  2804. "type": "array",
  2805. "description": "Credit note items that are part of the credit note.",
  2806. "items": {
  2807. "$ref": "#/definitions/CreditNoteItemObject"
  2808. }
  2809. },
  2810. "amount": {
  2811. "description": "Amount due for the credit note.",
  2812. "$ref": "#/definitions/AmountObject"
  2813. },
  2814. "totalTax": {
  2815. "description": "Total tax amount due for the credit note.",
  2816. "$ref": "#/definitions/AmountObject"
  2817. },
  2818. "reason": {
  2819. "type": "string",
  2820. "description": "The reason of the credit note creation."
  2821. },
  2822. "customerId": {
  2823. "type": "string",
  2824. "example": "05cdadcc-7d55-470f-8b47-34b5d6288ca9",
  2825. "description": "Identifier of the customer the credit note is associated to."
  2826. },
  2827. "paymentMethodToken": {
  2828. "type": "string",
  2829. "example": "2ee6e920-966d-4f0a-9419-d6c6104fa25f",
  2830. "description": "Auto-generated unique identifier of the payment method token for this billing schedule."
  2831. }
  2832. },
  2833. "description": "A credit note is issued by a merchant to its customers to specify the money owned by the merchant to the customer. It also serves as a record for filing tax returns for funds refunded to the customer."
  2834. },
  2835. "SettlementDetailsObject": {
  2836. "type": "object",
  2837. "properties": {
  2838. "number": {
  2839. "type": "string",
  2840. "example": "100009",
  2841. "description": "Auto-generated settlement run batch number."
  2842. },
  2843. "date": {
  2844. "type": "string",
  2845. "example": "2017-01-27",
  2846. "description": "Issue date of the settlement."
  2847. },
  2848. "revenue": {
  2849. "description": "The total revenue amount which includes the base payment collected (tax inclusive) and payment received from distribution split, revenue split, distribution adjustment, error adjustment and reverse charge-back.",
  2850. "$ref": "#/definitions/AmountObject"
  2851. },
  2852. "deduction": {
  2853. "description": "The total deduction amount, which includes payment deductions from refunds, chargeback ,distribution adjustments, failed payments, and Ezypay fees that are charged directly to the merchant.",
  2854. "$ref": "#/definitions/AmountObject"
  2855. },
  2856. "amount": {
  2857. "description": "The settlement amount which is total revenue minus total deduction.",
  2858. "$ref": "#/definitions/AmountObject"
  2859. },
  2860. "settlementBankAccount": {
  2861. "description": "The settlement bank account that belongs to the merchant.",
  2862. "$ref": "#/definitions/MerchantPaymentMethodObject"
  2863. },
  2864. "status": {
  2865. "type": "string",
  2866. "example": "success",
  2867. "description": "Status of the settlement run. Supported values are <code>processing</code> or <code>success</code>."
  2868. },
  2869. "createdOn": {
  2870. "type": "string",
  2871. "example": "2017-02-10",
  2872. "description": "Created date of settlement"
  2873. }
  2874. }
  2875. },
  2876. "PlanSetupPaymentResult": {
  2877. "type": "object",
  2878. "required": [
  2879. "amount"
  2880. ],
  2881. "properties": {
  2882. "amount": {
  2883. "description": "Setup payment amount.",
  2884. "$ref": "#/definitions/AmountObject"
  2885. },
  2886. "tax": {
  2887. "description": "The tax that is applicable to the setup payment, if the amount is taxable.",
  2888. "$ref": "#/definitions/TaxObject"
  2889. },
  2890. "description": {
  2891. "type": "string",
  2892. "example": "Joining Fee",
  2893. "description": "Description. Max of 255 characters."
  2894. },
  2895. "accountingCode": {
  2896. "type": "string",
  2897. "description": "Accounting code is a category to enable merchants to categorise their revenue for finance reconciliation purpose."
  2898. }
  2899. }
  2900. },
  2901. "PagingObject": {
  2902. "type": "object",
  2903. "properties": {
  2904. "data": {
  2905. "type": "array",
  2906. "description": "List of search results returned.",
  2907. "items": {
  2908. "$ref": "#/definitions/NoteObject"
  2909. }
  2910. },
  2911. "paging": {
  2912. "description": "Paging information.",
  2913. "$ref": "#/definitions/Paging"
  2914. }
  2915. }
  2916. },
  2917. "FailedPaymentSettingObject": {
  2918. "type": "object",
  2919. "properties": {
  2920. "autoRebill": {
  2921. "type": "boolean",
  2922. "example": true,
  2923. "description": "Flag on whether to turn on auto rebill when a failed payment has occurred."
  2924. },
  2925. "initialFailedPaymentAction": {
  2926. "type": "string",
  2927. "example": "stop",
  2928. "description": "The initial action to perform when a failed payment has occurred. Allowed values are <code>stop</code>, <code>continue</code>.",
  2929. "enum": [
  2930. "STOP",
  2931. "CONTINUE"
  2932. ]
  2933. },
  2934. "maximumFailedAttempts": {
  2935. "type": "integer",
  2936. "format": "int32",
  2937. "example": 4,
  2938. "description": "The maximum number of attempts to charge before billing is stopped."
  2939. },
  2940. "rebillDays": {
  2941. "type": "integer",
  2942. "format": "int32",
  2943. "example": 3,
  2944. "description": "Number of days before a rebill takes place."
  2945. }
  2946. }
  2947. },
  2948. "PreviewSubscription": {
  2949. "type": "object",
  2950. "required": [
  2951. "customerId",
  2952. "planId"
  2953. ],
  2954. "properties": {
  2955. "customerId": {
  2956. "type": "string",
  2957. "example": "8cc57af5-180a-473d-932c-95897a1af970",
  2958. "description": "Auto-generated identifier of the customer."
  2959. },
  2960. "planId": {
  2961. "type": "string",
  2962. "example": "03426a7f-fa7e-447a-a639-bd00023a67a3",
  2963. "description": "Auto-generated identifier of the plan."
  2964. },
  2965. "markAsPending": {
  2966. "type": "boolean",
  2967. "example": false,
  2968. "description": "Default value is <code>false</code>. If set to <code>true</code>, creates a subscription with a Pending status. A pending subscription will ignore <code>subscriptionStartDate</code> and no schedules will be created.\nThe status can be changed to Active using the Activate Subscription API."
  2969. },
  2970. "startDate": {
  2971. "type": "string",
  2972. "example": "2017-01-01",
  2973. "description": "The preferred start date of the subscription. The subscription start date cannot be back-dated. The default value follows the plan's start date. Supported format is YYYY-MM-DD."
  2974. },
  2975. "name": {
  2976. "type": "string",
  2977. "example": "Orange Plan Fortnightly",
  2978. "description": "The name of the plan to subscribe the customer to. Max of 50 characters."
  2979. },
  2980. "accountingCode": {
  2981. "type": "string",
  2982. "description": "Specify an accounting code to categorise revenue collected from the subscription's payment. Max of 50 characters."
  2983. },
  2984. "amount": {
  2985. "description": "The gross amount charged to the customer, inclusive of tax. Supports decimal values for cents. For example, $24.50 would be 24.50.",
  2986. "$ref": "#/definitions/Amount"
  2987. },
  2988. "tax": {
  2989. "description": "If provided, each invoice generated for this subscription will include a tax rate.",
  2990. "$ref": "#/definitions/Tax"
  2991. },
  2992. "setupPayments": {
  2993. "type": "array",
  2994. "description": "One-time setup payment applied to the subscription.",
  2995. "items": {
  2996. "$ref": "#/definitions/SetupPayment"
  2997. }
  2998. },
  2999. "interval": {
  3000. "type": "string",
  3001. "example": "2",
  3002. "description": "Number to be specified as interval to manipulate billing frequency. For example <code>interval=2</code> and <code>intervalUnit=week</code> would means billing every 2 weeks. If no value is provided, the default value is 1."
  3003. },
  3004. "intervalUnit": {
  3005. "type": "string",
  3006. "example": "week",
  3007. "description": "Specifies frequency of billing. Valid values are <code>day</code>, <code>week</code> or <code>month</code>. If no value is provided, the default value is <code>week</code>. ",
  3008. "enum": [
  3009. "DAY",
  3010. "WEEK",
  3011. "MONTH"
  3012. ]
  3013. },
  3014. "billingStart": {
  3015. "type": "string",
  3016. "example": "immediate",
  3017. "description": "Specifies the default day the billing schedule starts for customers subscribed to the plan. Supported values are:<ul><li><code>immediate</code> - Default value. Subscriptions will start on the same day.<li><code>day_of_week</code> - Subscriptions will start on a specific day as defined in <code>billingStartValue</code>. Only supported if <code>interval</code> = <code>week</code><li><code>day_of_month</code> - Subscriptions will start on specific day in the month as defined in <code>billingStartValue</code>. Only supported if <code>interval</code> = <code>month</code></ul>"
  3018. },
  3019. "billingStartValue": {
  3020. "type": "string",
  3021. "description": "Specifies the value corresponding to <code>billingStart</code>. If using <code>immediate</code>, no value is required and default value is null.<ul><li>If <code>billingStart</code> = <code>day_of_week</code> then supported values are <code>monday</code>, <code>tuesday</code>, <code>wednesday</code>, <code>thursday</code>, <code>friday</code>, <code>saturday</code> or <code>sunday</code>. Default value is <code>monday</code> and the billing schedule will start on the first up-coming Monday<li>If <code>billingStart</code> = <code>day_of_month</code> then supported values are numbers between 1 to 31. Default value is 1 and the billing schedule will start on the upcoming 1st of the month. If the value specified is 29, 30 or 31 and the next month does not have these dates, it will automatically be rounded to the last day of the month.</ul>",
  3022. "readOnly": true
  3023. },
  3024. "billingEnd": {
  3025. "type": "string",
  3026. "example": "ongoing",
  3027. "description": "Specifies the rules to automate when a subscription ends. Supported values are:<ul><li><code>ongoing</code> - Default value. Subscriptions created from this plan will have no end date and continue billing on an ongoing basis (until instructions are given to stop billing).<li><code>amount_collected</code> - Subscriptions will end when a specified amount is collected as defined in <code>billingEndValue</code>.<li><code>billing_cycles</code> - Subscriptions will end after a specified number of billing cycles as defined in <code>billingEndValue</code>.<li><code>end_date</code> - Subscriptions will end on date defined in <code>billingEndValue</code>.</ul>"
  3028. },
  3029. "billingEndValue": {
  3030. "type": "string",
  3031. "description": "Specifies the value corresponding to <code>billingEnd</code>. If using <code>ongoing</code>, no value is required and default value is null.<ul><li>If <code>billingEnd </code> = <code>amount_collected</code> then provide an amount to be collected.</li><li>If <code>billingEnd</code> = <code>billing_cycles</code> then provide a number of billing cycles. If it is a one-off plan, set <code>billingEndValue</code> = 1.</li><li>If <code>billingEnd</code> = <code>end_date</code> then provide a date. Supported format is YYYY-MM-DD.</li></ul>",
  3032. "readOnly": true
  3033. },
  3034. "firstBilling": {
  3035. "type": "string",
  3036. "example": "prorate",
  3037. "description": "Specifies the rules to auto-calculate the billing charges for the first scheduled billing. The default value follows the plan's firstBilling. Supported values are:<ul><li><code>full_amount</code> - The first billing will charge the full amount on the subscription as defined in the plan's amount.</li><li><code>prorate</code> - Prorate will be auto-calculated for the first billing in the subscription for the pro-rated period, with full recurring billing amount starting from the next billing cycle.</li></ul>"
  3038. },
  3039. "firstBillingAmount": {
  3040. "description": "The amount to pay for the subscription's first scheduled billing.",
  3041. "$ref": "#/definitions/Amount"
  3042. },
  3043. "recurringBillingDate": {
  3044. "type": "string",
  3045. "example": "2016-01-06",
  3046. "description": "Allows you to specify the date recurring billing will occur after the first billing cycle. The default value follows the plan's <code>recurringBillingDay</code>. Supported format is YYYY-MM-DD.",
  3047. "readOnly": true
  3048. },
  3049. "metadata": {
  3050. "type": "object",
  3051. "description": "Store additional data about the subscription object using key/value pairs format. Max of 40 characters for key name and 255 characters for key value.",
  3052. "additionalProperties": {
  3053. "type": "object"
  3054. }
  3055. },
  3056. "autoPayment": {
  3057. "type": "boolean",
  3058. "example": false,
  3059. "description": "Specify if auto payment processing occurs for invoices generated from the subscription. Supported value are:<ul><li><code>true</code> = Default value. Invoices generated will automatically proceed to payment processing.</li><li><code>false</code> = Invoices are generated but will not automatically proceed to payment processing.</li></ul>"
  3060. }
  3061. }
  3062. },
  3063. "UpdatePlan": {
  3064. "type": "object",
  3065. "properties": {
  3066. "name": {
  3067. "type": "string",
  3068. "example": "Orange Plan Fortnightly",
  3069. "description": "Plan name. Max of 50 characters."
  3070. },
  3071. "memo": {
  3072. "type": "string",
  3073. "example": "Full access to gym facilities & fortnightly billing.",
  3074. "description": "Brief memo of the plan. Max of 50 characters."
  3075. },
  3076. "amount": {
  3077. "description": "The gross amount charged to the customer, inclusive of tax. Supports decimal values for cents. For example, $24.50 would be 24.50.",
  3078. "$ref": "#/definitions/Amount"
  3079. },
  3080. "status": {
  3081. "type": "string",
  3082. "description": "Current state of the plan. Supported values are:<ul><li><code>active</code> - Customers can subscribe to the plan.</li><li><code>inactive</code> - Customers are unable to subscribe to the plan.</li></ul>",
  3083. "enum": [
  3084. "ACTIVE",
  3085. "INACTIVE"
  3086. ]
  3087. },
  3088. "setupPayments": {
  3089. "description": "Setup payment settings.",
  3090. "$ref": "#/definitions/Optional«List«SetupPayment»»"
  3091. },
  3092. "intervalUnit": {
  3093. "type": "string",
  3094. "example": "week",
  3095. "description": "Specifies frequency of billing. Can be <code>day</code>, <code>week</code> or <code>month</code>. If no value is provided, the default value is <code>week</code>.",
  3096. "enum": [
  3097. "DAY",
  3098. "WEEK",
  3099. "MONTH"
  3100. ]
  3101. },
  3102. "tax": {
  3103. "description": "The tax rate that will be applied to the plan's amount. If left blank, uses the tax rate specified in the Merchant Object by default.",
  3104. "$ref": "#/definitions/Tax"
  3105. },
  3106. "interval": {
  3107. "type": "integer",
  3108. "format": "int32",
  3109. "example": 2,
  3110. "description": "Number to be specified as interval to manipulate billing frequency. For example <code>interval=2</code> and <code>intervalUnit=week</code> would means billing every 2 weeks. If no value is provided, the default value is 1."
  3111. },
  3112. "billingStart": {
  3113. "type": "string",
  3114. "example": "immediate",
  3115. "description": "Specify the rules to auto-calculate default billing start dates for customers subscribed to the plan. Supported values are <code>weekday</code>, <code>day_of_month</code>, and <code>subscription_date</code>. Must be specified with a corresponding billingStartValue. The default value is <code>subscription_date</code>. This means, by default, schedules created from this plan will start on the start date defined in the customer’s subscription. However, if the scheduled start date and today’s date are the same, then the subscription is marked as starting today but schedules are generated the next day. ",
  3116. "enum": [
  3117. "weekday",
  3118. "day_of_month",
  3119. "subscription_date"
  3120. ]
  3121. },
  3122. "billingStartValue": {
  3123. "type": "string",
  3124. "description": "Specify the value corresponding to billingStart to auto-calculate default billing start date for customers subscribed to the plan. No value required if using subscription_date. Default value is null.\n\n<code>weekday</code> - Set a weekday of either monday, tuesday, wednesday, thursday or friday, automatically defaulting the scheduled start date to the specified weekday. For example, billingStart=<code>weekday</code> and billingStartValue=friday would mean the default start date for the schedule would be on a Friday. If the scheduled weekday and the current day are the same, the scheduled start date starts immediately. If the scheduled start date has already passed for that week (e.g. the current day is Saturday), the schedule will start on next week’s Friday.\n\n<code>day_of_month</code> - Set a number between 1 to 31, automatically defaulting the schedule start date to the specified day of the month. For example, billingStart= <code>day_of_month</code> and billingStartValue=15 would mean the default start date for the schedule would be the 15th of the month. If the scheduled start date matches the current date (e.g. the current date is the 15th), the schedule would start immediately. If the scheduled start date has already passed for that month (e.g. the current date is the 25th), the schedule will start on the 15th of the next month.\nIf the value specified is 29, 30 or 31 and the next month doesn't have these dates, it will automatically be rounded to the last day of the month.\n",
  3125. "readOnly": true
  3126. },
  3127. "billingEnd": {
  3128. "type": "string",
  3129. "description": "Specifies the rules to automate when a subscription ends. Supported values are:<ul><li><code>ongoing</code> - Default value. Subscriptions created from this plan will have no end date and continue billing on an ongoing basis (until instructions are given to stop billing).</li><li><code>amount_collected</code> - Subscriptions will end when a specified amount is collected as defined in billingEndValue.</li><li><code>billing_cycles</code> - Subscriptions will end after a specified number of billing cycles as defined in billingEndValue.</li><li><code>end_date</code> - Subscriptions will end on specific date. Specify this date when you create a subscription in <code>billingEndValue</code>.</ul>",
  3130. "enum": [
  3131. "AMOUNT_COLLECTED",
  3132. "BILLING_CYCLES",
  3133. "ONGOING"
  3134. ]
  3135. },
  3136. "billingEndValue": {
  3137. "type": "string",
  3138. "description": "Specifies the value corresponding to billingEnd. If using ongoing, no value is required and default value is null:<ul><li>If <code>billingEnd</code> = <code>amount_collected</code> then provide an amount to be collected.</li><li>If <code>billingEnd</code> = <code>billing_cycles</code> then provide a number of billing cycles. If it is a one-off plan, set <code>billingEndValue</code> = 1.</li></ul>",
  3139. "readOnly": true
  3140. },
  3141. "firstBilling": {
  3142. "type": "string",
  3143. "example": "prorate",
  3144. "description": "Specifies the rules to auto-calculate the billing charges for the first scheduled billing. Supported values are:<ul><li>If <code>full_amount</code> = Default value. The first billing will charge the full amount on the subscription as defined in the plan's amount.</li><li>If <code>prorate </code> = Prorate will be auto-calculated for the first billing in the subscription for the pro-rated period, with full recurring billing amount starting from the next billing cycle.</li></ul>",
  3145. "enum": [
  3146. "FULL_AMOUNT",
  3147. "PRORATE"
  3148. ]
  3149. },
  3150. "recurringBillingDay": {
  3151. "type": "string",
  3152. "example": "friday",
  3153. "description": "Only usable when billingStart is set to immediate. Allows you to specify the day recurring billing will occur after the first billing cycle.<ul><li>If <code>intervalUnit</code> = <code>week</code> then supported values are <code>monday</code>, <code>tuesdays</code>, <code>wednesday</code>, <code>thursday</code>, <code>friday</code>, <code>saturday</code>, or <code>sunday</code>. Default value is <code>monday</code>.</li><li>If <code>intervalUnit</code> = <code>month</code> then supported values are numbers between 1 and 31. Default value is 1. If the value specified is 29, 30 or 31 and the next month does not have these dates, it will automatically be rounded to the last day of the month.</li></ul>",
  3154. "readOnly": true
  3155. },
  3156. "accountingCode": {
  3157. "description": "Specify an accounting code to categorise revenue collected from the plan's subscription payment. Max of 50 characters.",
  3158. "$ref": "#/definitions/Optional«string»"
  3159. }
  3160. }
  3161. },
  3162. "AddressObject": {
  3163. "type": "object",
  3164. "properties": {
  3165. "address1": {
  3166. "type": "string",
  3167. "example": "86, Help Street",
  3168. "description": "First line of address. Max of 100 characters."
  3169. },
  3170. "address2": {
  3171. "type": "string",
  3172. "example": "Chatswood",
  3173. "description": "Second line of address. Max of 100 characters."
  3174. },
  3175. "city": {
  3176. "type": "string",
  3177. "example": "Sydney",
  3178. "description": "Town or city of address. Max of 100 characters. "
  3179. },
  3180. "countryCode": {
  3181. "type": "string",
  3182. "example": "AU",
  3183. "description": "Two letter ISO 3166-1 alpha-2 country code."
  3184. },
  3185. "postalCode": {
  3186. "type": "string",
  3187. "example": "2067",
  3188. "description": "The postal code of the address. Max of 20 characters"
  3189. },
  3190. "state": {
  3191. "type": "string",
  3192. "example": "NSW",
  3193. "description": "The state of the address. Max of 100 characters"
  3194. }
  3195. }
  3196. },
  3197. "PlanObject": {
  3198. "type": "object",
  3199. "properties": {
  3200. "id": {
  3201. "type": "string",
  3202. "example": "03426a7f-fa7e-447a-a639-bd00023a67a3",
  3203. "description": "Auto-generated identifier of the plan."
  3204. },
  3205. "status": {
  3206. "type": "string",
  3207. "example": "active",
  3208. "description": "Current state of the plan. Supported values are:<ul><li><code>active</code> - Customers can subscribe to the plan.<li><code>inactive</code> - Customers are unable to subscribe to the plan.</ul>"
  3209. },
  3210. "name": {
  3211. "type": "string",
  3212. "example": "Orange Plan Fortnightly",
  3213. "description": "Plan name. Max of 50 characters."
  3214. },
  3215. "memo": {
  3216. "type": "string",
  3217. "example": "Full access to gym facilities & fortnightly billing.",
  3218. "description": "Brief memo of the plan."
  3219. },
  3220. "accountingCode": {
  3221. "type": "string",
  3222. "description": "The category for revenue streams for finance reconciliation purposes."
  3223. },
  3224. "amount": {
  3225. "description": "The amount charged for the plan schedule.",
  3226. "$ref": "#/definitions/AmountObject"
  3227. },
  3228. "tax": {
  3229. "description": "The tax that is applicable for the plan.",
  3230. "$ref": "#/definitions/TaxObject"
  3231. },
  3232. "setupPayments": {
  3233. "type": "array",
  3234. "description": "The set up payments",
  3235. "items": {
  3236. "$ref": "#/definitions/PlanSetupPaymentResult"
  3237. }
  3238. },
  3239. "intervalUnit": {
  3240. "type": "string",
  3241. "example": "week",
  3242. "description": "Specifies frequency of billing. Valid values are <code>day</code>, <code>week</code> or <code>month</code>. If no value is provided, the default value is <code>week</code>. ",
  3243. "enum": [
  3244. "DAY",
  3245. "WEEK",
  3246. "MONTH"
  3247. ]
  3248. },
  3249. "interval": {
  3250. "type": "integer",
  3251. "format": "int32",
  3252. "example": 2,
  3253. "description": "Number to be specified as interval to manipulate billing frequency. For example <code>interval=2</code> and <code>intervalUnit=week</code> would means billing every 2 weeks. If no value is provided, the default value is 1."
  3254. },
  3255. "billingStart": {
  3256. "type": "string",
  3257. "example": "immediate",
  3258. "description": "Specifies the default day the billing schedule starts for customers subscribed to the plan. Supported values are:<ul><li><code>immediate</code> - Default value. Subscriptions will start on the same day.<li><code>day_of_week</code> - Subscriptions will start on a specific day as defined in <code>billingStartValue</code>.<li><code>day_of_month</code> - Subscriptions will start on specific day in the month as defined in <code>billingStartValue</code>.</ul>"
  3259. },
  3260. "billingStartValue": {
  3261. "type": "string",
  3262. "description": "Specifies the value corresponding to <code>billingStart</code>. If using <code>immediate</code>, no value is required and default value is null.<ul><li>If <code>billingStart</code> = <code>day_of_week</code> then supported values are <code>monday</code>, <code>tuesday</code>, <code>wednesday</code>, <code>thursday</code>, <code>friday</code>, <code>saturday</code> or <code>sunday</code>. Default value is <code>monday</code> and the billing schedule will start on the first up-coming Monday<li>If <code>billingStart</code> = <code>day_of_month</code> then supported values are numbers between 1 to 31. Default value is 1 and the billing schedule will start on the upcoming 1st of the month. If the value specified is 29, 30 or 31 and the next month does not have these dates, it will automatically be rounded to the last day of the month.</ul>"
  3263. },
  3264. "billingEnd": {
  3265. "type": "string",
  3266. "example": "ongoing",
  3267. "description": "Specifies the rules to automate when a subscription ends. Supported values are:<ul><li><code>ongoing</code> - Default value. Subscriptions created from this plan will have no end date and continue billing on an ongoing basis (until instructions are given to stop billing).<li><code>amount_collected</code> - Subscriptions will end when a specified amount is collected as defined in <code>billingEndValue</code>.<li><code>billing_cycles</code> - Subscriptions will end after a specified number of billing cycles as defined in <code>billingEndValue</code>.<li><code>end_date</code> - Subscriptions will end on specific date. Specify this date when you create a subscription in <code>billingEndValue</code>.</ul>"
  3268. },
  3269. "billingEndValue": {
  3270. "type": "string",
  3271. "description": "Specifies the value corresponding to <code>billingEnd</code>. If using <code>ongoing</code>, no value is required and default value is null.<ul><li>If <code>billingEnd </code> = <code>amount_collected</code> then provide an amount to be collected.</li><li>If <code>billingEnd</code> = <code>billing_cycles</code> then provide a number of billing cycles. If it is a one-off plan, set <code>billingEndValue<code> = 1.</li></ul>"
  3272. },
  3273. "firstBilling": {
  3274. "type": "string",
  3275. "example": "prorate",
  3276. "description": "Specifies the rules to auto-calculate the billing charges for the first scheduled billing. Supported values are:<ul><li><code>full_amount</code> - Default value. The first billing will charge the full amount on the subscription as defined in the plan's <code>amount</code>.</li><li><code>prorate</code> - Prorate will be auto-calculated for the first billing in the subscription for the pro-rated period, with full recurring billing amount starting from the next billing cycle.</li></ul>"
  3277. },
  3278. "recurringBillingDay": {
  3279. "type": "string",
  3280. "example": "friday",
  3281. "description": "Only usable when <code>billingStart</code> is set to <code>immediate</code>. Specifies the day recurring billing will occur after the first billing cycle.<ul><li>If <code>interval</code> = <code>week</code> then supported values are <code>monday</code>, <code>tueday</code>, <code>wednesday</code>, <code>thursday</code>, <code>friday</code>, <code>saturday</code> or <code>sunday</code>. Default value is <code>monday</code>.</li><li>If <code>interval</code> = <code>month</code> then supported values are numbers between 1 and 31. Default value is 1. If the value specified is 29, 30 or 31 and the next month does not have these dates, it will automatically be rounded to the last day of the month.</li></ul>"
  3282. },
  3283. "metadata": {
  3284. "type": "object",
  3285. "description": "Additional data about the plan object using key/value pairs format."
  3286. }
  3287. },
  3288. "description": "A plan serves as a template containing subscription billing details like how much and how often to bill, held against each merchant. Merchants may create an unlimited number of plans, making it really straight forward to offer a variety of different billing cycles, and/or pricing tiers to provide adequate subscription billing choices for all of their products and services."
  3289. },
  3290. "NotificationSettingObject": {
  3291. "type": "object",
  3292. "properties": {
  3293. "pastDueInvoice": {
  3294. "type": "boolean",
  3295. "example": true,
  3296. "description": "Flag to turn on notification for Past due invoice"
  3297. },
  3298. "paymentMethodCreation": {
  3299. "type": "boolean",
  3300. "example": true,
  3301. "description": "Flag to turn on notification for Payment method creation"
  3302. },
  3303. "subscriptionCreation": {
  3304. "type": "boolean",
  3305. "example": true,
  3306. "description": "Flag to turn on notification for Subscription creation"
  3307. }
  3308. }
  3309. },
  3310. "MerchantSettingObject": {
  3311. "type": "object",
  3312. "properties": {
  3313. "id": {
  3314. "type": "string",
  3315. "example": "2ce23869-695d-4f06-b1c8-d667884f1bda",
  3316. "description": "Auto-generated unique identifier of the merchant."
  3317. },
  3318. "acceptedPaymentMethods": {
  3319. "type": "array",
  3320. "example": "[\"visa\",\"mastercard\",\"amex\",\"bank\"]",
  3321. "description": "The list of accepted payment methods supported. Supported values are <code>bank</code>, <code>mastercard</code>, <code>visa</code> and <code>amex</code>.",
  3322. "items": {
  3323. "type": "string"
  3324. }
  3325. },
  3326. "failedPaymentSetting": {
  3327. "description": "The failed payment settings that are applied to a schedule.",
  3328. "$ref": "#/definitions/FailedPaymentSettingObject"
  3329. },
  3330. "tax": {
  3331. "description": "Tax applied to all tax options under the merchant such as within invoices and plans.",
  3332. "$ref": "#/definitions/TaxObject"
  3333. }
  3334. }
  3335. },
  3336. "Paging": {
  3337. "type": "object",
  3338. "properties": {
  3339. "nextUrl": {
  3340. "type": "string",
  3341. "example": "https://api.ezypay.com/v2/billing/customers?limit=10&cursor=10",
  3342. "description": "URL to retrieve the next set of records."
  3343. },
  3344. "nextCursor": {
  3345. "type": "integer",
  3346. "format": "int32",
  3347. "example": 10,
  3348. "description": "Unique identifier indicating the current state in pagination and where to resume the within search results. Using a cursor instead of page numbers avoids returning duplicate records should additional resources be added between pagination calls."
  3349. },
  3350. "limit": {
  3351. "type": "integer",
  3352. "format": "int32",
  3353. "example": 10,
  3354. "description": "Maximum records to return per pagination call. Limit can range between 1 to 100 records."
  3355. },
  3356. "totalCount": {
  3357. "type": "integer",
  3358. "format": "int64",
  3359. "example": 25,
  3360. "description": "Total records that fulfil the search criteria."
  3361. }
  3362. }
  3363. },
  3364. "UpdateMerchantNotificationSetting": {
  3365. "type": "object",
  3366. "properties": {
  3367. "merchantId": {
  3368. "type": "string"
  3369. },
  3370. "customerEmail": {
  3371. "description": "Customer email notification settings",
  3372. "$ref": "#/definitions/Optional«EmailNotificationSettings»"
  3373. }
  3374. }
  3375. },
  3376. "TransferItemResultObject": {
  3377. "type": "object",
  3378. "properties": {
  3379. "id": {
  3380. "type": "string",
  3381. "example": "30d44924-34f0-4580-b691-f3ec0d2c1b7a",
  3382. "description": "Auto-generated identifier of the transfer invoice item."
  3383. },
  3384. "description": {
  3385. "type": "string",
  3386. "description": "Description."
  3387. },
  3388. "type": {
  3389. "type": "string",
  3390. "example": "transfer_payment",
  3391. "description": "The type of the transfer invoice item."
  3392. },
  3393. "amount": {
  3394. "description": "The amount charged for this item.",
  3395. "$ref": "#/definitions/AmountObject"
  3396. },
  3397. "tax": {
  3398. "description": "The tax rate applied to this item.",
  3399. "$ref": "#/definitions/TaxObject"
  3400. }
  3401. }
  3402. },
  3403. "SenderObject": {
  3404. "type": "object",
  3405. "properties": {
  3406. "id": {
  3407. "type": "string",
  3408. "example": "20c492d9-19c4-44ac-ab96-db813e01c0f8",
  3409. "description": "Identifier of the party associated to this transaction."
  3410. },
  3411. "name": {
  3412. "type": "string",
  3413. "example": "The Orange Nation Gym ",
  3414. "description": "Name of the party involved in the transaction."
  3415. },
  3416. "type": {
  3417. "type": "string",
  3418. "example": "merchant",
  3419. "description": "Specifies the type. Supported values are: <code>customer</code>, <code>merchant</code>, and <code>Ezypay</code>."
  3420. }
  3421. }
  3422. },
  3423. "CreateInvoice": {
  3424. "type": "object",
  3425. "required": [
  3426. "customerId",
  3427. "items"
  3428. ],
  3429. "properties": {
  3430. "customerId": {
  3431. "type": "string",
  3432. "example": "05cdadcc-7d55-470f-8b47-34b5d6288ca9",
  3433. "description": "Identifier of the customer the invoice is billed to."
  3434. },
  3435. "paymentMethodToken": {
  3436. "type": "string",
  3437. "example": "d5ac31f8-7989-4ee6-aeeb-87bb764aa760",
  3438. "description": "The payment method token that is generated by the vault."
  3439. },
  3440. "memo": {
  3441. "type": "string",
  3442. "example": "Zumba class reservation",
  3443. "description": "Description of the invoice item. Max of 100 characters."
  3444. },
  3445. "items": {
  3446. "type": "array",
  3447. "description": "Details of the individual items that are included in the invoice.",
  3448. "items": {
  3449. "$ref": "#/definitions/InvoiceItemCommand"
  3450. }
  3451. },
  3452. "autoPayment": {
  3453. "type": "boolean",
  3454. "example": false,
  3455. "description": "Determines if auto payment processing occurs for invoices generated from the subscription. Supported value are:<ul><li><code>true</code> = Default value. Invoices generated will automatically proceed to payment processing.</li><li><code>false</code> = Invoices are generated but will not automatically proceed to payment processing.</li></ul>"
  3456. }
  3457. }
  3458. },
  3459. "FutureInvoicesObject": {
  3460. "type": "object",
  3461. "properties": {
  3462. "data": {
  3463. "type": "array",
  3464. "description": "List of search results returned.",
  3465. "items": {
  3466. "$ref": "#/definitions/FutureInvoiceObject"
  3467. }
  3468. },
  3469. "paging": {
  3470. "description": "Paging information.",
  3471. "$ref": "#/definitions/Paging"
  3472. }
  3473. }
  3474. },
  3475. "InvoicesObject": {
  3476. "type": "object",
  3477. "properties": {
  3478. "data": {
  3479. "type": "array",
  3480. "description": "List of search results returned.",
  3481. "items": {
  3482. "$ref": "#/definitions/InvoiceObject"
  3483. }
  3484. },
  3485. "paging": {
  3486. "description": "Paging information.",
  3487. "$ref": "#/definitions/Paging"
  3488. }
  3489. }
  3490. },
  3491. "PaymentProviderResponseObject": {
  3492. "type": "object",
  3493. "properties": {
  3494. "code": {
  3495. "type": "string",
  3496. "description": "Response code from the payment provider."
  3497. },
  3498. "description": {
  3499. "type": "string",
  3500. "description": "Description of reason from the payment provider."
  3501. }
  3502. }
  3503. },
  3504. "LinkPaymentMethodToken": {
  3505. "type": "object",
  3506. "required": [
  3507. "paymentMethodToken"
  3508. ],
  3509. "properties": {
  3510. "paymentMethodToken": {
  3511. "type": "string",
  3512. "example": "03426a7f-fa7e-447a-a639-bd00023a67a2",
  3513. "description": "Auto-generated unique identifier of the payment method token generated by the Ezypay Vault."
  3514. },
  3515. "primary": {
  3516. "type": "boolean",
  3517. "example": false,
  3518. "description": "Specifies this token as the customer's preferred token for making payments. Supported values are <code>true</code> and <code>false</code>.\nIf the customer has no primary payment method specified, then the new token will become the primary payment method by default. However, if the owner already has a primary payment method, then it will not change unless <code>primary</code> is set to <code>true</code>."
  3519. }
  3520. }
  3521. },
  3522. "ReceiverObject": {
  3523. "type": "object",
  3524. "properties": {
  3525. "id": {
  3526. "type": "string",
  3527. "example": "20c492d9-19c4-44ac-ab96-db813e01c0f8",
  3528. "description": "Identifier of the party associated to this transaction."
  3529. },
  3530. "name": {
  3531. "type": "string",
  3532. "example": "The Orange Nation Gym ",
  3533. "description": "Name of the party involved in the transaction."
  3534. },
  3535. "type": {
  3536. "type": "string",
  3537. "example": "merchant",
  3538. "description": "Specifies the type. Supported values are: <code>customer</code>, <code>merchant</code>, and <code>Ezypay</code>."
  3539. }
  3540. }
  3541. },
  3542. "LineItemObject": {
  3543. "type": "object",
  3544. "properties": {
  3545. "type": {
  3546. "type": "string",
  3547. "example": "subscription_payment",
  3548. "description": "The type of the future invoice item."
  3549. },
  3550. "description": {
  3551. "type": "string",
  3552. "example": "Bi-weekly subscription fee",
  3553. "description": "Description."
  3554. },
  3555. "accountingCode": {
  3556. "type": "string",
  3557. "description": "Category of revenue streams for finance reconciliation purposes. For example, different codes can categorise revenue made from different items."
  3558. },
  3559. "amount": {
  3560. "description": "The amount charged for this item.",
  3561. "$ref": "#/definitions/AmountObject"
  3562. },
  3563. "tax": {
  3564. "description": "The tax rate applied to this item.",
  3565. "$ref": "#/definitions/TaxObject"
  3566. }
  3567. }
  3568. },
  3569. "CreateTransfer": {
  3570. "type": "object",
  3571. "required": [
  3572. "issuerId",
  3573. "items",
  3574. "recipientId"
  3575. ],
  3576. "properties": {
  3577. "issuerId": {
  3578. "type": "string",
  3579. "example": "cc012b2d-829d-44e9-bb74-c8d6badfca2c",
  3580. "description": "Identifier of the merchant who issue invoice."
  3581. },
  3582. "recipientId": {
  3583. "type": "string",
  3584. "example": "95115500-486f-4448-9671-0bc06c72c54f",
  3585. "description": "Identifier of the merchant who receive invoice."
  3586. },
  3587. "memo": {
  3588. "type": "string",
  3589. "example": "This is a transfer invoice",
  3590. "description": "Memo of the invoice."
  3591. },
  3592. "items": {
  3593. "type": "array",
  3594. "items": {
  3595. "$ref": "#/definitions/TransferItemCommand"
  3596. }
  3597. }
  3598. }
  3599. },
  3600. "TaxObject": {
  3601. "type": "object",
  3602. "properties": {
  3603. "rate": {
  3604. "type": "number",
  3605. "example": 10,
  3606. "description": "Rate of the tax that is implemented."
  3607. }
  3608. }
  3609. },
  3610. "GenerateCustomerTaxInvoiceCommand": {
  3611. "type": "object",
  3612. "properties": {
  3613. "documentType": {
  3614. "type": "string",
  3615. "example": "tax_invoice",
  3616. "description": "Specify the type of document generated from the invoice. Supported values are:\ntax_invoice: Generates a customer tax invoice PDF."
  3617. }
  3618. }
  3619. },
  3620. "NoteObject": {
  3621. "type": "object",
  3622. "properties": {
  3623. "id": {
  3624. "type": "string",
  3625. "example": "b5e2bb20-f341-4bc2-9487-443127dc4f7e",
  3626. "description": "Auto-generated unique identifier of the note."
  3627. },
  3628. "message": {
  3629. "type": "string",
  3630. "example": "Recruit your fit squad to join our special in-house fitness programme. Stay Orange!",
  3631. "description": "The note's content message."
  3632. },
  3633. "entity": {
  3634. "type": "string",
  3635. "example": "customer",
  3636. "description": "The entity linked to the note. Supported values are <code>customer</code>, <code>subscription</code>, <code>payment_method</code> and <code>invoice</code>."
  3637. },
  3638. "entityId": {
  3639. "type": "string",
  3640. "example": "05cdadcc-7d55-470f-8b47-34b5d6288ca9",
  3641. "description": "The unique identified of the entity associated with the note."
  3642. },
  3643. "createdOn": {
  3644. "type": "string",
  3645. "example": "2017-02-10T13:02:17.764",
  3646. "description": "Timestamp the note was created."
  3647. }
  3648. },
  3649. "description": "Notes can be entered to track further information in relation to changes and actions performed across a customer, subscription, invoice and more."
  3650. },
  3651. "SubscriptionsObject": {
  3652. "type": "object",
  3653. "properties": {
  3654. "data": {
  3655. "type": "array",
  3656. "description": "List of search results returned.",
  3657. "items": {
  3658. "$ref": "#/definitions/SubscriptionObject"
  3659. }
  3660. },
  3661. "paging": {
  3662. "description": "Paging information.",
  3663. "$ref": "#/definitions/Paging"
  3664. }
  3665. }
  3666. },
  3667. "FutureInvoiceItemCommand": {
  3668. "type": "object",
  3669. "required": [
  3670. "amount"
  3671. ],
  3672. "properties": {
  3673. "type": {
  3674. "type": "string",
  3675. "example": "subscription_payment",
  3676. "description": "Specifies the payment type of the future invoice. Supported values are:<ul><li><code>subscription_payment</code> - Updates the original payment invoice item. If not specified, then the amount will remain unchanged as defined in the original subscription.</li><li><code>addon_payment</code> - Generates an additional payment invoice item in addition to the subscription. If not specified, then any previously created <code>addon_payment</code> invoice items will be removed from the invoice.</li><li><code>setup_payment</code> - Updates the setup payment invoice item. If not specified, then the <code>setup_payment</code> is removed from the invoice. Setup payment changes are only applicable for the first invoice of a subscription.</li></ul>Default to subscription_payment",
  3677. "enum": [
  3678. "subscription_payment",
  3679. "addon_payment",
  3680. "setup_payment"
  3681. ]
  3682. },
  3683. "amount": {
  3684. "description": "Amount of the invoice item.",
  3685. "$ref": "#/definitions/Amount"
  3686. },
  3687. "tax": {
  3688. "description": "The tax rate applied to this invoice item. If left blank, uses the tax rate specified in the merchant settings by default.",
  3689. "$ref": "#/definitions/Tax"
  3690. },
  3691. "description": {
  3692. "type": "string",
  3693. "example": "Bi-weekly subscription fee",
  3694. "description": "The description of the future invoice item."
  3695. },
  3696. "accountingCode": {
  3697. "type": "string",
  3698. "description": "Specify an accounting code to categorise revenue collected from the invoice item. Max of 50 characters."
  3699. }
  3700. }
  3701. },
  3702. "GenerateSettlementFileCommand": {
  3703. "type": "object",
  3704. "required": [
  3705. "documentType"
  3706. ],
  3707. "properties": {
  3708. "documentType": {
  3709. "type": "string",
  3710. "example": "tax_invoice",
  3711. "description": "Specify the type of document generated from the settlement. Supported values are:\ntax_invoice: Generates a settlement tax invoice PDF.\ndetail_report: Generates a full report (in .csv format) on the settlement status of payment collections from customers."
  3712. }
  3713. }
  3714. },
  3715. "FailedPaymentReasonObject": {
  3716. "type": "object",
  3717. "properties": {
  3718. "code": {
  3719. "type": "string",
  3720. "description": "Error code for failed payment."
  3721. },
  3722. "description": {
  3723. "type": "string",
  3724. "description": "Description of reason for failed payment."
  3725. }
  3726. }
  3727. },
  3728. "Optional«string»": {
  3729. "type": "object"
  3730. },
  3731. "AmountObject": {
  3732. "type": "object",
  3733. "properties": {
  3734. "currency": {
  3735. "type": "string",
  3736. "example": "AUD",
  3737. "description": "Three letter ISO 4217 currency code for the amount."
  3738. },
  3739. "value": {
  3740. "type": "number",
  3741. "example": 10,
  3742. "description": "The value of amount."
  3743. }
  3744. }
  3745. },
  3746. "CustomerObject": {
  3747. "type": "object",
  3748. "properties": {
  3749. "id": {
  3750. "type": "string",
  3751. "example": "8cc57af5-180a-473d-932c-95897a1af970",
  3752. "description": "Auto-generated unique identifier of the customer."
  3753. },
  3754. "number": {
  3755. "type": "integer",
  3756. "format": "int64",
  3757. "example": 26216251,
  3758. "description": "Auto-generated numeric identifier of the customer. This identifier is customer facing and is automatically included in all communications to the customer."
  3759. },
  3760. "referenceCode": {
  3761. "type": "string",
  3762. "example": "ME-8827",
  3763. "description": "Reference code that can be defined by you. This can be used to store a code used by your application to identify the customer. Max of 30 characters."
  3764. },
  3765. "firstName": {
  3766. "type": "string",
  3767. "example": "Matt",
  3768. "description": "Customer first name. Max of 50 characters."
  3769. },
  3770. "lastName": {
  3771. "type": "string",
  3772. "example": "Zimmer",
  3773. "description": "Customer last name. Max of 50 characters."
  3774. },
  3775. "email": {
  3776. "type": "string",
  3777. "example": "matt.zimmer78@gmail.com",
  3778. "description": "Customer email. Max of 255 characters."
  3779. },
  3780. "companyName": {
  3781. "type": "string",
  3782. "example": "Ezypay",
  3783. "description": "The company name if the company is registered as a customer. Max of 100 characters"
  3784. },
  3785. "mobilePhone": {
  3786. "type": "string",
  3787. "example": "4126740923",
  3788. "description": "Customer mobile phone number. Max of 50 characters."
  3789. },
  3790. "homePhone": {
  3791. "type": "string",
  3792. "example": "0294101010",
  3793. "description": "Customer home phone number. Max if 50 characters."
  3794. },
  3795. "gender": {
  3796. "type": "string",
  3797. "example": "male",
  3798. "description": "Customer gender. Supported values are <code>male</code> or <code>female</code>."
  3799. },
  3800. "dateOfBirth": {
  3801. "type": "string",
  3802. "example": "1978-06-25",
  3803. "description": "Customer date of birth. Supported format is YYYY-MM-DD."
  3804. },
  3805. "createdOn": {
  3806. "type": "string",
  3807. "example": "2017-01-25",
  3808. "description": "DateTime the customer was created. Supported format is YYYY-MM-DD."
  3809. },
  3810. "address": {
  3811. "description": "Customer addresses. Customers can have multiple addresses.",
  3812. "$ref": "#/definitions/AddressObject"
  3813. },
  3814. "metadata": {
  3815. "type": "object",
  3816. "description": "Additional data about the customer object using key/value pairs format."
  3817. }
  3818. },
  3819. "description": "Customers are profiles containing information about a person billed by Ezypay. "
  3820. },
  3821. "CreateNote": {
  3822. "type": "object",
  3823. "required": [
  3824. "entity",
  3825. "entityId",
  3826. "message"
  3827. ],
  3828. "properties": {
  3829. "message": {
  3830. "type": "string",
  3831. "example": "Recruit your fit squad to join our special in-house fitness programme. Stay Orange!",
  3832. "description": "The note's content message. Max of 255 characters."
  3833. },
  3834. "entity": {
  3835. "type": "string",
  3836. "example": "customer",
  3837. "description": "The object type the note belongs to. Supported values are <code>customer</code>, <code>subscription</code>, <code>payment_method</code>, <code>transaction</code> and <code>invoice</code>."
  3838. },
  3839. "entityId": {
  3840. "type": "string",
  3841. "example": "05cdadcc-7d55-470f-8b47-34b5d6288ca9",
  3842. "description": "The unique identified of the entity associated with the note."
  3843. }
  3844. }
  3845. },
  3846. "UpdateCustomerCommand": {
  3847. "type": "object",
  3848. "required": [
  3849. "email",
  3850. "firstName",
  3851. "lastName"
  3852. ],
  3853. "properties": {
  3854. "email": {
  3855. "type": "string",
  3856. "example": "matt.zimmer78@gmail.com",
  3857. "description": "A valid email address that belongs to the customer. Max of 255 characters."
  3858. },
  3859. "firstName": {
  3860. "type": "string",
  3861. "example": "Matt",
  3862. "description": "Customer's first name. Max of 50 characters."
  3863. },
  3864. "lastName": {
  3865. "type": "string",
  3866. "example": "Zimmer",
  3867. "description": "Customer's last name. Max of 50 characters."
  3868. },
  3869. "gender": {
  3870. "type": "string",
  3871. "example": "male",
  3872. "description": "Customer gender. Supported values are <code>male</code> or <code>female</code>."
  3873. },
  3874. "homePhone": {
  3875. "type": "string",
  3876. "description": "Customer home phone number. Max of 50 characters."
  3877. },
  3878. "mobilePhone": {
  3879. "type": "string",
  3880. "example": "4126740923",
  3881. "description": "Customer mobile phone number. Max of 50 characters."
  3882. },
  3883. "referenceCode": {
  3884. "type": "string",
  3885. "example": "ME-8827",
  3886. "description": "The reference code of the customer. A unique identifier from a third-party software integration. Max of 30 characters."
  3887. },
  3888. "companyName": {
  3889. "type": "string",
  3890. "description": "The company name if the company is registered as a customer. Max of 100 characters."
  3891. },
  3892. "dateOfBirth": {
  3893. "type": "string",
  3894. "example": "1978-06-25",
  3895. "description": "Customer's date of birth. Supported format is YYYY-MM-DD."
  3896. },
  3897. "address": {
  3898. "description": "The customer's address object that holds address details.",
  3899. "$ref": "#/definitions/Address"
  3900. }
  3901. }
  3902. },
  3903. "SettlementObject": {
  3904. "type": "object",
  3905. "properties": {
  3906. "data": {
  3907. "type": "array",
  3908. "description": "List of search results returned.",
  3909. "items": {
  3910. "$ref": "#/definitions/SettlementDetailsObject"
  3911. }
  3912. },
  3913. "paging": {
  3914. "description": "Paging information.",
  3915. "$ref": "#/definitions/Paging"
  3916. }
  3917. }
  3918. },
  3919. "RecordPayment": {
  3920. "type": "object",
  3921. "properties": {
  3922. "paymentMethodType": {
  3923. "type": "string",
  3924. "description": "The external payment method used by the customer to pay for the invoice. Supported values are <code>cash</code>, <code>cheque</code>, <code>card</code>, <code>others</code> and <code>bank_transfer</code>."
  3925. }
  3926. }
  3927. },
  3928. "CardObject": {
  3929. "type": "object",
  3930. "properties": {
  3931. "accountHolderName": {
  3932. "type": "string",
  3933. "description": "The credit/debit card owner's name which is printed on the card. Max length 50 characters."
  3934. },
  3935. "expiryMonth": {
  3936. "type": "string",
  3937. "description": "The credit/debit card expiry month in (MM) format e.g 05"
  3938. },
  3939. "expiryYear": {
  3940. "type": "string",
  3941. "description": "The credit/debit card expiry year in (YY) format e.g 18"
  3942. },
  3943. "first6": {
  3944. "type": "string",
  3945. "description": "The first 6 digits of the credit/debit card number. Full card number is not displayed for security reasons."
  3946. },
  3947. "last4": {
  3948. "type": "string",
  3949. "description": "The last 4 digits of the credit/debit card number. Full card number is not displayed for security reasons."
  3950. },
  3951. "type": {
  3952. "type": "string",
  3953. "description": "The card type of the card token."
  3954. }
  3955. }
  3956. },
  3957. "TransferItemCommand": {
  3958. "type": "object",
  3959. "required": [
  3960. "amount",
  3961. "description"
  3962. ],
  3963. "properties": {
  3964. "description": {
  3965. "type": "string",
  3966. "description": "Description of the invoice item."
  3967. },
  3968. "amount": {
  3969. "description": "Gross amount due for this invoice item, inclusive of tax.",
  3970. "$ref": "#/definitions/Amount"
  3971. },
  3972. "tax": {
  3973. "description": "Tax rate applied to this invoice item. If left blank, uses the tax specified in the Merchant Object by default.",
  3974. "$ref": "#/definitions/Tax"
  3975. },
  3976. "accountingCode": {
  3977. "type": "string",
  3978. "description": "Accounting code."
  3979. }
  3980. }
  3981. },
  3982. "SetupPayment": {
  3983. "type": "object",
  3984. "required": [
  3985. "amount"
  3986. ],
  3987. "properties": {
  3988. "amount": {
  3989. "description": "Setup payment amount.",
  3990. "$ref": "#/definitions/Amount"
  3991. },
  3992. "tax": {
  3993. "description": "The tax that is applicable to the setup payment, if the amount is taxable.",
  3994. "$ref": "#/definitions/Tax"
  3995. },
  3996. "description": {
  3997. "type": "string",
  3998. "example": "Joining Fee",
  3999. "description": "Description. Max of 255 characters."
  4000. },
  4001. "accountingCode": {
  4002. "type": "string",
  4003. "description": "Specify an accounting code to categorise revenue collected from the setup payment. Max of 50 characters."
  4004. }
  4005. }
  4006. },
  4007. "InvoiceItemObject": {
  4008. "type": "object",
  4009. "properties": {
  4010. "id": {
  4011. "type": "string",
  4012. "example": "60b16c85-9de3-45d1-918a-626d52537dbb",
  4013. "description": "Auto-generated identifier of the invoice item."
  4014. },
  4015. "type": {
  4016. "type": "string",
  4017. "example": "on_demand_payment",
  4018. "description": "The type of the invoice item."
  4019. },
  4020. "description": {
  4021. "type": "string",
  4022. "example": "Bi-weekly subscription fee",
  4023. "description": "Description."
  4024. },
  4025. "accountingCode": {
  4026. "type": "string",
  4027. "description": "The category for revenue streams for finance reconciliation purposes. For example, different codes can categorise revenue made from different items."
  4028. },
  4029. "amount": {
  4030. "description": "The amount charged for this item.",
  4031. "$ref": "#/definitions/AmountObject"
  4032. },
  4033. "tax": {
  4034. "description": "The tax rate applied to this item.",
  4035. "$ref": "#/definitions/TaxObject"
  4036. }
  4037. },
  4038. "description": "Invoice items are held against invoices, fully breaking down all the charges that make up an invoice. Invoices can contain multiple invoice items. Each invoice item can be generated based on schedules of a subscription, or created on an ad-hoc basis without a schedule to itemise charges in an invoice and billed accordingly."
  4039. },
  4040. "FutureInvoiceObject": {
  4041. "type": "object",
  4042. "properties": {
  4043. "subscriptionId": {
  4044. "type": "string",
  4045. "example": "03426a7f-fa7e-447a-a639-bd00023a67a2",
  4046. "description": "Auto-generated unique identifier of the subscription."
  4047. },
  4048. "date": {
  4049. "type": "string",
  4050. "example": "2016-01-15",
  4051. "description": "The date that the invoice will be generated."
  4052. },
  4053. "cycleStartDate": {
  4054. "type": "string",
  4055. "example": "2016-01-15",
  4056. "description": "The start date of the cycle."
  4057. },
  4058. "cycleEndDate": {
  4059. "type": "string",
  4060. "example": "2016-01-28",
  4061. "description": "The end date of the cycle."
  4062. },
  4063. "items": {
  4064. "type": "array",
  4065. "description": "List of invoice item result.",
  4066. "items": {
  4067. "$ref": "#/definitions/LineItemObject"
  4068. }
  4069. },
  4070. "amount": {
  4071. "description": "Total amount of all items in the invoice.",
  4072. "$ref": "#/definitions/AmountObject"
  4073. },
  4074. "totalTax": {
  4075. "description": "Total tax of all items in the invoice.",
  4076. "$ref": "#/definitions/AmountObject"
  4077. }
  4078. },
  4079. "description": "Ezypay automatically generates future invoices based on information held in customer subscriptions to provide full clarity on all future billings, while also enabling and easing the process of performing variations to future billings."
  4080. },
  4081. "PlansObject": {
  4082. "type": "object",
  4083. "properties": {
  4084. "data": {
  4085. "type": "array",
  4086. "description": "List of search results returned.",
  4087. "items": {
  4088. "$ref": "#/definitions/PlanObject"
  4089. }
  4090. },
  4091. "paging": {
  4092. "description": "Paging information.",
  4093. "$ref": "#/definitions/Paging"
  4094. }
  4095. }
  4096. },
  4097. "PaymentMethodObject": {
  4098. "type": "object",
  4099. "properties": {
  4100. "paymentMethodToken": {
  4101. "type": "string",
  4102. "example": "d5ac31f8-7989-4ee6-aeeb-87bb764aa760",
  4103. "description": "Auto-generated unique identifier of the payment method token generated by vault."
  4104. },
  4105. "customerId": {
  4106. "type": "string",
  4107. "example": "8302db87-1c09-4503-a885-256b1b6dc475",
  4108. "description": "Auto-generated unique identifier of the customer that the card token is associated to."
  4109. },
  4110. "type": {
  4111. "type": "string",
  4112. "example": "bank",
  4113. "description": "The payment method type of the token."
  4114. },
  4115. "bank": {
  4116. "description": "The bank details of the token.",
  4117. "$ref": "#/definitions/BankObject"
  4118. },
  4119. "card": {
  4120. "description": "The card details of the token.",
  4121. "$ref": "#/definitions/CardObject"
  4122. },
  4123. "primary": {
  4124. "type": "boolean",
  4125. "example": false,
  4126. "description": "Indicate whether the bank account or card is the primary payment method for the customer."
  4127. },
  4128. "valid": {
  4129. "type": "boolean",
  4130. "example": false,
  4131. "description": "Indicate if the bank account or card has become invalid, due to reasons such as bank account closure, expired card or withdrawn debit authority."
  4132. },
  4133. "invalidReason": {
  4134. "description": "The reason a bank account or card is no longer valid for collecting payments from the customer.",
  4135. "$ref": "#/definitions/InvalidReasonResponseObject"
  4136. },
  4137. "lastUsedOn": {
  4138. "type": "string",
  4139. "description": "This payment method was last used on."
  4140. }
  4141. },
  4142. "description": "Payment methods are held against customers, securely encrypted and stored in Ezypay's PCI Compliant Vault. Supported payment methods are bank and credit/debit cards, depending on country and merchant settings."
  4143. },
  4144. "RefundInvoice": {
  4145. "type": "object"
  4146. },
  4147. "Optional«EmailNotificationSettings»": {
  4148. "type": "object"
  4149. },
  4150. "MerchantNotificationResult": {
  4151. "type": "object",
  4152. "properties": {
  4153. "id": {
  4154. "type": "string",
  4155. "example": "2ce23869-695d-4f06-b1c8-d667884f1bda",
  4156. "description": "Auto-generated unique identifier of the merchant."
  4157. },
  4158. "customerEmail": {
  4159. "example": "true",
  4160. "description": "Customer email notification settings",
  4161. "$ref": "#/definitions/NotificationSettingObject"
  4162. }
  4163. }
  4164. },
  4165. "MerchantPaymentMethodObject": {
  4166. "type": "object",
  4167. "properties": {
  4168. "id": {
  4169. "type": "string",
  4170. "example": "c5bf77c5-5b47-4df8-ac9d-ca527bea4828",
  4171. "description": "Auto-generated unique identifier of the merchant that the card token is associated to."
  4172. },
  4173. "paymentMethodToken": {
  4174. "type": "string",
  4175. "example": "25ae40ce-49cf-441a-944b-e7ad36dc7700",
  4176. "description": "Auto-generated unique identifier of the payment method token generated by vault."
  4177. },
  4178. "bank": {
  4179. "description": "The bank details of the token.",
  4180. "$ref": "#/definitions/BankObject"
  4181. }
  4182. },
  4183. "description": "The payment method (bank) that is associated to the merchant. Merchant can be associated with only one bank payment method."
  4184. },
  4185. "Amount": {
  4186. "type": "object",
  4187. "required": [
  4188. "currency",
  4189. "value"
  4190. ],
  4191. "properties": {
  4192. "currency": {
  4193. "type": "string",
  4194. "example": "AUD",
  4195. "description": "ISO 4217 Currency code for the amount."
  4196. },
  4197. "value": {
  4198. "type": "number",
  4199. "example": 10,
  4200. "description": "The value of amount."
  4201. }
  4202. }
  4203. },
  4204. "DocumentObject": {
  4205. "type": "object",
  4206. "properties": {
  4207. "id": {
  4208. "type": "string",
  4209. "example": "20c492d9-19c4-44ac-ab96-db813e01c0f8",
  4210. "description": "Identifier of the document that triggered this transaction."
  4211. },
  4212. "number": {
  4213. "type": "string",
  4214. "example": "100000418",
  4215. "description": "Auto-generated numeric identified of the document that triggered this transaction."
  4216. }
  4217. }
  4218. },
  4219. "PaymentsObject": {
  4220. "type": "object",
  4221. "properties": {
  4222. "data": {
  4223. "type": "array",
  4224. "description": "List of search results returned.",
  4225. "items": {
  4226. "$ref": "#/definitions/TransactionObject"
  4227. }
  4228. },
  4229. "paging": {
  4230. "description": "Paging information.",
  4231. "$ref": "#/definitions/Paging"
  4232. }
  4233. }
  4234. },
  4235. "UpdateFutureInvoiceCommand": {
  4236. "type": "object",
  4237. "required": [
  4238. "cycleStartDate",
  4239. "date",
  4240. "subscriptionId"
  4241. ],
  4242. "properties": {
  4243. "subscriptionId": {
  4244. "type": "string",
  4245. "example": "03426a7f-fa7e-447a-a639-bd00023a67a2",
  4246. "description": "Auto-generated unique identifier of the subscription."
  4247. },
  4248. "cycleStartDate": {
  4249. "type": "string",
  4250. "example": "2016-01-01",
  4251. "description": "The billing cycle start date. Supported format is YYYY-MM-DD."
  4252. },
  4253. "date": {
  4254. "type": "string",
  4255. "example": "2016-01-02",
  4256. "description": "The date the invoice will be issued to the customer. Supported format is YYYY-MM-DD."
  4257. },
  4258. "items": {
  4259. "type": "array",
  4260. "description": "Details of the individual items that are included in the future invoice. Max of 255 characters.",
  4261. "items": {
  4262. "$ref": "#/definitions/FutureInvoiceItemCommand"
  4263. }
  4264. }
  4265. }
  4266. },
  4267. "PaymentMethodsObject": {
  4268. "type": "object",
  4269. "properties": {
  4270. "data": {
  4271. "type": "array",
  4272. "description": "List of search results returned.",
  4273. "items": {
  4274. "$ref": "#/definitions/PaymentMethodObject"
  4275. }
  4276. },
  4277. "paging": {
  4278. "description": "Paging information.",
  4279. "$ref": "#/definitions/Paging"
  4280. }
  4281. }
  4282. },
  4283. "WriteOffPayment": {
  4284. "type": "object"
  4285. },
  4286. "SubscriptionObject": {
  4287. "type": "object",
  4288. "properties": {
  4289. "id": {
  4290. "type": "string",
  4291. "example": "7e98596c-0091-40ec-8def-738243647e8e",
  4292. "description": "Auto-generated identifier of the subscription."
  4293. },
  4294. "customerId": {
  4295. "type": "string",
  4296. "example": "8cc57af5-180a-473d-932c-95897a1af970",
  4297. "description": "Auto-generated unique identifier of the customer that the subscription is associated to."
  4298. },
  4299. "planId": {
  4300. "type": "string",
  4301. "example": "03426a7f-fa7e-447a-a639-bd00023a67a3",
  4302. "description": "Auto-generated identifier of the plan where this subscription was instantiated from."
  4303. },
  4304. "name": {
  4305. "type": "string",
  4306. "example": "Orange Plan Fortnightly",
  4307. "description": "The name of the subscription, which is copied over from the plan's name."
  4308. },
  4309. "status": {
  4310. "type": "string",
  4311. "example": "active",
  4312. "description": "Current state of the subscription. Supported values are:<ul><li><code>pending</code> - The subscription has not yet been activated and has no start date set.</li><li><code>future</code> - The subscription start date is on a future date.</li><li><code>active</code> - The subscription is actively being billed.</li><li><code>past_due</code> The subscription has an invoice with a status that is <code>past_due</code>.</li><li><code>completed</code> - The subscription has ended and reached the end billing requirements as defined in <code>billingEnd</code>.</li><li><code>cancelled </code> - The subscription was cancelled by the merchant, before completing its course.</li></ul>"
  4313. },
  4314. "startDate": {
  4315. "type": "string",
  4316. "example": "2017-01-01",
  4317. "description": "The subscription's start date."
  4318. },
  4319. "endDate": {
  4320. "type": "string",
  4321. "example": "2018-01-01",
  4322. "description": "The subscription's end date."
  4323. },
  4324. "paymentMethodToken": {
  4325. "type": "string",
  4326. "example": "03426a7f-fa7e-447a-a639-bd00023a67a2",
  4327. "description": "Auto-generated unique identifier of the payment method token for this billing schedule."
  4328. },
  4329. "accountingCode": {
  4330. "type": "string",
  4331. "description": "The category for revenue streams for finance reconciliation purposes."
  4332. },
  4333. "amount": {
  4334. "description": "The schedule's amount to be charge for each interval.",
  4335. "$ref": "#/definitions/AmountObject"
  4336. },
  4337. "tax": {
  4338. "description": "If provided, each invoice generated for this subscription will include a tax rate, but the amount charged to the customer will not be increased.",
  4339. "$ref": "#/definitions/TaxObject"
  4340. },
  4341. "nextBillingDate": {
  4342. "type": "string",
  4343. "example": "2017-01-01",
  4344. "description": "The upcoming date where the customer will be charged for this subscription."
  4345. },
  4346. "nextFutureInvoice": {
  4347. "description": "Details of the next upcoming invoice.",
  4348. "$ref": "#/definitions/FutureInvoiceObject"
  4349. },
  4350. "interval": {
  4351. "type": "integer",
  4352. "format": "int32",
  4353. "example": 2,
  4354. "description": "The schedule's intervals."
  4355. },
  4356. "intervalUnit": {
  4357. "type": "string",
  4358. "example": "week",
  4359. "description": "The schedule's interval unit."
  4360. },
  4361. "totalPaid": {
  4362. "description": "Total payment collected for this subscription so far.",
  4363. "$ref": "#/definitions/AmountObject"
  4364. },
  4365. "totalBillingCycles": {
  4366. "type": "integer",
  4367. "format": "int32",
  4368. "example": 0,
  4369. "description": "Total payment cycle processed for this subscription far."
  4370. },
  4371. "remainingToPay": {
  4372. "description": "Total remaining payments to be collected for this subscription, if it is a recurring.",
  4373. "$ref": "#/definitions/AmountObject"
  4374. },
  4375. "remainingBillingCycles": {
  4376. "type": "integer",
  4377. "format": "int32",
  4378. "description": "Total remaining payment cycles to be processed for this subscription."
  4379. },
  4380. "endTargetAmount": {
  4381. "description": "The schedule's total amount to be collected.",
  4382. "$ref": "#/definitions/AmountObject"
  4383. },
  4384. "endTargetBillingCycles": {
  4385. "type": "integer",
  4386. "format": "int32",
  4387. "example": 0,
  4388. "description": "The schedule's total cycles to be collected."
  4389. },
  4390. "cancelledDate": {
  4391. "type": "string",
  4392. "description": "The date that the cancellation will be effective on."
  4393. },
  4394. "metadata": {
  4395. "type": "object",
  4396. "description": "Store additional data about the subscription object using key/value pairs format."
  4397. },
  4398. "createdOn": {
  4399. "type": "string",
  4400. "example": "2017-02-10",
  4401. "description": "Created date of subscription"
  4402. }
  4403. },
  4404. "description": "Subscriptions provides the means for the merchants to collect payments from the customer on a recurring basis."
  4405. },
  4406. "FileResult": {
  4407. "type": "object",
  4408. "properties": {
  4409. "fileId": {
  4410. "type": "string",
  4411. "example": "3a3cd0d2-747f-4f70-9011-49f836613844",
  4412. "description": "Auto-generated identifier of the file."
  4413. },
  4414. "createdOn": {
  4415. "type": "string",
  4416. "example": "2017-05-15T07:16:53.566",
  4417. "description": "Auto-generated date and time of file generation."
  4418. },
  4419. "documentType": {
  4420. "type": "string",
  4421. "example": "tax_invoice",
  4422. "description": "The type of document generated from the settlement. Supported values are:\ntax_invoice: Generates a settlement tax invoice PDF.\ndetail_report: Generates a full report (in .csv format) on the settlement status of payment collections from customers."
  4423. }
  4424. }
  4425. },
  4426. "MerchantObject": {
  4427. "type": "object",
  4428. "properties": {
  4429. "countryCode": {
  4430. "type": "string",
  4431. "example": "AU",
  4432. "description": "Two letter ISO 3166-1 alpha-2 country code."
  4433. },
  4434. "settlementPaymentMethod": {
  4435. "$ref": "#/definitions/MerchantPaymentMethodObject"
  4436. },
  4437. "id": {
  4438. "type": "string",
  4439. "example": "2ce23869-695d-4f06-b1c8-d667884f1bda",
  4440. "description": "Auto-generated unique identifier of the merchant."
  4441. },
  4442. "legalName": {
  4443. "type": "string",
  4444. "example": "Orange Nation Gym Pty Ltd",
  4445. "description": "The merchant's official and legally registered name."
  4446. },
  4447. "name": {
  4448. "type": "string",
  4449. "example": "The Orange Nation Gym",
  4450. "description": "The merchant's trading name that is usually displayed at the business's physical property."
  4451. },
  4452. "number": {
  4453. "type": "string",
  4454. "example": "100000015",
  4455. "description": "Auto-generated numeric identifier of the merchant. This identifier is merchant facing and is usually included in all communications to the merchant."
  4456. },
  4457. "address": {
  4458. "description": "Merchant's address.",
  4459. "$ref": "#/definitions/AddressObject"
  4460. },
  4461. "email": {
  4462. "type": "string",
  4463. "example": "theorangeguy@ezypay.com",
  4464. "description": "The correspondence email of the merchant."
  4465. },
  4466. "phoneNumber": {
  4467. "type": "string",
  4468. "example": "0299998888",
  4469. "description": "<p>The contact number of the merchant. It could be a mobile or landline number. For merchants with an Australia address, the following validation occurs: &bull; Mobile phone - Must start with 04 followed by 8 digits. &bull; Landline - Must start with 02/03/07/08 and followed by 8 digits. For merchants with a New Zealand address, the following validation occurs: &bull; Mobile phone - Must start with 02 followed by 8 digits.</p>"
  4470. },
  4471. "setting": {
  4472. "description": "The setting details of the merchant.",
  4473. "$ref": "#/definitions/MerchantSettingObject"
  4474. },
  4475. "organisationName": {
  4476. "type": "string",
  4477. "example": "Orange Nation",
  4478. "description": "Organisation name belongs to the merchant."
  4479. },
  4480. "settlementSchedule": {
  4481. "description": "The schedule for settlements.",
  4482. "$ref": "#/definitions/SettlementScheduleObject"
  4483. },
  4484. "status": {
  4485. "type": "string",
  4486. "example": "active",
  4487. "description": "The status of the merchant. Supported values are:<ul><li><code>inactive</code> - Merchant has been created but has not been verified by risk checking.</li><li><code>pending_risk_check</code> - Merchant is currently undergoing risk checking.</li><li><code>active</code> - Merchant has successfully passed risk checking and has full access to all functionality.</li></ul>"
  4488. },
  4489. "categoryCode": {
  4490. "type": "string",
  4491. "example": "0123",
  4492. "description": "The merchant category classification code (MCC). A four-digit number assigned to a business by credit card companies when the business first starts accepting one of these cards as a form of payment."
  4493. },
  4494. "businessRegistrationNumber": {
  4495. "type": "string",
  4496. "example": "51824753556",
  4497. "description": "The merchant's official business registration number."
  4498. },
  4499. "taxId": {
  4500. "type": "string",
  4501. "example": "123456782",
  4502. "description": "The merchant's identification used for tax reporting purposes."
  4503. },
  4504. "website": {
  4505. "type": "string",
  4506. "example": "http://theorangegym.ezypay.com",
  4507. "description": "The merchant's website address."
  4508. },
  4509. "description": {
  4510. "type": "string",
  4511. "example": "We are the Orange Gym",
  4512. "description": "Brief additional description of the merchant."
  4513. },
  4514. "liveMode": {
  4515. "type": "boolean",
  4516. "example": true,
  4517. "description": "Specifies if merchant account is live. Supported values are:<ul><li><code>false</code> - Merchant account is in demo mode. Merchants can create plans and subscriptions but no actual billing and payments are processed.</li><li><code>true</code> - Merchant account is in live mode. Switching to live mode will purge all previous date-sensitive data (e.g. subscriptions, invoices will be removed but not plan templates, customer details). Billing cycles will run and start charging customers.</li></ul>"
  4518. },
  4519. "metadata": {
  4520. "type": "object",
  4521. "description": "Description."
  4522. },
  4523. "notifications": {
  4524. "description": "Notification setting of the merchant.",
  4525. "$ref": "#/definitions/MerchantNotificationResult"
  4526. }
  4527. },
  4528. "description": "Merchants are businesses that sign up with the Ezypay platform to manage their subscription, billing or payment needs across their customer base. Merchants may have their own membership/customer management system, and they integrate with Ezypay to help collect payments from the customers on behalf of them. Funds collected are then nett settled back to the merchants on pre-configured dates."
  4529. },
  4530. "InvoiceObject": {
  4531. "type": "object",
  4532. "properties": {
  4533. "id": {
  4534. "type": "string",
  4535. "example": "3a3cd0d2-747f-4f70-9011-49f836613844",
  4536. "description": "Auto-generated identifier of the invoice."
  4537. },
  4538. "documentNumber": {
  4539. "type": "string",
  4540. "example": "100000478",
  4541. "description": "Auto-generated numeric identifier of the invoice. This identifier is customer facing and included in all invoicing related communications with the customer."
  4542. },
  4543. "date": {
  4544. "type": "string",
  4545. "example": "2017-02-10",
  4546. "description": "Issue date of the invoice. Supported format is YYYY-MM-DD."
  4547. },
  4548. "dueDate": {
  4549. "type": "string",
  4550. "example": "2017-02-10",
  4551. "description": "Due date of the invoice. Supported format is YYYY-MM-DD."
  4552. },
  4553. "scheduledPaymentDate": {
  4554. "type": "string",
  4555. "example": "2017-02-10",
  4556. "description": "Scheduled payment date. Supported format is YYYY-MM-DD."
  4557. },
  4558. "status": {
  4559. "type": "string",
  4560. "example": "processing",
  4561. "description": "Current state of the invoice, automated based on the associated payments or manually by merchant actions. Supported values are:<ul><li><code>paid</code> - Paid up through automated collection, manual invoicing, or marked as paid.<li><code>processing</code> - Invoice has payment being processed.<li><code>past_due</code> - Attempt at payment collection on invoice failed.<li><code>refunded</code> - Invoice is refunded.<li><code>partially_refunded</code> - Invoice is partially refunded.<li><code>written_off</code> - Invoice has been written off and no billings will be attempted.</ul>"
  4562. },
  4563. "memo": {
  4564. "type": "string",
  4565. "description": "Memo of the invoice. Max of 100 characters."
  4566. },
  4567. "items": {
  4568. "type": "array",
  4569. "description": "Details of the individual items that are included in the invoice.",
  4570. "items": {
  4571. "$ref": "#/definitions/InvoiceItemObject"
  4572. }
  4573. },
  4574. "amount": {
  4575. "description": "Gross amount due for the invoice.",
  4576. "$ref": "#/definitions/AmountObject"
  4577. },
  4578. "totalRefunded": {
  4579. "description": "Total refunded amount due for the invoice. Should not exceed total amount paid for the invoice.",
  4580. "$ref": "#/definitions/AmountObject"
  4581. },
  4582. "totalTax": {
  4583. "description": "Total tax amount due for the invoice.",
  4584. "$ref": "#/definitions/AmountObject"
  4585. },
  4586. "customerId": {
  4587. "type": "string",
  4588. "example": "05cdadcc-7d55-470f-8b47-34b5d6288ca9",
  4589. "description": "Identifier of the customer the invoice is associated to."
  4590. },
  4591. "subscriptionId": {
  4592. "type": "string",
  4593. "description": "Identifier of the subscription the invoice is associated to."
  4594. },
  4595. "subscriptionName": {
  4596. "type": "string",
  4597. "description": "Name of the subscription the invoice is generated for."
  4598. },
  4599. "paymentMethodToken": {
  4600. "type": "string",
  4601. "example": "6419e34e-46f7-4e52-bb75-3e6541adb955",
  4602. "description": "Auto-generated unique identifier of the payment method token for this billing schedule."
  4603. },
  4604. "createdOn": {
  4605. "type": "string",
  4606. "example": "2017-02-10",
  4607. "description": "Created date of the invoice. Supported format is YYYY-MM-DD."
  4608. }
  4609. },
  4610. "description": "An invoice is issued by merchants to their customers and details out the services or products that were sold to the customer. Ezypay will automatically generate invoices from subscriptions at each billing cycle with a full breakdown of product items and tax, before processing payments based on the invoice payment details."
  4611. },
  4612. "FailedPaymentSetting": {
  4613. "type": "object",
  4614. "required": [
  4615. "initialFailedPaymentAction"
  4616. ],
  4617. "properties": {
  4618. "autoRebill": {
  4619. "type": "boolean",
  4620. "example": true,
  4621. "description": "Flag on whether to turn on auto rebill when a failed payment has occurred."
  4622. },
  4623. "initialFailedPaymentAction": {
  4624. "type": "string",
  4625. "example": "continue",
  4626. "description": "The initial action to perform when a failed payment has occurred. Supported values are <code>stop</code> and <code>continue</code>.",
  4627. "enum": [
  4628. "STOP",
  4629. "CONTINUE"
  4630. ]
  4631. },
  4632. "maximumFailedAttempts": {
  4633. "type": "integer",
  4634. "format": "int32",
  4635. "example": 2,
  4636. "description": "The maximum number of attempts to charge before billing is stopped."
  4637. },
  4638. "rebillDays": {
  4639. "type": "integer",
  4640. "format": "int32",
  4641. "example": 7,
  4642. "description": "Number of days before a rebill takes place. Mandatory if autoRebill is set to True.",
  4643. "readOnly": true
  4644. }
  4645. }
  4646. },
  4647. "UpdateNoteCommand": {
  4648. "type": "object",
  4649. "required": [
  4650. "message"
  4651. ],
  4652. "properties": {
  4653. "message": {
  4654. "type": "string",
  4655. "example": "Join any Zumba class to get special discounts on Orange Fitness Apparel. Stay Orange!",
  4656. "description": "Note's content Message. Max of 255 characters."
  4657. }
  4658. }
  4659. },
  4660. "DeletedEntityObject": {
  4661. "type": "object",
  4662. "properties": {
  4663. "entityId": {
  4664. "type": "string",
  4665. "example": "6a72b162-f5f2-461a-be5f-4cdb3c37b553",
  4666. "description": "Auto-generated unique identifier for the entity."
  4667. },
  4668. "deleted": {
  4669. "type": "boolean",
  4670. "example": true,
  4671. "description": "Indicate if the entity is successfully deleted."
  4672. }
  4673. }
  4674. },
  4675. "RetryPayment": {
  4676. "type": "object",
  4677. "properties": {
  4678. "oneOff": {
  4679. "type": "boolean",
  4680. "example": false,
  4681. "description": "Specify if this payment method token is being used as a one-off payment. Supported values are:<ul><li><code>false</code> - The default value. You do not need to specify the paymentMethodToken in this endpoint.<li><code>true</code> - The paymentMethodToken must be specified in the request body. Used as a one-off payment.</ul>"
  4682. },
  4683. "paymentMethodToken": {
  4684. "type": "string",
  4685. "description": "Specify the payment method token used for this on-demand payment."
  4686. }
  4687. }
  4688. },
  4689. "InvalidReasonResponseObject": {
  4690. "type": "object",
  4691. "properties": {
  4692. "code": {
  4693. "type": "string",
  4694. "description": "The reason a bank account or card is no longer valid for collecting payments from the customer."
  4695. },
  4696. "description": {
  4697. "type": "string",
  4698. "description": "The description of the reason a bank account or card is no longer valid for collecting payments from the customer."
  4699. }
  4700. }
  4701. },
  4702. "CreateCustomer": {
  4703. "type": "object",
  4704. "required": [
  4705. "email",
  4706. "firstName",
  4707. "lastName"
  4708. ],
  4709. "properties": {
  4710. "firstName": {
  4711. "type": "string",
  4712. "example": "Matt",
  4713. "description": "Customer's first name. Max of 50 characters."
  4714. },
  4715. "lastName": {
  4716. "type": "string",
  4717. "example": "Zimmer",
  4718. "description": "Customer's last name. Max of 50 characters."
  4719. },
  4720. "email": {
  4721. "type": "string",
  4722. "example": "matt.zimmer78@gmail.com",
  4723. "description": "A valid unique email address that belongs to customer. Max of 255 characters."
  4724. },
  4725. "gender": {
  4726. "type": "string",
  4727. "description": "Customer gender. Supported values are <code>male</code> or <code>female</code>."
  4728. },
  4729. "address": {
  4730. "description": "The customer's address object that holds address details.",
  4731. "$ref": "#/definitions/Address"
  4732. },
  4733. "homePhone": {
  4734. "type": "string",
  4735. "example": "0294101010",
  4736. "description": "Customer home phone number. Max of 50 characters."
  4737. },
  4738. "mobilePhone": {
  4739. "type": "string",
  4740. "example": "0426740923",
  4741. "description": "Customer mobile phone number. Max of 50 characters."
  4742. },
  4743. "companyName": {
  4744. "type": "string",
  4745. "example": "Ezypay",
  4746. "description": "The company name if the company is registered as a customer. Max of 100 characters."
  4747. },
  4748. "dateOfBirth": {
  4749. "type": "string",
  4750. "example": "1978-06-25",
  4751. "description": "Customer's date of birth. Supported format is YYYY-MM-DD."
  4752. },
  4753. "referenceCode": {
  4754. "type": "string",
  4755. "example": "ME-8827",
  4756. "description": "Reference code that can be defined by you. This can be used to store a code used by your application to identify the customer. Max of 30 characters."
  4757. },
  4758. "metadata": {
  4759. "type": "object",
  4760. "description": "Store additional data about the customer object using key/value pairs format.",
  4761. "additionalProperties": {
  4762. "type": "object"
  4763. }
  4764. }
  4765. }
  4766. },
  4767. "CustomersObject": {
  4768. "type": "object",
  4769. "properties": {
  4770. "data": {
  4771. "type": "array",
  4772. "description": "List of search results returned.",
  4773. "items": {
  4774. "$ref": "#/definitions/CustomerObject"
  4775. }
  4776. },
  4777. "paging": {
  4778. "description": "Paging information.",
  4779. "$ref": "#/definitions/Paging"
  4780. }
  4781. }
  4782. },
  4783. "UpdateMerchantSetting": {
  4784. "type": "object",
  4785. "required": [
  4786. "acceptedPaymentMethods",
  4787. "failedPaymentSetting",
  4788. "tax",
  4789. "timeZone"
  4790. ],
  4791. "properties": {
  4792. "acceptedPaymentMethods": {
  4793. "type": "array",
  4794. "example": "bank",
  4795. "description": "The supported payment method(s) that can be used to bill a customer. Supported values are <code>bank</code>, <code>mastercard</code>, <code>visa</code> and <code>amex</code>.",
  4796. "items": {
  4797. "type": "string"
  4798. }
  4799. },
  4800. "failedPaymentSetting": {
  4801. "description": "Settings to apply if the payment failed.",
  4802. "$ref": "#/definitions/FailedPaymentSetting"
  4803. },
  4804. "tax": {
  4805. "description": "Tax applied to all tax options under the merchant such as within invoices and plans.",
  4806. "$ref": "#/definitions/Tax"
  4807. },
  4808. "timeZone": {
  4809. "type": "string",
  4810. "description": "Timezone that will be applied to bill customers."
  4811. }
  4812. }
  4813. }
  4814. }
  4815. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement