Skip to content

Commit c773d9a

Browse files
authored
Updated API from documentation release
1 parent 99bd30c commit c773d9a

5 files changed

Lines changed: 37 additions & 1 deletion

File tree

api-specs/checkout/api.raml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ traits:
136136
responses:
137137
200:
138138
body:
139+
type: PaymentIntentResponse
139140
example: !include ../checkout/examples/payments/capturePaymentResponse.json
140141
400:
141142
description: The request was invalid.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
{}
1+
{
2+
"outcome": "approved"
3+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#%RAML 1.0 DataType
2+
(annotations.package): PaymentIntents
3+
type: string
4+
displayName: PaymentIntentOutcome
5+
description: |
6+
The outcome returned by the payment Connector after processing a Payment Intent.
7+
(annotations.ignoreValidators): [EnumValuePascalCaseRule]
8+
enum:
9+
- approved
10+
- rejected
11+
- received
12+
(annotations.enumDescriptions):
13+
approved: |
14+
The Payment Intent was processed and approved by the payment service provider (PSP).
15+
rejected: |
16+
The Payment Intent was rejected by the payment service provider (PSP).
17+
received: |
18+
The Payment Intent was received and is being processed asynchronously by the payment service provider (PSP).
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#%RAML 1.0 DataType
2+
(annotations.package): PaymentIntents
3+
type: object
4+
displayName: PaymentIntentResponse
5+
description: |
6+
Returned by Checkout after forwarding a Payment Intent request to the payment Connector.
7+
If the Connector response does not contain a valid `outcome` value, Checkout returns a `500 Internal Server Error`.
8+
example: !include ../../examples/payments/capturePaymentResponse.json
9+
properties:
10+
outcome:
11+
type: PaymentIntentOutcome
12+
description: |
13+
The outcome of the Payment Intent as reported by the payment [Connector](/connectors-and-applications#payment-connectors).

api-specs/checkout/types/types.raml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ PaymentIntentAction: !include payment-intents/PaymentIntentAction.raml
119119
PaymentIntentCancelAction: !include payment-intents/PaymentIntentCancelAction.raml
120120
PaymentIntentCaptureAction: !include payment-intents/PaymentIntentCaptureAction.raml
121121
PaymentIntentOperation: !include payment-intents/PaymentIntentOperation.raml
122+
PaymentIntentOutcome: !include payment-intents/PaymentIntentOutcome.raml
122123
PaymentIntentRefundAction: !include payment-intents/PaymentIntentRefundAction.raml
124+
PaymentIntentResponse: !include payment-intents/PaymentIntentResponse.raml
123125
PaymentIntentReverseAction: !include payment-intents/PaymentIntentReverseAction.raml
124126
AddDiscountCodeError: !include responses/AddDiscountCodeError.raml
125127
ApplicationDeactivated: !include responses/ApplicationDeactivated.raml

0 commit comments

Comments
 (0)