Skip to content

Commit 062a78a

Browse files
Carl Markhamgitbook-bot
Carl Markham
authored andcommitted
GitBook: [master] 10 pages modified
1 parent a9666ba commit 062a78a

File tree

10 files changed

+299
-32
lines changed

10 files changed

+299
-32
lines changed

SUMMARY.md

+2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
## Payments
120120

121121
* [Gateways](payments/gateways/README.md)
122+
* [Configure CyberSource](payments/gateways/configure-cybersource.md)
122123
* [Get all Gateways](payments/gateways/get-all-gateways.md)
123124
* [Get a Gateway](payments/gateways/get-a-gateway.md)
124125
* [Update Gateway Settings](payments/gateways/update-gateway-settings.md)
@@ -136,6 +137,7 @@
136137
* [CardConnect Payments](payments/paying-for-an-order/cardconnect-payments.md)
137138
* [Adyen Payments](payments/paying-for-an-order/adyen-payments.md)
138139
* [Braintree Payments](payments/paying-for-an-order/braintree-payments.md)
140+
* [CyberSource Payments](payments/paying-for-an-order/cybersource-payments.md)
139141
* [Transactions](payments/transactions.md)
140142

141143
## Orders & Customers

advanced/events/observable-events.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ You can pass multiple observable keys to the `observes` field of the [event obje
2323
| | Deleted | `currency.deleted` |
2424
| **File** | Created | `file.created` |
2525
| | Deleted | `file.deleted` |
26-
| **Integration \(events\)** | Created | `integrations.created` |
27-
| | Updated | `integrations.updated` |
28-
| | Deleted | `integrations.deleted` |
26+
| **Integration \(events\)** | Created | `integration.created` |
27+
| | Updated | `integration.updated` |
28+
| | Deleted | `integration.deleted` |
2929
| **Order** | Created | `order.created` |
3030
| | Updated | `order.updated` |
3131
| | Fulfilled | `order.fulfilled` |
@@ -38,7 +38,6 @@ You can pass multiple observable keys to the `observes` field of the [event obje
3838
| | Deleted | `product.deleted` |
3939
| **Settings** | Created | `settings.created` |
4040
| | Updated | `settings.updated` |
41-
| | Deleted | `settings.deleted` |
4241
| **Stock Transaction** | Created | `stock-transaction.created` |
4342
| **Transaction** | Created | `transaction.created` |
4443
| | Updated | `transaction.updated` |

advanced/settings/README.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,15 @@ You can define additional language codes that are enabled for a project \(**max*
3232

3333
## Calculation method
3434

35-
This specifies the [method](https://docs.moltin.com/guides/calculation-methods) used to calculate cart and order totals.
35+
This option defines the method used to calculate cart and order totals. Currently there are two methods: `{simple}` and `{line}`
3636

37-
| **Name** | **Type** | **Default** |
38-
| :--- | :--- | :--- |
39-
| `calculation_method` | `string` | `simple` |
37+
The `{simple}` method is our previous method for calculating cart and order totals which focuses on the total value of the cart. This should only be used in the case where Moltin is not utilised for tax calculations. The `{line}` method treats each line item individually resulting in more accurate figures after taxes and promotions are applied.
38+
39+
| **Name** | **Type** | **Value** | **Default** |
40+
| :--- | :--- | :--- | :--- |
41+
| `calculation_method` | `string` | `simple` ||
42+
| `calculation_method` | `string` | `line` | |
43+
| | | | |
4044

4145
## Readonly settings
4246

basics/moltin-api-changelog.md

+42
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,48 @@
22

33
This changelog is a list of backwards-compatible updates and fixes in the API and [dashboard](https://dashboard.moltin.com/app). These updates are rolled out automatically, but we would still like to keep you informed about the most current state of our API.
44

5+
### 2019, December 12
6+
7+
* **`MAJOR`** Removed deprecated fields on transaction responses
8+
9+
### 2019, November 26
10+
11+
* **`MINOR`** Promotion code response is now paginated
12+
13+
### 2019, November 4
14+
15+
* **`MAJOR`** Flow slugs can no longer be pluralised versions of core entity slugs \(products, orders, etc\)
16+
17+
### 2019, October 28
18+
19+
* **`MINOR`** In some cases, errors to the orders endpoints would return a blank error. This has been resolved
20+
* **`MINOR`** Deleting a relationship on a flow will now set the fields to `null`, not a blank array
21+
22+
### 2019, October 15
23+
24+
* **`MINOR`** Fixed an issue where whitespace in filters would cause a 500 error
25+
* **`MINOR`** Fixed an issue where all flows were returned when using `?include`
26+
27+
### 2019, October 11
28+
29+
* **`MINOR`** Fixed an issue where meta data wasn't being returned when searching for customers
30+
31+
### 2019, October 7
32+
33+
* **`MINOR`** Added the ability to delete a single promotion code via a new endpoint
34+
35+
### 2019, October 4
36+
37+
* **`MINOR`** Added `detail` to error responses that only included `details` in preparation to deprecate `details`
38+
39+
### 2019, October 2
40+
41+
* **`MINOR`** Added Stripe payment gateway to attributes
42+
43+
### 2019, September 30
44+
45+
* **`MINOR`** Fixed an issue where updating a file would sometimes result in a 500 error
46+
547
### 2019, September 13
648

749
* **`MINOR`** Currency is now formatted correctly across all `formatted` properties.

carts-and-checkout/promotions/delete-promotion-codes.md

+51-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,58 @@
11
# Delete Promotion Codes
22

3+
{% api-method method="delete" host="https://api.moltin.com" path="/v2/promotions/:id/codes/:code" %}
4+
{% api-method-summary %}
5+
Delete a promotion code
6+
{% endapi-method-summary %}
7+
8+
{% api-method-description %}
9+
This endpoint allows you to delete a single promotion code
10+
{% endapi-method-description %}
11+
12+
{% api-method-spec %}
13+
{% api-method-request %}
14+
{% api-method-path-parameters %}
15+
{% api-method-parameter name="id" type="string" required=true %}
16+
ID of the promotion associated with the codes
17+
{% endapi-method-parameter %}
18+
{% endapi-method-path-parameters %}
19+
20+
{% api-method-headers %}
21+
{% api-method-parameter name="Authorization" type="string" required=true %}
22+
The bearer token to grant access to the API
23+
{% endapi-method-parameter %}
24+
{% endapi-method-headers %}
25+
{% endapi-method-request %}
26+
27+
{% api-method-response %}
28+
{% api-method-response-example httpCode=204 %}
29+
{% api-method-response-example-description %}
30+
This response indicates your delete request has succeeded
31+
{% endapi-method-response-example-description %}
32+
33+
```
34+
35+
```
36+
{% endapi-method-response-example %}
37+
{% endapi-method-response %}
38+
{% endapi-method-spec %}
39+
{% endapi-method %}
40+
41+
{% tabs %}
42+
{% tab title="cURL" %}
43+
```javascript
44+
curl -X DELETE https://api.moltin.com/v2/promotions/:id/codes/:code \
45+
-H "Authorization: Bearer XXXX" \
46+
-H "Content-Type: application/json"
47+
```
48+
{% endtab %}
49+
{% endtabs %}
50+
51+
52+
353
{% api-method method="delete" host="https://api.moltin.com" path="/v2/promotions/:id/codes" %}
454
{% api-method-summary %}
5-
Delete promotion codes
55+
Delete multiple promotion codes
656
{% endapi-method-summary %}
757

858
{% api-method-description %}
@@ -71,5 +121,3 @@ curl -X DELETE https://api.moltin.com/v2/promotions/:id/codes \
71121
{% endtab %}
72122
{% endtabs %}
73123

74-
75-

carts-and-checkout/promotions/get-promotions.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ The Bearer token to grant access to the API
2424

2525
{% endapi-method-response-example-description %}
2626

27-
{% code-tabs %}
28-
{% code-tabs-item title="cURL" %}
27+
{% code title="cURL" %}
2928
```javascript
3029
{
3130
"data": [
@@ -80,8 +79,7 @@ The Bearer token to grant access to the API
8079
]
8180
}
8281
```
83-
{% endcode-tabs-item %}
84-
{% endcode-tabs %}
82+
{% endcode %}
8583
{% endapi-method-response-example %}
8684
{% endapi-method-response %}
8785
{% endapi-method-spec %}

catalog/product-variations/modifiers/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ There's several types of modifiers, and each has a different effect on a propert
3636

3737
### Seek/set modifier type
3838

39-
Used with `sku` and `slug` builder modifiers, must contain two property-value pairs: `seek`: "xxx" and `set`: "xxxx". Use a placeholder { } so that a variation can replace it with a value you wish to set.
39+
Using the `{SKU}` and `{SLUG}` builder modifiers, you are able to systematically build child products and replace the preconfigured objects with your product variation options. For example, you can set `{COLOR}` and `{SIZE}` modifiers and define these in the master product details.
4040

41-
> For example, use the property-value pairs to specify a color modifier: `seek`: {COLOR}, `set`: {GREEN}.
41+
Let's say we set up a variation modifier of 'RED' for `{COLOR}` and 'MEDIUM' for `{SIZE}`, a SKU of `[BASIC-SHIRT-{SIZE}-{COLOR}]` would become `[BASIC-SHIRT-MEDIUM-RED]`.
4242

43-
* For more details, see section: [Product SKU/Slug Builder Modifiers](https://www.moltin.com/developer/concepts/product-modifiers).
43+
* For more details how to achieve the same results via the API, see article: [Product SKU/Slug Builder Modifiers](https://www.moltin.com/developer/concepts/product-modifiers).
4444

4545
### Price modifiers objects
4646

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
description: >-
3+
You can configure Stripe programatically using the `/gateways/cyber_source`
4+
endpoint.
5+
---
6+
7+
# Configure CyberSource
8+
9+
### The CyberSource gateway object
10+
11+
{% tabs %}
12+
{% tab title="Attributes" %}
13+
| Attribute | Type | Description |
14+
| :--- | :--- | :--- |
15+
| login | `string` | Your live or test CyberSource merchant ID |
16+
| password | `string` | Your live or test CyberSource SOAP key |
17+
| type | `string` | This will always be `gateway` |
18+
| name | `string` | The display name of the gateway |
19+
| slug | `string` | A unique slug for the gateway |
20+
| enabled | `boolean` | `true` or `false` that will enable the gateway |
21+
| test | `boolean` | `true` or `false` that will enable test mode for the gateway |
22+
{% endtab %}
23+
24+
{% tab title="Sample object" %}
25+
```text
26+
{
27+
"data": {
28+
"enabled": true,
29+
"test": true,
30+
"login": "xxx",
31+
"password": "xxx",
32+
"name": "CyberSource",
33+
"slug": "cyber_source",
34+
"type": "gateway"
35+
}
36+
}
37+
```
38+
{% endtab %}
39+
{% endtabs %}
40+
41+
{% api-method method="put" host="https://api.moltin.com" path="/v2/gateways/cyber\_source" %}
42+
{% api-method-summary %}
43+
Update CyberSource settings
44+
{% endapi-method-summary %}
45+
46+
{% api-method-description %}
47+
48+
{% endapi-method-description %}
49+
50+
{% api-method-spec %}
51+
{% api-method-request %}
52+
{% api-method-headers %}
53+
{% api-method-parameter name="Authorization" type="string" required=true %}
54+
The Bearer token to grant access to the API
55+
{% endapi-method-parameter %}
56+
{% endapi-method-headers %}
57+
58+
{% api-method-body-parameters %}
59+
{% api-method-parameter name="enabled" type="boolean" required=false %}
60+
true or false that will enable the gateway
61+
{% endapi-method-parameter %}
62+
63+
{% api-method-parameter name="test" type="boolean" required=false %}
64+
true or false that will enable test mode for the gateway
65+
{% endapi-method-parameter %}
66+
67+
{% api-method-parameter name="login" type="string" required=false %}
68+
Your live or test CyberSource merchant ID
69+
{% endapi-method-parameter %}
70+
71+
{% api-method-parameter name="password" type="string" required=false %}
72+
Your live or test CyberSource SOAP key
73+
{% endapi-method-parameter %}
74+
{% endapi-method-body-parameters %}
75+
{% endapi-method-request %}
76+
77+
{% api-method-response %}
78+
{% api-method-response-example httpCode=200 %}
79+
{% api-method-response-example-description %}
80+
81+
{% endapi-method-response-example-description %}
82+
83+
```
84+
85+
```
86+
{% endapi-method-response-example %}
87+
{% endapi-method-response %}
88+
{% endapi-method-spec %}
89+
{% endapi-method %}
90+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# CyberSource Payments
2+
3+
{% hint style="info" %}
4+
​CyberSource integration supports the `purchase` payment method.
5+
{% endhint %}
6+
7+
{% api-method method="post" host="https://api.moltin.com" path="/v2/orders/:orderId/payments" %}
8+
{% api-method-summary %}
9+
Pay by card
10+
{% endapi-method-summary %}
11+
12+
{% api-method-description %}
13+
14+
{% endapi-method-description %}
15+
16+
{% api-method-spec %}
17+
{% api-method-request %}
18+
{% api-method-path-parameters %}
19+
{% api-method-parameter name="order\_id" type="string" required=true %}
20+
The UUID of the order you want to pay for
21+
{% endapi-method-parameter %}
22+
{% endapi-method-path-parameters %}
23+
24+
{% api-method-headers %}
25+
{% api-method-parameter name="Authorization" type="string" required=true %}
26+
The Bearer token to grant access to the API
27+
{% endapi-method-parameter %}
28+
{% endapi-method-headers %}
29+
30+
{% api-method-body-parameters %}
31+
{% api-method-parameter name="verification\_value" type="string" required=false %}
32+
The CVV/CVC code from the back of the card
33+
{% endapi-method-parameter %}
34+
35+
{% api-method-parameter name="year" type="string" required=false %}
36+
The expiry year of the card
37+
{% endapi-method-parameter %}
38+
39+
{% api-method-parameter name="month" type="string" required=false %}
40+
The expiry month of the card
41+
{% endapi-method-parameter %}
42+
43+
{% api-method-parameter name="number" type="string" required=false %}
44+
The full card number
45+
{% endapi-method-parameter %}
46+
47+
{% api-method-parameter name="last\_name" type="string" required=false %}
48+
The last name of the card owner
49+
{% endapi-method-parameter %}
50+
51+
{% api-method-parameter name="first\_name" type="string" required=false %}
52+
The first name of the card owner
53+
{% endapi-method-parameter %}
54+
55+
{% api-method-parameter name="method" type="string" required=false %}
56+
`purchase`
57+
{% endapi-method-parameter %}
58+
59+
{% api-method-parameter name="gateway" type="string" required=false %}
60+
You will use `cyber_source` in this case
61+
{% endapi-method-parameter %}
62+
{% endapi-method-body-parameters %}
63+
{% endapi-method-request %}
64+
65+
{% api-method-response %}
66+
{% api-method-response-example httpCode=200 %}
67+
{% api-method-response-example-description %}
68+
69+
{% endapi-method-response-example-description %}
70+
71+
```
72+
73+
```
74+
{% endapi-method-response-example %}
75+
{% endapi-method-response %}
76+
{% endapi-method-spec %}
77+
{% endapi-method %}
78+
79+
80+
81+
```text
82+
curl -X POST https://api.moltin.com/v2/orders/:orderId/payments \
83+
-H "Authorization: Bearer XXXX" \
84+
-d $'{
85+
"data": {
86+
"gateway": "cyber_source",
87+
"method": "purchase",
88+
"first_name": "John",
89+
"last_name": "Smith",
90+
"number": "4111111111111111",
91+
"month": "10",
92+
"year": "2020",
93+
"verification_value": "123"
94+
}
95+
}'
96+
```
97+

0 commit comments

Comments
 (0)