openapi: 3.2.0 info: title: Pagopa Carts API termsOfService: https://www.pagopa.gov.it/ version: '1.0' description: 'Operations tagged Carts across 3 of this provider''s published API definitions: checkout_v1.json, pagopa-checkout-ec-v1-openapi.yml, pagopa-checkout-ec-v2-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.platform.pagopa.it/checkout/ec/v1 - url: https://api.platform.pagopa.it/checkout/ec/v2 security: - apiKeyHeader: [] - apiKeyQuery: [] tags: - name: Carts paths: /carts: post: summary: PostCarts description: create a cart operationId: PostCarts requestBody: description: New Cart related to payment requests content: application/json: schema: $ref: '#/components/schemas/CartRequest' example: emailNotice: my_email@mail.it paymentNotices: - noticeNumber: '302012387654312384' fiscalCode: '77777777777' amount: 1000 - noticeNumber: '302012387654312385' fiscalCode: '77777777777' amount: 2000 returnUrls: returnOkUrl: www.comune.di.prova.it/pagopa/success.html returnCancelUrl: www.comune.di.prova.it/pagopa/cancel.html returnErrorUrl: www.comune.di.prova.it/pagopa/error.html idCart: id_cart allCCP: 'false' responses: '302': description: Redirect headers: location: description: CheckOut Url schema: type: string format: uri '400': description: Formally invalid input content: application/json: schema: $ref: '#/components/schemas/ProblemJson' example: type: about:blank title: string status: 200 detail: There was an error processing the request instance: string '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ProblemJson' example: type: about:blank title: string status: 200 detail: There was an error processing the request instance: string tags: - Carts servers: - url: https://api.platform.pagopa.it/checkout/ec/v1 components: schemas: ProblemJson: type: object properties: type: type: string description: 'An absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type (e.g., using HTML).' format: uri default: about:blank example: https://example.com/problem/constraint-violation title: type: string description: 'A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable' status: $ref: '#/components/schemas/HttpStatusCode' detail: type: string description: 'A human readable explanation specific to this occurrence of the problem.' example: There was an error processing the request instance: type: string description: 'An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.' format: uri HttpStatusCode: minimum: 100.0 type: integer description: 'The HTTP status code generated by the origin server for this occurrence of the problem.' format: int32 example: 200 exclusiveMaximum: 600.0 CartRequest: required: - paymentNotices - returnUrls type: object properties: emailNotice: type: string format: email example: my_email@mail.it paymentNotices: maxItems: 5 minItems: 1 type: array items: $ref: '#/components/schemas/PaymentNotice' example: - noticeNumber: '302012387654312384' fiscalCode: '77777777777' amount: 1000 - noticeNumber: '302012387654312385' fiscalCode: '77777777777' amount: 2000 returnUrls: required: - returnOkUrl - returnCancelUrl - returnErrorUrl type: object properties: returnOkUrl: type: string format: uri example: www.comune.di.prova.it/pagopa/success.html returnCancelUrl: type: string format: uri example: www.comune.di.prova.it/pagopa/cancel.html returnErrorUrl: type: string format: uri example: www.comune.di.prova.it/pagopa/error.html idCart: type: string example: id_cart allCCP: type: boolean description: Flag that indicates that all transfers are associated with a postal IBAN example: 'false' PaymentNotice: required: - noticeNumber - fiscalCode - amount - companyName - description type: object properties: noticeNumber: maxLength: 18 minLength: 18 type: string description: notice number fiscalCode: maxLength: 11 minLength: 11 type: string description: Public Administration tax code amount: minimum: 1.0 type: integer description: amount (in euro cents) of the payment notice companyName: maxLength: 140 type: string description: Public Administration company name description: maxLength: 140 type: string description: subject of payment CartRequest_2: required: - paymentNotices - returnUrls type: object properties: emailNotice: type: string format: email example: my_email@mail.it paymentNotices: maxItems: 5 minItems: 1 type: array items: $ref: '#/components/schemas/PaymentNotice' example: - noticeNumber: '302012387654312384' fiscalCode: '77777777777' amount: 1000 companyName: companyName description: description - noticeNumber: '302012387654312385' fiscalCode: '77777777777' amount: 2000 companyName: companyName description: description returnUrls: required: - returnOkUrl - returnCancelUrl - returnErrorUrl - returnWaitingUrl type: object properties: returnOkUrl: type: string format: uri example: https://www.comune.di.prova.it/pagopa/success.html returnCancelUrl: type: string format: uri example: https://www.comune.di.prova.it/pagopa/cancel.html returnErrorUrl: type: string format: uri example: https://www.comune.di.prova.it/pagopa/error.html returnWaitingUrl: type: string description: URL where the user is redirected while payment is pending format: uri example: https://www.comune.di.prova.it/pagopa/waiting.html idCart: type: string example: id_cart allCCP: type: boolean description: Flag that indicates that all transfers are associated with a postal IBAN example: 'false' securitySchemes: apiKeyHeader: type: apiKey name: Ocp-Apim-Subscription-Key in: header apiKeyQuery: type: apiKey name: subscription-key in: query x-refined-from: - checkout_v1.json - pagopa-checkout-ec-v1-openapi.yml - pagopa-checkout-ec-v2-openapi.yml