Skip to content

Commit

Permalink
Consistent usage of IDs across the board
Browse files Browse the repository at this point in the history
  • Loading branch information
asbjornu committed Jan 20, 2020
1 parent 9108a24 commit 005dab6
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion checkout/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ sequenceDiagram
Payer ->> Payer: Event: onPaymentCompleted
Payer ->>+ Merchant: Check payment status
deactivate Payer
Merchant ->>+ SwedbankPay: GET /psp/paymentorders/<paymentOrderId>
Merchant ->>+ SwedbankPay: GET <paymentorder.id>
deactivate Merchant
SwedbankPay ->>+ Merchant: rel: paid-paymentorder
deactivate SwedbankPay
Expand Down
6 changes: 3 additions & 3 deletions checkout/other-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ other payment instrument properties, by [expanding the sub-resource][expanding]
**Request**

```http
GET /psp/paymentorders/<paymentorderId>?$expand=currentpayment HTTP/1.1
GET /psp/paymentorders/{{ page.paymentorderId }}?$expand=currentpayment HTTP/1.1
Host: {{ page.apiHost }}
```

Expand Down Expand Up @@ -803,7 +803,7 @@ should finish the purchase with a credit card payment instead.
**Request**
```http
GET /psp/paymentorders<paymentorderId>/payments HTTP/1.1
GET /psp/paymentorders/{{ page.paymentorderId }}/payments HTTP/1.1
Host: {{ page.apiHost }}
Authorization: Bearer <AccessToken>
Content-Type: application/json
Expand All @@ -814,7 +814,7 @@ Content-Type: application/json
"id": "/psp/paymentorders/{{ page.paymentOrderId }}/payments",
"paymentList" : [
{
"id": "/psp/creditcard/payments/{{ page.paymentOrderId }}",
"id": "/psp/creditcard/payments/{{ page.transactionId }}",
"instrument" : "CreditCard",
"created": "2016-09-14T13:21:29.3182115Z"
},
Expand Down
2 changes: 1 addition & 1 deletion checkout/payment-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ rect rgba(138, 205, 195, 0.1)
Payer ->> Payer: Event: onPaymentCompleted
Payer ->>+ Merchant: Check payment status
deactivate Payer
Merchant ->>+ SwedbankPay: GET /psp/paymentorders/<paymentOrderId>
Merchant ->>+ SwedbankPay: GET <paymentorder.id>
deactivate Merchant
SwedbankPay ->>+ Merchant: rel: paid-paymentorder
deactivate SwedbankPay
Expand Down
4 changes: 2 additions & 2 deletions payments/card/after-payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ If you, for any reason, need to delete a paymentToken you use the
**Request**

```http
PATCH /psp/creditcard/payments/instrumentData/<paymentToken> HTTP/1.1
PATCH /psp/creditcard/payments/instrumentData/{{ page.paymentToken }} HTTP/1.1
Host: {{ page.apiHost }}
Authorization: Bearer <AccessToken>
Content-Type: application/json
Expand All @@ -590,7 +590,7 @@ Content-Type: application/json
{
"instrumentData": {
"id": "/psp/creditcard/payments/instrumentdata/{{ page.paymentId }}",
"id": "/psp/creditcard/payments/instrumentdata/{{ page.paymentToken }}",
"paymentToken": "{{ page.paymentToken }}",
"payeeId": "{{ page.merchantId }}",
"isDeleted": true|false,
Expand Down
8 changes: 4 additions & 4 deletions payments/credit/after-payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ To `capture` a `CreditAccountSe` transaction, you need to perform the
**Request**

```http
POST /psp/creditaccount/payments/<paymentId>/captures HTTP/1.1
POST /psp/creditaccount/payments/{{ page.paymentId }}/captures HTTP/1.1
Host: {{ page.apiHost }}
Authorization: Bearer <AccessToken>
Content-Type: application/json
Expand Down Expand Up @@ -71,11 +71,11 @@ HTTP/1.1 200 OK
Content-Type: application/json
{
"payment": "/psp/creditaccount/payments/<paymentId>",
"payment": "/psp/creditaccount/payments/{{ page.paymentId }}",
"captures": [
{
"transaction": {
"id": "/psp/creditaccount/payments/<paymentId>/transactions/<transactionId>",
"id": "/psp/creditaccount/payments/{{ page.paymentId }}/transactions/{{ page.transactionId }}",
"created": "2016-09-14T01:01:01.01Z",
"updated": "2016-09-14T01:01:01.03Z",
"type": "Capture",
Expand All @@ -90,7 +90,7 @@ Content-Type: application/json
"failedErrorCode": "ThirdPartyErrorCode",
"failedErrorDescription": "ThirdPartyErrorMessage",
"isOperational": true,
"activities": { "id": "/psp/creditaccount/payments/<paymentId>/transactions/<transactionId>/activities" },
"activities": { "id": "/psp/creditaccount/payments/{{ page.paymentId }}/transactions/{{ page.transactionId }}/activities" },
"operations": [
]
}
Expand Down
14 changes: 7 additions & 7 deletions payments/credit/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ sequenceDiagram
Payer ->> ecomUI: Access paymentpage
activate ecomUI
ecomUI ->> ecomAPI: GET </psp/creditaccount/payments/> (PaymentId retrieved from token)
ecomUI ->> ecomAPI: GET <payment.id>
activate ecomAPI
ecomAPI -->> ecomUI: Payment response
deactivate ecomAPI
Payer -->> ecomUI: Payer enter SSN and ZIP
ecomUI ->> ecomAPI: PATCH </psp/creditaccount/payments/<paymentId>/> (Operation: ConsumerData)
ecomUI ->> ecomAPI: PATCH <payment.id> (Operation: ConsumerData)
activate ecomAPI
ecomAPI ->> PxR: GetAddressbyPaymentMethod
activate PxR
Expand All @@ -62,7 +62,7 @@ sequenceDiagram
Payer ->> ecomUI: Payer approves address info
ecomUI ->> ecomAPI: POST </psp/creditaccount/payments/<paymentId>/authorizations>
ecomUI ->> ecomAPI: POST <rel:create-authorization>
activate ecomAPI
ecomAPI ->> PxR: PurchaseCreditAccountOrder
activate PxR
Expand Down Expand Up @@ -102,7 +102,7 @@ sequenceDiagram
Payer ->> Merchant: CompleteURL
activate Merchant
Merchant ->> ecomAPI: GET </psp/creditaccount/payments/<paymentId>/>
Merchant ->> ecomAPI: GET <payment.id/>
activate ecomAPI
ecomAPI -->> Merchant: payment resource
deactivate ecomAPI
Expand Down Expand Up @@ -139,7 +139,7 @@ sequenceDiagram
Payer ->> ecomUI: Payer enter SSN and ZIP
ecomUI ->> ecomAPI: PATCH </psp/creditaccount/payments/<paymentId>/> (Operation: ConsumerData)
ecomUI ->> ecomAPI: PATCH <payment.id> (Operation: ConsumerData)
activate ecomAPI
ecomAPI ->> PxR: GetAddressbyPaymentMethod
activate PxR
Expand All @@ -150,7 +150,7 @@ sequenceDiagram
Payer ->> ecomUI: Payer approves address info
ecomUI ->> ecomAPI: POST </psp/creditaccount/payments/<paymentId>/authorizations>
ecomUI ->> ecomAPI: POST <rel:create-authorization>
activate ecomAPI
ecomAPI ->> PxR: PurchaseCreditAccountOrder
activate PxR
Expand All @@ -163,7 +163,7 @@ sequenceDiagram
Payer ->> Merchant: CompleteURL
activate Merchant
Merchant ->> ecomAPI: GET </psp/creditaccount/payments/<paymentId>>
Merchant ->> ecomAPI: GET <payment.id>
activate ecomAPI
ecomAPI -->> Merchant: Payment resource
deactivate ecomAPI
Expand Down
6 changes: 3 additions & 3 deletions payments/credit/redirect.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ sequenceDiagram
Consumer->>-Merchant: access merchant page
activate Merchant
note left of Merchant: Second API request
Merchant->>-Swedbank Pay: GET </psp/creditaccount/payments/<paymentId>/>
Merchant->>-Swedbank Pay: GET <payment.id>
activate Swedbank Pay
Swedbank Pay-->>-Merchant: payment resource
activate Merchant
Expand Down Expand Up @@ -206,8 +206,8 @@ Content-Type: application/json
"payeeInfo" : { "id": "/psp/creditaccount/payments/{{ page.paymentId }}/payeeInfo" },
"urls" : { "id": "/psp/creditaccount/payments/{{ page.paymentId }}c/urls" },
"settings": { "id": "/psp/creditaccount/payments/{{ page.paymentId }}/settings" },
"approvedLegalAddress": { "id": "/psp/creditaccount/payments/<paymentId>/approvedlegaladdress" },
"maskedApprovedLegalAddress": { "id": "/psp/creditaccount/payments/<paymentId>/maskedapprovedlegaladdress" }
"approvedLegalAddress": { "id": "/psp/creditaccount/payments/{{ page.paymentId }}/approvedlegaladdress" },
"maskedApprovedLegalAddress": { "id": "/psp/creditaccount/payments/{{ page.paymentId }}/maskedapprovedlegaladdress" }
},
"operations": [
{
Expand Down
4 changes: 2 additions & 2 deletions payments/direct-debit/other-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ Content-Type: application/json
},
"operations": [
{
"href": "{{ page.apiUrl }}/psp/directdebit/payments/<paymentId>/sales",
"href": "{{ page.apiUrl }}/psp/directdebit/payments/{{ page.paymentId }}/sales",
"rel": "redirect-sale",
"method": "POST"
},
{
"href": "{{ page.apiUrl }}/psp/directdebit/payments/<paymentId>",
"href": "{{ page.apiUrl }}/psp/directdebit/payments/{{ page.paymentId }}",
"rel": "update-payment-abort",
"method": "PATCH"
}
Expand Down
4 changes: 2 additions & 2 deletions payments/direct-debit/redirect.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ Content-Type: application/json
  },
   "operations": [
        {
           "href": "{{ page.apiUrl }}/psp/directdebit/payments/<paymentId>/sales",
           "href": "{{ page.apiUrl }}/psp/directdebit/payments/{{ page.paymentId }}/sales",
           "rel": "redirect-sale",
           "method": "POST"
        },
        {
           "href": "http://{{ page.apiHost }}/psp/directdebit/payments/<paymentId>",
           "href": "http://{{ page.apiHost }}/psp/directdebit/payments/{{ page.paymentId }}",
           "rel": "update-payment-abort",
           "method": "PATCH"
        }
Expand Down
2 changes: 1 addition & 1 deletion payments/invoice/after-payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ To capture a `FinancingConsumer` invoice payment, perform the `create-capture`
operation with the following request body:

```http
POST /psp/invoice/payments/<paymentId>/captures HTTP/1.1
POST /psp/invoice/payments/{{ page.paymentId }}/captures HTTP/1.1
Host: {{ page.apiHost }}
Authorization: Bearer <AccessToken>
Content-Type: application/json
Expand Down
2 changes: 1 addition & 1 deletion payments/mobile-pay/after-payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ perform a `GET` on the payment after the user returns from the
**Request**

```http
PATCH /psp/creditcard/payments/{{ page.paymentId }}/authorizations/<transactionId> HTTP/1.1
PATCH /psp/creditcard/payments/{{ page.paymentId }}/authorizations/{{ page.transactionId }} HTTP/1.1
Host: {{ page.apiHost }}
Authorization: Bearer <AccessToken>
Content-Type: application/json
Expand Down
4 changes: 2 additions & 2 deletions payments/swish/after-payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ Content-Type: application/json

### Create Reversal transaction

A reversal transaction can be created after a completed authorization by sending
a request to `/psp/swish/payments/<payment-id>/reversals`.
A reversal transaction can be created after a completed authorization by
performing a request to the `create-reversal` operation.
A [callback][technical-reference-callback] request will follow from
Swedbank Pay.

Expand Down
4 changes: 2 additions & 2 deletions payments/swish/direct.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ sequenceDiagram
activate Swish_API
Swish_API->>-Swish_App: Start redirect
activate Swish_App
Swish_App--x-Browser: Redirect
activate Merchant
Merchant->>- SwedbankPay: GET <Sales transaction>
Expand Down Expand Up @@ -243,7 +243,7 @@ request.
**Request**

```http
POST /psp/swish/payments/<paymentId>/sales HTTP/1.1
POST /psp/swish/payments/{{ page.paymentId }}/sales HTTP/1.1
Authorization: Bearer <AccessToken>
Content-Type: application/json
Expand Down
2 changes: 1 addition & 1 deletion payments/vipps/after-payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ to the `GET` request.
**Request**

```http
GET /psp/vipps/payments/{{ page.paymentId }}/authorizations/<transactionId> HTTP/1.1
GET /psp/vipps/payments/{{ page.paymentId }}/authorizations/{{ page.transactionId }} HTTP/1.1
Host: {{ page.apiHost }}
Authorization: Bearer <AccessToken>
Content-Type: application/json
Expand Down
2 changes: 1 addition & 1 deletion payments/vipps/redirect.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ transactions made on a specific payment.
HTTP/1.1 200 OK
Content-Type: application/json
GET /psp/vipps/payments/{{ page.paymentId }}/authorizations/<transactionId> HTTP/1.1
GET /psp/vipps/payments/{{ page.paymentId }}/authorizations/{{ page.transactionId }} HTTP/1.1
Host: {{ page.apiHost }}
Authorization: Bearer <MerchantToken>
Expand Down
2 changes: 1 addition & 1 deletion payments/vipps/seamless-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ sequenceDiagram
Browser-->>-SwedbankPay: Passing data for authorization
activate SwedbankPay
SwedbankPay-->>-Vipps.API: POST <paymentId>/authorizations
SwedbankPay-->>-Vipps.API: POST <rel:create-auhtorization>
activate Vipps.API
Vipps.API-->>-SwedbankPay: response
activate SwedbankPay
Expand Down

0 comments on commit 005dab6

Please sign in to comment.