Skip to content

Commit 05bf1bd

Browse files
committed
more refinement
1 parent 8c07307 commit 05bf1bd

5 files changed

Lines changed: 60 additions & 60 deletions

File tree

content/docs/apps/guides/dispute-service.mdx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Dispute service apps are integrations that manage the processing of payment disp
1212
<Callout type="info">
1313
Dispute Service Apps are [Server to Server Apps](/docs/apps/guides/server-to-server-apps) that use the Oauth flow to obtain API Access and then use the [Admin APIs](/docs/admin-api) and [Webhooks](/docs/webhooks) to subscribe to store event activity.
1414
</Callout>
15-
### Disputes
15+
## Disputes
1616

1717
Disputes are complaints initiated by the customer against the merchant pertaining to their orders and are categorized into two broad groups by type, Alerts and Chargebacks, see below.
1818

1919
- **Alerts** - disputes that are not yet a chargeback, ie TC40, SAFE, and RDR alerts.
2020
- **Chargeback** - disputes that are registered as a chargeback with the acquiring bank.
2121

22-
### Dispute Flow Overview
22+
## Dispute Flow Overview
2323

2424
Below is a high-level overview of a typical flow for a dispute service app to handle transaction disputes.
2525

@@ -37,17 +37,17 @@ sequenceDiagram
3737
Dispute Service->>Store: Resolve dispute
3838
```
3939

40-
### Dispute Flow Detail
40+
## Dispute Flow Detail
4141

42-
#### Step 1 - New Transaction Created
42+
### Step 1 - New Transaction Created
4343
There are several scenarios that create new payment transactions:
4444
- Order created - nearly all new orders start with a new payment transaction.
4545
- Upsell created - adding an upsell creates a new payment transaction.
4646
- Refund created - refunding a order creates a refund transaction.
4747

4848
Orders typically have many associated transactions for the payments and refunds.
4949

50-
#### Step 2 - `transaction.created` webhook event
50+
### Step 2 - `transaction.created` webhook event
5151
Dispute service apps should subscribe to the `transaction.created` webhook event to be notified of all payment transaction events on a store so that your app is aware of new payments, refunds, and can handle disputes properly.
5252

5353
<Callout type="info" title="Use `parent_id` to associate related transactions">
@@ -61,41 +61,41 @@ Your app can also subscribe to `order.created` and `order.updated` events to rec
6161
Create your webhook after the app is installed using the [webhooksCreate](/docs/admin-api/reference/webhooks/webhooksCreate) Admin API and pass the `transaction.created, order.created, order.updated` to subscribe to these events.
6262

6363

64-
#### Step 3 - Dispute service receives transaction dispute
64+
### Step 3 - Dispute service receives transaction dispute
6565

6666
At this stage, the dispute service is responsible for receiving disputes from their integration partners.
6767

68-
#### Step 4 - Dispute service creates dispute (alert or chargeback) in store
68+
### Step 4 - Dispute service creates dispute (alert or chargeback) in store
6969

7070
When disputes are identified as belonging to a store, the dispute service should create a new dispute using the [disputesCreate](/docs/admin-api/reference/payments/disputesCreate) Admin API.
7171

7272

73-
#### Step 5 - Dispute service matches dispute to transaction
73+
### Step 5 - Dispute service matches dispute to transaction
7474

7575
Disputes created in the store need to be matched to the transaction in the store to associate it with the order/customer. Disputes can be matched by passing the `transaction` parameter when creating or with update using the [disputesUpdate](/docs/admin-api/reference/payments/disputesUpdate) Admin API. See example below in [Match a Dispute](#matching-disputes).
7676

7777

78-
#### Step 6 - Customer is added to block lists
78+
### Step 6 - Customer is added to block lists
7979

8080
Merchants can configure their store to automatically add customers to block lists when any of their transactions have been disputed to mitigate future risk from the customer and associated payment methods. See [Block Lists](https://docs.29next.com/features/payments/block-lists) guide in our user docs.
8181

8282

83-
#### Step 7 - Dispute service creates refund
83+
### Step 7 - Dispute service creates refund
8484

8585
Depending on the type of dispute, the dispute service may need to create a refund using the [transactionsRefundCreate](/docs/admin-api/reference/payments/transactionsRefundCreate) Admin API to resolve the dispute. See [Create a Refund](#creating-disputes) detail below.
8686

8787

88-
#### Step 8 - Cancel Order / Cancel Fulfillment
88+
### Step 8 - Cancel Order / Cancel Fulfillment
8989

9090
If the order is not yet fulfilled, it may be ideal to cancel the order or cancel fulfillment to stop the order from being shipped to the customer. See [Canceling Fulfillment](#canceling-fulfillment) detail below.
9191

9292

93-
#### Step 9 - Dispute service resolves dispute
93+
### Step 9 - Dispute service resolves dispute
9494

9595
Once the dispute is resolved, the dispute service should set the dispute resolution using the [disputesUpdate](/docs/admin-api/reference/payments/disputesUpdate) Admin API. See [Dispute Resolutions](#dispute-resolutions) and [Resolve a Dispute](#resolving-disputes) detail below.
9696

9797

98-
### Creating Disputes
98+
## Creating Disputes
9999

100100
To create a dispute in the store using the [disputesCreate](/docs/admin-api/reference/payments/disputesCreate) Admin API, see example below:
101101

@@ -111,7 +111,7 @@ To create a dispute in the store using the [disputesCreate](/docs/admin-api/refe
111111
}
112112
```
113113

114-
### Matching Disputes
114+
## Matching Disputes
115115

116116
To match a dispute to a transaction, pass the `transaction` id to the [disputesUpdate](/docs/admin-api/reference/payments/disputesUpdate) API. Matching the dispute to the transaction will match the associated order and customer.
117117

@@ -122,7 +122,7 @@ To match a dispute to a transaction, pass the `transaction` id to the [disputesU
122122
}
123123
```
124124

125-
### Creating Refunds
125+
## Creating Refunds
126126

127127
To create a refund for a transaction as part of the dispute resolution process, you can use the [transactionsRefundCreate](/docs/admin-api/reference/payments/transactionsRefundCreate) Admin API.
128128

@@ -133,7 +133,7 @@ To create a refund for a transaction as part of the dispute resolution process,
133133
}
134134
```
135135

136-
### Canceling Fulfillment
136+
## Canceling Fulfillment
137137

138138
It's desirable to cancel fulfillment for orders that have not shipped yet when they are disputed to prevent additional losses for the merchant.
139139

@@ -173,7 +173,7 @@ Fulfillment locations need to accept the cancelation request to confirm they wer
173173
</Tab>
174174
</Tabs>
175175

176-
### RDR Alerts
176+
## RDR Alerts
177177

178178
RDR Alerts are automatically refunded with the gateway, dispute services should log an external refund for the transaction using the [transactionsRefundCreate](/docs/admin-api/reference/payments/transactionsRefundCreate) Admin API.
179179

@@ -188,7 +188,7 @@ Setting `is_external: true` on a refund will create the refund without attemptin
188188
```
189189

190190

191-
### Dispute Resolutions
191+
## Dispute Resolutions
192192

193193
**Alert Resolutions**
194194

@@ -207,7 +207,7 @@ Setting `is_external: true` on a refund will create the refund without attemptin
207207
- `lost` - The chargeback representment process was unsuccessful.
208208

209209

210-
### Resolving Disputes
210+
## Resolving Disputes
211211

212212
To resolve a dispute, update the dispute with the appropriate [resolution](#dispute-resolutions) for the dispute type.
213213

content/docs/apps/guides/fulfillment-service.mdx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Fulfillment service apps are integrations that manage fulfillment of physical pr
1414
<Callout type="info">
1515
View a fully functional [Demo Fulfillment Service App](https://github.com/NextCommerceCo/demo-fulfillment-service-app) to see all of the concepts in action with detailed code examples.
1616
</Callout>
17-
### Fulfillment Flow Overview
17+
## Fulfillment Flow Overview
1818

1919
Below is a high-level overview of the fulfillment flow for fulfillment services to accept and process assigned fulfillment orders.
2020

@@ -30,36 +30,36 @@ sequenceDiagram
3030
Carrier->>Customer: Carrier Delivers Ordered Products to Customer
3131
```
3232

33-
#### Fulfillment Flow Detail
33+
### Fulfillment Flow Detail
3434

35-
#### Step 1 - New Order Created
35+
### Step 1 - New Order Created
3636

3737
All orders start with a customer creating a new order in the Checkout Flow, Admin API, or a recurring Subscription. Orders contain multiple [Fulfillment Orders](#fulfillment-orders), each with the products allocated to the same [Fulfillment Location](#fulfillment-locations) that has the products in stock.
3838

39-
#### Step 2 - Store Creates a Fulfillment Request
39+
### Step 2 - Store Creates a Fulfillment Request
4040

4141
After a delay period (usually several hours), the store will send a fulfillment request to the [Fulfillment Location](#fulfillment-locations) assigned to the order. Fulfillment Requests can be initiated by dashboard users, background processes, or via the Admin API. See [Fulfillment Locations](#fulfillment-locations).
4242

43-
#### Step 3 - Fulfillment Service Retrieves Assigned Fulfillment Orders
43+
### Step 3 - Fulfillment Service Retrieves Assigned Fulfillment Orders
4444

4545
In response to receiving a fulfillment request, the fulfillment service needs to retrieve all of their assigned fulfillment orders from the [Assigned Fulfillment Orders](/docs/admin-api/reference/fulfillment/assignedFulfillmentOrdersList) API endpoint. See [Assigned Fulfillment Orders](#assigned-fulfillment-orders).
4646

47-
#### Step 4 - Fulfillment Service Accepts Fulfillment Request
47+
### Step 4 - Fulfillment Service Accepts Fulfillment Request
4848

4949
For each assigned fulfillment order request in Step 3, the fulfillment service needs to `Accept` or `Reject` the assignment to notify the store the order is expected to be fulfilled or not. See [Accepting Fulfillment Requests](#accepting-fulfillment-requests).
5050

51-
#### Step 5 - Fulfillment Service Processes Fulfillment Order with Carrier
51+
### Step 5 - Fulfillment Service Processes Fulfillment Order with Carrier
5252

5353
Accepted fulfillment orders are processed by the fulfillment service location to prepare shipment to the customer.
5454

55-
#### Step 6 - Fulfillment Service Creates a Fulfillment
55+
### Step 6 - Fulfillment Service Creates a Fulfillment
5656

5757
Once an order has been fulfilled, the fulfillment service creates a fulfillment to upload with shipment carrier tracking information and notify the customer their order has shipped. See [Creating Fulfillments](#creating-fulfillments).
5858

59-
#### Step 7 - Carrier Delivers Ordered Products to Customer
59+
### Step 7 - Carrier Delivers Ordered Products to Customer
6060
The carrier is responsible for delivering the products to the customer in this stage.
6161

62-
### Fulfillment Orders
62+
## Fulfillment Orders
6363

6464
A Fulfillment Order represents items in an order that are to be fulfilled from the same location. A single order often contains multiple fulfillment orders, it's important to keep this in mind for your integration.
6565

@@ -72,13 +72,13 @@ graph
7272
FO2-->P2[Product Y Qty 1 <br> Product Z Qty 2]
7373
```
7474

75-
### Fulfillment Locations
75+
## Fulfillment Locations
7676

7777
Fulfillment Services need to create `Locations` which represent their warehouses where physical products are stored and fulfilled from. Product `stockrecords` must be associated with a location for fulfillment.
7878

7979
When new orders are created, the fulfillment orders are assigned to the locations based on [Fulfillment Routing](https://docs.29next.com/features/fulfillment-guide/location-based-routing). The Location Address is also used for Tax calculation. See the [Locations Create](/docs/admin-api/reference/fulfillment/locationsCreate) endpoint to create a location.
8080

81-
#### Location Callback
81+
### Location Callback
8282
The location `callback` is a URL the store will send `Fulfillment Request` webhooks to notify them of a new fulfillment assigned. Fulfillment Services need to query their [Assigned Fulfillment Orders](#assigned-fulfillment-orders) to retrieve the fulfillment order details.
8383

8484
<Callout type="warn">
@@ -113,7 +113,7 @@ Fulfullment Requests are sent to the location `callback` + `/fulfillment-order-n
113113
<Callout type="idea">
114114
The webhook request has a `X-29Next-Store` header that indicates which store the request is from if you have a global callback url.
115115
</Callout>
116-
### Assigned Fulfillment Orders
116+
## Assigned Fulfillment Orders
117117
The [Assigned Fulfillment Orders](/docs/admin-api/reference/fulfillment/assignedFulfillmentOrdersList) will return a list of all fulfillment orders assigned to your locations. Your app is recommended to call this API in response to receiving a notification to the location callback, and you may also want to poll this endpoint occasionally (ie once per hour) to ensure you've actioned everything requested.
118118

119119
<Callout type="info">
@@ -145,15 +145,15 @@ Requests to the location callback indicate the request `type` that should be pas
145145

146146
For example, to see new fulfillment requests pending acceptance, pass `assignment_status=fulfillment_requested` to the Assigned Fulfillment Orders API, `fulfillment_requested` was passed as `type` to the callback.
147147
</Callout>
148-
### Accepting Fulfillment Requests
148+
## Accepting Fulfillment Requests
149149

150150
To `Accept` a Fulfillment Request assignment, send a POST request to the [Fulfillment Request Accept](/docs/admin-api/reference/fulfillment/fulfillmentRequestAccept) Endpoint. The Fulfillment Order will show as **Accepted** in the dashboard and the Order will transition fulfillment_status to processing.
151151

152152
```json title="Example Fulfillment Accept Request"
153153
POST https://{store}.29next.store/docs/admin-api/fulfillment-orders/{id}/fulfillment-request/accept/
154154
```
155155

156-
### Rejecting Fulfillment Requests
156+
## Rejecting Fulfillment Requests
157157

158158
Your fulfillment service can `Reject` fulfillment order assignments which will prompt the merchant to take action in their store to amend the order. Rejecting fulfillment requests can be for many reasons, such as incorrectly assigned for unavailable products, no stock available, or invalid address. The Fulfillment Service should verify the order details before accepting, by rejecting the fulillment request it will prompt the merchant to correct the order and then send an updated fulfillment request. See possible rejection reasons on in the [Fulfillment Request Reject API docs](/docs/admin-api/reference/fulfillment/fulfillmentRequestReject).
159159

@@ -166,7 +166,7 @@ POST https://{store}.29next.store/docs/admin-api/fulfillment-orders/{id}/fulfill
166166
```
167167

168168

169-
### Cancellation Flow Overview
169+
## Cancellation Flow Overview
170170

171171
It is common for customers to contact merchants after orders have already been sent to fulfillment service partners for processing. Merchants have the ability to "Request Fulfillment Cancellation" which will send a `cancellation_request` to your [Location Callback](#location-callback). Fulfillment Services are expected to respond to these requests.
172172

@@ -178,12 +178,12 @@ sequenceDiagram
178178
Fulfillment Service App->>Store: Accept/Reject Cancellation Requests
179179
```
180180

181-
#### Cancellation Flow Detail
182-
#### Step 1 - Store Creates Cancellation Request
181+
### Cancellation Flow Detail
182+
### Step 1 - Store Creates Cancellation Request
183183

184184
Merchants will trigger a cancellation request which will send a cancellation request to the [Fulfillment Location](#fulfillment-locations) assigned to the order.
185185

186-
#### Step 2 - Fulfillment Service Retrieves Cancellation Requests
186+
### Step 2 - Fulfillment Service Retrieves Cancellation Requests
187187

188188
In response to receiving a cancellation request, the fulfillment service needs to retrieve all of its assigned cancellation requests from the [Assigned Fulfillment Orders](/docs/admin-api/reference/fulfillment/assignedFulfillmentOrdersList) API endpoint.
189189

@@ -192,11 +192,11 @@ In response to receiving a cancellation request, the fulfillment service needs t
192192
GET https://{store}.29next.store/docs/admin-api/assigned-fulfillment-orders/?assignment_status=cancellation_requested
193193
```
194194

195-
#### Step 3 - Fulfillment Service Accepts/Rejects Cancellation Request
195+
### Step 3 - Fulfillment Service Accepts/Rejects Cancellation Request
196196

197197
At this stage, the Fulfillment Service needs to [Accept](#accepting-cancellation-requests) or [Reject](#rejecting-cancellation-requests) the cancellation request to respond to the merchant's request.
198198

199-
### Accepting Cancellation Requests
199+
## Accepting Cancellation Requests
200200

201201
To `accept` the cancellation request, send a request to the [Cancellation Request Accept API](/docs/admin-api/reference/fulfillment/cancellationRequestAccept).
202202

@@ -206,7 +206,7 @@ POST https://{store}.29next.store/docs/admin-api/fulfillment-orders/{id}/cancell
206206
```
207207

208208

209-
### Rejecting Cancellation Requests
209+
## Rejecting Cancellation Requests
210210
If an fulfillment order is too far along in fulfillment processing, fulfillment service partners can reject cancellation requests.
211211

212212
To `reject` a cancellation request, send a request to the [Cancellation Request Reject API](/docs/admin-api/reference/fulfillment/cancellationRequestReject). If you include a message, it will show in the order timeline events for the merchant to see.
@@ -219,7 +219,7 @@ POST https://{store}.29next.store/docs/admin-api/fulfillment-orders/{id}/cancell
219219
}
220220
```
221221

222-
### Creating Fulfillments
222+
## Creating Fulfillments
223223

224224
Once you have tracking information for your the outgoing shipment to the customer, create a Fulfillment for the fulfillment order on the [Fulfillments Create](/docs/admin-api/reference/fulfillment/fulfillmentsCreate) API.
225225

@@ -237,7 +237,7 @@ POST https://{store}.29next.store/docs/admin-api/fulfillment-orders/{id}/fulfill
237237
}
238238
```
239239

240-
### Sync Product Inventory
240+
## Sync Product Inventory
241241

242242
Products have "stock records" which represent the available physical stock at a fulfillment location. Often a single product can be stocked at multiple locations, with [Fulfillment Routing](https://docs.29next.com/features/fulfillment-guide/location-based-routing) governing the order fulfillment location assignment.
243243

@@ -249,7 +249,7 @@ flowchart TD
249249
B-->E("Location 3")
250250
```
251251

252-
#### Retrieve Stock Records by Location
252+
### Retrieve Stock Records by Location
253253

254254
Fulfillment services can retrieve all stock records from a store to map with the SKUs at their warehouse. You can also search and filter by product name or SKU, see Admin API docs for [stockrecordsRetrieve](/docs/admin-api/reference/products/stockrecordsRetrieve).
255255

@@ -260,7 +260,7 @@ GET https://{store}.29next.store/docs/admin-api/stockrecords/?location_id={id}
260260
With the list of stock records assigned to your location, you can now update the `num_in_stock` to reflect the current available units.
261261

262262

263-
#### Update Number of Units In Stock
263+
### Update Number of Units In Stock
264264

265265
Fulfillment services are recommended to update the number in stock (`num_in_stock`) at regular intervals so that the store inventory is update to date and accurate.
266266

@@ -272,7 +272,7 @@ PATCH https://{store}.29next.store/docs/admin-api/stockrecords/{id}/
272272
}
273273
```
274274

275-
### Moving Fulfillment Orders
275+
## Moving Fulfillment Orders
276276

277277

278278
import MoveFulfillmentOrders from '../../../_snippets/_moving-fulfillment-orders.mdx';

content/docs/apps/guides/server-to-server-apps.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Server to Server apps don't need to upload any "code" or files to Next Commerce,
1414
</Callout>
1515
In this guide, we'll show you how to create your first app to get you up and running and familiar with many of the concepts.
1616

17-
### Preparation
17+
## Preparation
1818

1919
1. If you haven't done so already, create your [Next Commerce account](https://accounts.29next.com) and complete your [Partner Registration](https://accounts.29next.com/partners/).
2020

@@ -26,14 +26,14 @@ import DevelopmentStore from '../../../_snippets/_offer-development-store.mdx';
2626
<DevelopmentStore name="Development Store Offer" />
2727

2828

29-
### Create Your App
29+
## Create Your App
3030

3131
1. Inside your Partner Account, navigate to Apps and then Create App. Follow the form to create your first app, don't worry about the App name and details, you can change this later.
3232

3333
2. After creating your App, you'll be able to see your App details. Take note of your `Client ID` and `Client Secret` which are used in the [OAuth flow](/docs/apps/oauth) to retrieve an API Access Token during the [App Install flow](/docs/apps/oauth/getting-started).
3434

3535

36-
### Configure App Oauth
36+
## Configure App Oauth
3737

3838
Server-to-Server apps use follow the [OAuth flow](/docs/apps/oauth) to get and Admin API Access Token, let's add the [Oauth 2.0 <debugger/>](https://oauthdebugger.com/) urls to our app to simulate the install flow.
3939

@@ -42,7 +42,7 @@ Server-to-Server apps use follow the [OAuth flow](/docs/apps/oauth) to get and A
4242
2. Install your app on your store using the **Install Link** tool on your App Overview.
4343

4444

45-
### Test App On Development Store
45+
## Test App On Development Store
4646

4747
1. You can now use [Oauth Debugger](https://oauthdebugger.com/) to simulate the Oauth flow.
4848

0 commit comments

Comments
 (0)