Skip to content

Commit 0b02243

Browse files
committedJul 8, 2020
Edit documentation
1 parent 32c7f4c commit 0b02243

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed
 

‎recipe.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Integrating a custom payment gateway
2-
Before you get started, make sure you [configured your merchant dashboard](/v3/custom-payment-gateway/merchant-configuration).
2+
Before you get started, make sure you [configured your merchant dashboard](/v3/custom-payment-gateway/merchant-configuration) and have a [basic understanding](/v3/custom-payment-gateway/technical-reference) of how the Custom payment gateway works
33

44
## 1. Creating the checkout page
5-
The first step to integrate a custom payment gateway, is to create the checkout page. This is the page the user will be redirected to when using the custom gateway. We will redirect them to `YOUR_CHECKOUT_URL.com?publicToken=<THE_TOKEN>`.
5+
The first step to integrate a custom payment gateway, is to create the checkout page. This is the page the user will be redirected to when using the custom gateway. When redirecting to this page, we will add the `publicToken` query param.
6+
> ex: `YOUR_CHECKOUT_URL.com?publicToken=<THE_TOKEN>`
67
78
In the checkout page, you will want to retrieve information about the order. To do so, you will need to call our payment-session API endpoint. This will allow you to display order information on the checkout page.
89
Learn how to [retrieve information about the payment session](/v3/custom-payment-gateway/definition#retrieve-a-payment-session).
@@ -14,9 +15,9 @@ This is how our demo checkout page looks. It uses the [Payment Request API](http
1415
## 2. Payment methods endpoint
1516
The second step to integrate a custom payment gateway, is to create the payment methods endpoint. The `publicToken` will be provided in the request body.
1617

17-
__Make sure you [validate](/v3/custom-payment-gateway/definition#validate-public-token) the request was made by our API.__
18+
__Make sure you [validate](/v3/custom-payment-gateway/reference#validate-public-token) the request was made by our API.__
1819

19-
[Payment methods webhook reference](/v3/custom-payment-gateway/definition#payment-methods).
20+
[Payment methods webhook reference](/v3/custom-payment-gateway/reference#payment-methods).
2021
```javascript
2122
async (req, res) => {
2223
if (req.body && req.body.publicToken) {
@@ -46,7 +47,7 @@ async (req, res) => {
4647
## 3. Confirm payment
4748
This endpoint is used to validate the Payment with Snipcart when the payment is approved by your payment gateway. It should be called with the payment information. This has to be done server-side since we don't want to leak our __secret__ API Key.
4849

49-
[Create payment reference](/v3/custom-payment-gateway/definition#create-payment).
50+
[Create payment reference](/v3/custom-payment-gateway/reference#create-payment).
5051
```javascript
5152
async (req, res) => {
5253

@@ -92,9 +93,9 @@ async (req, res) => {
9293
## 4. Refund (Optional)
9394
This will be called when refunding an order via the merchant dashboard.
9495

95-
__Make sure you [validate](/v3/custom-payment-gateway/definition#validate-public-token) the request was made by our API.__
96+
__Make sure you [validate](/v3/custom-payment-gateway/reference#validate-public-token) the request was made by our API.__
9697

97-
[Refund webhook reference](/v3/custom-payment-gateway/definition#refund)
98+
[Refund webhook reference](/v3/custom-payment-gateway/reference#refund)
9899
```javascript
99100
async (req, res) => {
100101
const { transactionId } = req.query

‎technical_definition.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ curl --request POST \
222222
</div>
223223
</div>
224224

225-
# Your webhooks
225+
# Webhooks
226226
Those are the API endpoints you will need to create to integrate your own Payment gateway. Our API will call them with a `publicToken` in the request body.
227227
__Don't forget to validate the request by using the [`/validate`](#get---validate) endpoint__
228228

0 commit comments

Comments
 (0)