From ea84928459553a2ce006092e8d9a90b424e9772a Mon Sep 17 00:00:00 2001 From: Alexandre ABRIOUX Date: Tue, 26 Oct 2021 09:33:49 +0000 Subject: [PATCH] fix capitalization --- .../3-Portal-API/3-create-an-invoice.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/docs/docs/guides/3-Portal-API/3-create-an-invoice.md b/packages/docs/docs/guides/3-Portal-API/3-create-an-invoice.md index 165f6e1ddd..628990eec2 100644 --- a/packages/docs/docs/guides/3-Portal-API/3-create-an-invoice.md +++ b/packages/docs/docs/guides/3-Portal-API/3-create-an-invoice.md @@ -1,25 +1,25 @@ --- title: Invoice API - Introduction keywords: [ERC20, DAI, Request, Invoice, Portal, API, Request Invoicing] -description: Learn how to use Request's Invoice API. +description: Learn how to use Request's invoice API. --- -## Request vs. Invoice, how do they differ? +## Request vs. Invoice, How Do They Differ? You are now familiar with the [Request API](./1-create-and-share-request.md), -but did you know you could also create, on Portal, Invoices which supersede Requests? +but did you know you could also create, on Portal, invoices which supersede requests? Invoices are simply an implementation of requests with a predefined schema for the `contentData` property. Invoices are mainly used by the [Request Invoicing](https://invoicing.request.network/) application as a way to practically represent general invoicing data. Invoice API also differ by the layer of automation added on top of Request API. -Whenever an Invoice is created, it is possible to have an email sent to the designated payer. -The Invoice issuer (payee) can also get notified as soon as the corresponding request has been paid +Whenever an invoice is created, it is possible to have an email sent to the designated payer. +The invoice issuer (payee) can also get notified as soon as the corresponding request has been paid (please [contact us](https://www.request.finance/contact-us) if you need more info on this feature). Knowing if a Request has been paid [is not trivial](./2-payment-status.md). -But Invoices have an additional property: a `status` +But invoices have an additional property: a `status` ; so knowing if the underlying Request has been paid is as easy as reading this property. Invoices can also be scheduled to create occurrences at regular intervals. @@ -30,14 +30,14 @@ To summarize: | | Request | Invoice | |---------------------|:-------------:|:-------------:| | Portal API endpoint | `/requests` | `/invoices` | -| Schema | `contentData`
not validated by API | Invoices extend Requests
`contentData` schema validated by API | +| Schema | `contentData`
not validated by API | Invoices extend requests
`contentData` schema validated by API | | Automation | ✖️ | ✔ ️ | | Recurrence | ✖️ | ✔ | ## Introduction -In this tutorial we will learn how to use the Invoice API to create off-chain Invoices, -and then transform those Invoices into on-chain Requests. +In this tutorial we will learn how to use the invoice API to create off-chain invoices, +and then transform those invoices into on-chain requests. Please follow the [Portal Introduction](./0-portal-intro.md) to retrieve an API key. Reminder: all HTTP requests must include the following headers: @@ -49,11 +49,11 @@ Reminder: all HTTP requests must include the following headers: The Authorization header is used to authenticate yourself. Please replace `[YOUR_API_KEY]` with the previously retrieved key. -## Create a Request with Invoice API +## Create a Request With Invoice API -### Create an off-chain Invoice +### Create an Off-Chain Invoice -Use the following endpoint first to create an off-chain Invoice that will later be converted to an on-chain Request: +Use the following endpoint first to create an off-chain invoice that will later be converted to an on-chain Request: `POST https://api.request.network/invoices` @@ -134,13 +134,13 @@ In the body part you can use the following example and replace the data accordin In the JSON response you will get an `id` field. Please save it in a variable or in your database. You will need it in the next section. -### Convert the off-chain Invoice into an on-chain Request +### Convert the Off-Chain Invoice Into an On-Chain Request -Use the following endpoint to convert the previously created off-chain Invoice to an on-chain Request: +Use the following endpoint to convert the previously created off-chain invoice to an on-chain Request: `POST https://api.request.network/invoices/[id]` -; and replace `[id]` with the previously saved Invoice ID. +; and replace `[id]` with the previously saved invoice ID. You don't need to pass anything in the request body this time. @@ -148,7 +148,7 @@ In the JSON response you will get a `requestId` field. This is the ID of the newly created Request. Please save it in your database as you will need it to be informed of when the Request has been paid. -### Know when the Request has been paid +### Know When the Request Has Been Paid In order to be informed as to when the payer has fulfilled the Request you need to poll our API regularly. @@ -156,10 +156,10 @@ Please use the following endpoint to retrieve the status of the Request: `GET https://api.request.network/invoices/[id] ` -Replace `[id]` with the ID of the Invoice, or the ID of the Request `requestId`. +Replace `[id]` with the ID of the invoice, or the ID of the Request `requestId`. You can check the `status` field of the -JSON response. The different statuses of an Invoice are the following: +JSON response. The different statuses of an invoice are the following: - `draft` - `pending` - `scheduled`