Skip to content

Commit

Permalink
Merge pull request #2023 from SwedbankPay/feature/dx-2269_3_1_text_fe…
Browse files Browse the repository at this point in the history
…edbacks_from_kristiansen

DX-2269: Fixed a lot of stuff after Kristiansen feedback
  • Loading branch information
arebra authored Nov 6, 2023
2 parents 29d164d + 249eb02 commit 88acca0
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 26 deletions.
2 changes: 1 addition & 1 deletion _includes/autoclick.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
"userAgent": "Mozilla/5.0...",
"language": "sv-SE",
"autoClick": true,
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "{{implementation}}",
"urls": {
"hostUrls": [ "https://example.com", "https://example.net" ], {% if include.integration_mode=="seamless-view" %}
Expand Down
3 changes: 3 additions & 0 deletions _includes/callback.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ the `paymentOrderId`.
If you have implemented v3.1, the callback will only contain the `paymentOrder`
node.

This response format will only be triggered if you used `version=3.1` in the
original `POST` when you created the `paymentOrder`.

{:.code-view-header}
**Payment Order v3.1 Callback**

Expand Down
2 changes: 1 addition & 1 deletion _includes/checkoutv3-purchase.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
"description": "Test Purchase",
"userAgent": "Mozilla/5.0...",
"language": "sv-SE",
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "{{implementation}}",
"urls": { {% if include.integration_mode=="seamless-view" %}
"hostUrls": [ "https://example.com", "https://example.net" ],
Expand Down
2 changes: 1 addition & 1 deletion _includes/instrument-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
"userAgent": "Mozilla/5.0...",
"language": "sv-SE",
"instrument": "Invoice-PayExFinancingSe", {% if documentation_section contains "checkout-v3" %}
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "{{implementation}}", {% endif %}
"urls":
"hostUrls": [ "https://example.com", "https://example.net" ],
Expand Down
2 changes: 1 addition & 1 deletion _includes/payer-aware-payment-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ CContent-Type: application/json;version=3.1/3.0/2.0 // Version optional for
"userAgent": "Mozilla/5.0...",
"generatePaymentToken": true,
"language": "sv-SE", {% if documentation_section contains "checkout-v3/payments-only" %}
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "PaymentsOnly", {% endif %} {% if documentation_section contains "payment-menu" %}
"instrument": null,{% endif %}
"disableStoredPaymentDetails": false,
Expand Down
24 changes: 20 additions & 4 deletions _includes/payment-order-3-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,18 @@ api-supported-versions: 2.0, 3.0, 3.1
{% endif %}
"instrumentMode": false,
"guestMode": false,
"payer": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/payers"
},
"orderItems": {
"id": "/psp/paymentorders/{{ page.payment_order_id }}/orderitems"
},
"urls": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/urls"
},
"payeeInfo": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/payeeinfo"
},
"payer": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/payers"
},
"history": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/history"
},
Expand All @@ -143,12 +149,18 @@ api-supported-versions: 2.0, 3.0, 3.1
"cancelled": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/cancelled"
},
"reversed": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/reversed"
},
"financialTransactions": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/financialtransactions"
},
"failedAttempts": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/failedattempts"
},
"postPurchaseFailedAttempts": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/failedattempts"
},
"metadata": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/metadata"
}
Expand Down Expand Up @@ -203,15 +215,19 @@ api-supported-versions: 2.0, 3.0, 3.1
| {% f integration %} | `string` | The merchant's Digital Payments integration type. `HostedView` (Seamless View) or `Redirect`. This field will not be populated until the payer has opened the payment UI, and the client script has identified if Swedbank Pay or another URI is hosting the container with the payment iframe. We ask that you don't build logic around this field's response. It is mainly for information purposes. as the integration types might be subject to name changes, If this should happen, updated information will be available in this table. |
| {% f instrumentMode %} | `bool` | Set to `true` or `false`. Indicates if the payment is initialized with Instrument Mode (only one payment instrument available). |
| {% f guestMode %} | `bool` | Set to `true` or `false`. Indicates if the payer chose to pay as a guest or not. When using the Payments Only implementation, this is triggered by not including a `payerReference` in the original `paymentOrder` request. |
| {% f payer %} | `string` | The URL to the [`payer` resource]({{ features_url }}/technical-reference/resource-sub-models#payer) where information about the payer can be retrieved. |
| {% f orderItems %} | `string` | The URL to the `orderItems` resource where information about the order items can be retrieved. |
| {% f urls %} | `string` | The URL to the `urls` resource where all URLs related to the payment order can be retrieved. |
| {% f payeeInfo %} | `string` | {% include fields/payee-info.md %} |
| {% f payer %} | `string` | The URL to the [`payer` resource]({{ features_url }}/technical-reference/resource-sub-models#payer) where information about the payer can be retrieved. |
| {% f history %} | `string` | The URL to the [`history` resource]({{ features_url }}/technical-reference/resource-sub-models#history) where information about the payment's history can be retrieved. |
| {% f failed %} | `string` | The URL to the [`failed` resource]({{ features_url }}/technical-reference/resource-sub-models#failed) where information about the failed transactions can be retrieved. |
| {% f aborted %} | `string` | The URL to the [`aborted` resource]({{ features_url }}/technical-reference/resource-sub-models#aborted) where information about the aborted transactions can be retrieved. |
| {% f paid %} | `string` | The URL to the [`paid` resource]({{ features_url }}/technical-reference/resource-sub-models#paid) where information about the paid transactions can be retrieved. |
| {% f cancelled %} | `string` | The URL to the [`cancelled` resource]({{ features_url }}/technical-reference/resource-sub-models#cancelled) where information about the cancelled transactions can be retrieved. |
| {% f reversed %} | `string` | The URL to the `reversed` resource where information about the reversed transactions can be retrieved. |
| {% f financialTransactions %} | `string` | The URL to the [`financialTransactions` resource]({{ features_url }}/technical-reference/resource-sub-models#financialtransactions) where information about the financial transactions can be retrieved. |
| {% f failedAttempts %} | `string` | The URL to the [`failedAttempts` resource]({{ features_url }}/technical-reference/resource-sub-models#failedattempts) where information about the failed attempts can be retrieved. |
| {% f postpurchaseFailedAttempts %} | `string` | The URL to the `postpurchaseFailedAttempts` resource where information about the failed capture, cancel or reversal attempts can be retrieved. |
| {% f metadata %} | `string` | The URL to the `metadata` resource where information about the metadata can be retrieved. |
| {% f operations %} | `array` | {% include fields/operations.md %} |
{% endcapture %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/payment-order-afd.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
"description": "Test Purchase",
"userAgent": "Mozilla/5.0...",
"language": "sv-SE",
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "{{implementation}}",
"urls": {
"hostUrls": [ "https://example.com", "https://example.net" ], {% if include.integration_mode=="seamless-view" %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/payment-order-checkout-payments-only.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Content-Type: application/json;version=3.0 // Version optional
"userAgent": "Mozilla/5.0...",
"language": "sv-SE",
"instrument": null,
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "PaymentsOnly",
"urls": {
"hostUrls": [ "https://example.com", "https://example.net" ], //Seamless View only
Expand Down
2 changes: 1 addition & 1 deletion _includes/payment-order-moto.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
"description": "Test Purchase",
"userAgent": "Mozilla/5.0...",
"language": "sv-SE",
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "{{implementation}}",
"urls": {
"hostUrls": [ "https://example.com", "https://example.net" ], {% if include.integration_mode=="seamless-view" %}
Expand Down
4 changes: 2 additions & 2 deletions _includes/payment-order-recur.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
"userAgent": "Mozilla/5.0...",
"language": "sv-SE",
"generateRecurrenceToken": true, {% if documentation_section contains "checkout-v3" %}
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "{{implementation}}", {% endif %}
"urls": {
"hostUrls": [ "https://example.com", "https://example.net" ], {% if include.integration_mode=="seamless-view" %}
Expand Down Expand Up @@ -462,7 +462,7 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
"description": "Test Recurrence",
"userAgent": "Mozilla/5.0...",
"language": "nb-NO", {% if documentation_section contains "checkout-v3" %}
"productName": "Checkout3", // Can be excluded if version is added in header {% endif %}
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header {% endif %}
"urls": {
"callbackUrl": "https://example.com/payment-callback"
},
Expand Down
4 changes: 2 additions & 2 deletions _includes/payment-order-unscheduled.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
"userAgent": "Mozilla/5.0...",
"language": "sv-SE",
"generateUnscheduledToken": true, {% if documentation_section contains "checkout-v3" %}
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "{{implementation}}", {% endif %}
"urls": {
"hostUrls": [ "https://example.com", "https://example.net" ],
Expand Down Expand Up @@ -473,7 +473,7 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
"description": "Test Unscheduled Purchase",
"userAgent": "Mozilla/5.0...",
"language": "nb-NO", {% if documentation_section contains "checkout-v3" %}
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "{{implementation}}", {% endif %}
"urls": {
"callbackUrl": "https://example.com/payment-callback"
Expand Down
4 changes: 2 additions & 2 deletions _includes/payout.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Content-Type: application/json
{
"paymentorder": {
"operation": "Verify",
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"currency": "SEK",
"restrictedToPayoutInstruments": true,
"generateUnscheduledToken": true,
Expand Down Expand Up @@ -501,7 +501,7 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
{
"paymentorder": {
"operation": "Payout",
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"currency": "SEK",
"amount": 1500,
"vatAmount": 0,
Expand Down
2 changes: 1 addition & 1 deletion _includes/request-delivery-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
"language": "sv-SE",
"requestDeliveryInfo": true,
"restrictedToDeliveryInfoInstruments": true,
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "{{implementation}}"
"urls": {
"hostUrls": [ "https://example.com", "https://example.net" ], {% if include.integration_mode=="seamless-view" %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/tra.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
"description": "Test Purchase",
"userAgent": "Mozilla/5.0",
"language": "sv-SE", {% if documentation_section contains "checkout-v3" %}
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "{{implementation}}",{% endif %}
"requestTraExemption": true,
"urls": {
Expand Down
2 changes: 1 addition & 1 deletion _includes/verify.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Content-Type: application/json
"description": "Test Verification",
"userAgent": "Mozilla/5.0...",
"language": "nb-NO", {% if documentation_section contains "checkout-v3" %}
"productName": "Checkout3", // Can be excluded if version is added in header
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"implementation": "{{implementation}}", {% endif %} {% unless documentation_section contains "checkout" %}
"generatePaymentToken": true,{% endunless %} {% if documentation_section contains "payment-menu" or documentation_section contains "checkout" %}
"generateUnscheduledToken": true,{% endif %}
Expand Down
7 changes: 3 additions & 4 deletions checkout-v3/payment-presentations.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ Useful information regarding Trustly in our payment menu.
When using a payment menu integration (including Instrument Mode), Trustly will
now be opened in a modal. (This is unlike the Trustly instrument implementation
where it opens inside the same frame). The modal will close once the interaction
at Trustly is finished. `PaymentUrl` is still required in the request, but this
means that you will **not** have to reload the UI any longer.
at Trustly is finished.

### Trustly Express

Expand All @@ -254,8 +253,8 @@ have two recommendations to make the experience as smooth as possible.
* Include the first and last name of the payer in the `payer`
object.

* Add the payer's SSN. If you provide it in the `payerReference` field, the SSN
has to be hashed.
* Add the payer's SSN. If you provide it in the `payerReference` field, the
SSN has to be hashed.

{% include iterator.html prev_href="/checkout-v3/"
prev_title="Back to Introduction" %}
Expand Down
7 changes: 5 additions & 2 deletions checkout-v3/payment-request-3-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ When your customer has initiated a purchase, you need to create a payment order.
Start by performing a `POST` request towards the `paymentorder` resource with
payer information and a `completeUrl`.

The `productName` field has been removed as a mandatory field in v3.1, and you
identify the `paymentOrder` version as v3.1 in the header instead.
The `productName` field has been removed in v3.1, and you identify the
`paymentOrder` version as v3.1 in the header instead.

`POST`, `PATCH`, `GET` and `PUT` requests use this header:

Expand Down Expand Up @@ -52,6 +52,9 @@ You can only use `abort` if the payer **has not** completed an `authorize` or a
`sale`. If the payer is performing an action at a 3rd party, like the MobilePay,
Swish or Vipps apps, `abort` is unavailable.

To avoid unnecessary calls, we recommend doing a `GET` on your `paymentOrder` to
check if `abort` is an available operation before performing it.

{% include alert-risk-indicator.md %}

{% include alert-gdpr-disclaimer.md %}
Expand Down

0 comments on commit 88acca0

Please sign in to comment.