info: title: Convenient Checkout Api contact: name: CCGLeads email: CCGLeads@ds.uhc.com version: v1 description: Convenient Checkout Gateway API termsOfService: >- https://legacy.optumdeveloper.com/content/odv-optumdev/optum-developer/en/legal-terms/terms-of-use.html x-shortDescription: Convenient Checkout Gateway API paths: /payments: get: tags: - payment-controller summary: Get Payment Status by Merchant Transaction Id security: - gateway: - financial/commerce/nonprodcheckout:user - financial/commerce/nonprodcheckout:merchant responses: '200': content: application/json: schema: $ref: '#/components/schemas/ResourcePaymentResponse' description: OK '202': content: application/json: schema: $ref: '#/components/schemas/ResourcePaymentResponse' description: Accepted '400': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Bad Request '406': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Not Acceptable '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Internal Server Error parameters: - in: header name: X-Merchant-Id schema: type: string format: uuid required: true - in: query name: merchantTransactionId schema: type: string format: uuid required: true operationId: getPaymentIntentByMerchantId post: tags: - payment-controller summary: Create Payment security: - gateway: - financial/commerce/nonprodcheckout:user - financial/commerce/nonprodcheckout:merchant responses: '202': content: application/json: schema: $ref: '#/components/schemas/ResourcePaymentResponse' description: Accepted '400': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Bad Request '406': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Not Acceptable '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Internal Server Error parameters: - in: header name: X-Merchant-Id schema: type: string format: uuid required: true - in: header name: X-Customer-Id schema: type: string required: false - in: header name: X-Checkout-Id schema: type: string format: uuid required: false operationId: createPaymentIntent requestBody: content: application/json: schema: $ref: '#/components/schemas/PaymentRequest' required: true /sessions: post: tags: - auth-controller summary: Create session for initializing the convenient checkout widget security: - gateway: - financial/commerce/nonprodcheckout:merchant responses: '200': content: application/json: schema: $ref: '#/components/schemas/SessionResponse' description: OK '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Internal Server Error parameters: - in: header name: X-Merchant-Id schema: type: string format: uuid required: true operationId: createSession requestBody: content: application/json: schema: $ref: '#/components/schemas/SessionRequest' required: true /checkout-sessions: post: tags: - auth-controller summary: DRAFT - Create Checkout Session security: - gateway: - financial/commerce/nonprodcheckout:user responses: '200': content: application/json: schema: $ref: '#/components/schemas/Resource' description: OK '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Internal Server Error parameters: - in: header name: X-Merchant-Id schema: type: string format: uuid required: true - in: header name: X-Customer-Id schema: type: string required: false operationId: createCheckoutSession requestBody: content: application/json: schema: $ref: '#/components/schemas/CheckoutRequest' required: true /payments/{paymentId}: get: tags: - payment-controller summary: Get Payment Status by PaymentId security: - gateway: - financial/commerce/nonprodcheckout:user - financial/commerce/nonprodcheckout:merchant responses: '200': content: application/json: schema: $ref: '#/components/schemas/ResourcePaymentResponse' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Bad Request '406': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Not Acceptable '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Internal Server Error parameters: - in: path name: paymentId schema: type: string required: true operationId: getPaymentIntent /payment-methods/search: post: tags: - payment-method-controller summary: DRAFT - Find payment-methods for customer security: - gateway: - financial/commerce/nonprodcheckout:merchant responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/PaymentMethod' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' description: Bad Request '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' description: Internal Server Error parameters: - in: header name: X-Merchant-Id schema: type: string format: uuid required: true operationId: getPaymentMethodsSearch requestBody: content: application/json: schema: $ref: '#/components/schemas/CustomerDetail' required: true /payments/{paymentId}/capture: patch: tags: - payment-controller summary: DRAFT - Capture partial or full amount in Auth operations by PaymentId security: - gateway: - financial/commerce/nonprodcheckout:merchant responses: '200': content: application/json: schema: $ref: '#/components/schemas/ResourcePaymentResponse' description: SUCCESS '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Internal Server Error parameters: - in: header name: X-Merchant-Id schema: type: string format: uuid required: true - in: path name: paymentId schema: type: string format: uuid required: true operationId: capturePayment requestBody: content: application/json: schema: $ref: '#/components/schemas/CaptureRequest' /payments/{paymentId}/cancel: patch: tags: - payment-controller summary: DRAFT - Cancel Payment by PaymentId security: - gateway: - financial/commerce/nonprodcheckout:merchant responses: '200': content: application/json: schema: $ref: '#/components/schemas/ResourcePaymentResponse' description: SUCCESS '400': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Bad Request '404': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Not Found '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResource' description: Internal Server Error parameters: - in: header name: X-Merchant-Id schema: type: string format: uuid required: true - in: path name: paymentId schema: type: string format: uuid required: true operationId: cancelPayment requestBody: content: application/json: schema: $ref: '#/components/schemas/CancelRequest' /checkout-sessions/{checkoutId}: get: tags: - auth-controller security: - gateway: - financial/commerce/nonprodcheckout:merchant responses: '200': content: application/json: schema: $ref: '#/components/schemas/Resource' description: OK '202': content: application/json: schema: $ref: '#/components/schemas/Resource' description: Accepted '401': content: application/json: schema: type: string description: Unauthorized parameters: - in: path name: checkoutId schema: type: string format: uuid required: true operationId: getCheckoutStatus /customers/{id}/payment-methods: get: tags: - payment-method-controller security: - gateway: - financial/commerce/nonprodcheckout:user responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/PaymentMethod' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' description: Bad Request '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' description: Internal Server Error parameters: - in: path name: id schema: type: string format: uuid required: true operationId: getPaymentMethods /customers/{id}/setup-payment-methods: post: tags: - setup-payment-method-controller security: - gateway: - financial/commerce/nonprodcheckout:user responses: '202': content: application/json: schema: $ref: '#/components/schemas/ApiResponseSetupPaymentMethodResponse' description: Accepted '400': content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' description: Bad Request '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' description: Internal Server Error parameters: - in: path name: id schema: type: string format: uuid required: true operationId: createSetupPaymentMethod requestBody: content: application/json: schema: $ref: '#/components/schemas/SetupPaymentMethodRequest' required: true /customers/{id}/payment-methods/{payment-method-id}: get: tags: - payment-method-controller security: - gateway: - financial/commerce/nonprodcheckout:user responses: '200': content: application/json: schema: $ref: '#/components/schemas/ApiResponsePaymentMethod' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' description: Bad Request '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' description: Internal Server Error parameters: - in: path name: id schema: type: string format: uuid required: true - in: path name: payment-method-id schema: type: string format: uuid required: true operationId: getPaymentMethod patch: tags: - payment-method-controller security: - gateway: - financial/commerce/nonprodcheckout:user responses: '202': content: application/json: schema: $ref: '#/components/schemas/ApiResponsePaymentMethod' description: OK '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' description: Internal Server Error parameters: - in: path name: id schema: type: string format: uuid required: true - in: path name: payment-method-id schema: type: string format: uuid required: true operationId: updatePaymentMethod requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCardPaymentMethodCommand' required: true delete: tags: - payment-method-controller security: - gateway: - financial/commerce/nonprodcheckout:user responses: '202': content: application/json: schema: $ref: '#/components/schemas/PaymentMethod' description: Accepted '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' description: Internal Server Error parameters: - in: path name: id schema: type: string format: uuid required: true - in: path name: payment-method-id schema: type: string format: uuid required: true operationId: deletePaymentMethod /customers/{id}/setup-payment-methods/{setup-payment-method-id}: get: tags: - setup-payment-method-controller security: - gateway: - financial/commerce/nonprodcheckout:user responses: '200': content: application/json: schema: $ref: '#/components/schemas/ApiResponseSetupPaymentMethodResponse' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' description: Bad Request '500': content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' description: Internal Server Error parameters: - in: path name: id schema: type: string format: uuid required: true - in: path name: setup-payment-method-id schema: type: string format: uuid required: true operationId: getSetupPaymentMethodById x-slug: nonprodcheckout openapi: 3.0.1 servers: - url: https://api-stg.uhg.com/v1 description: Stage CCG Api Server - url: https://api.uhg.com/v1 description: CCG Api Server security: - gateway: - financial/commerce/nonprodcheckout:all x-package: package: financial subpackage: commerce components: schemas: Card: type: object properties: last4: type: string status: enum: - ACTIVE - EXPIRED type: string readOnly: true cardBrand: enum: - VISA - AMEX - DINERS - DISCOVER - JCB - MASTERCARD - UNIONPAY - UNKNOWN type: string expiryYear: type: integer format: int64 nameOnCard: type: string expiryMonth: type: integer format: int64 vendorPaymentMethodFingerprint: type: string Customer: type: object properties: id: type: string name: type: string idType: type: string Resource: type: object properties: url: type: string data: type: object ErrorResource: type: object properties: title: type: string detail: type: string status: type: integer format: int32 ErrorResponse: type: object properties: error: type: string status: type: integer format: int32 PaymentDetail: type: object properties: amount: type: integer format: int32 metaData: type: object additionalProperties: type: string paymentType: enum: - SALE - PRE_AUTH type: string default: SALE deprecated: true authorizeCard: description: >- When authorizeCard is set as true, the credit card will be authorized for the amount supplied. Later we need to call the Capture API to complete the transaction. The authorization is valid only for 7 days. type: boolean default: false partialAuthorization: description: >- When true, card issuers will consider the payment for partial authorization. This flag shall be provided in combination with authorizeCard flag. Applicable payment method types = [CARD] type: boolean default: false merchantTransactionId: type: string statementDescriptorSuffix: type: string description: Suffix to be added to the statement descriptor maxLength: 10 example: Chan FAIR pattern: ^(?=.*[a-zA-Z])[a-zA-Z0-9 \-.]{0,10}$|^$ paymentDescription: type: string description: Payment description maxLength: 100 PaymentMethod: type: object properties: id: type: string format: uuid card: $ref: '#/components/schemas/Card' status: enum: - INITIATED - COMPLETED - DELETED type: string vendor: enum: - STRIPE type: string default: type: boolean customerId: type: string format: uuid paymentMethodType: enum: - CARD - BANK_ACCOUNT type: string vendorPaymentMethodId: type: string CaptureRequest: type: object properties: amount: type: integer format: int64 metadata: type: object additionalProperties: type: string CancelRequest: type: object required: - paymentCancellationReason properties: paymentCancellationReason: enum: - DUPLICATE - FRAUDULENT - REQUESTED_BY_CUSTOMER - ABANDONED type: string paymentCancellationMessage: type: string CustomerDetail: type: object required: - email properties: hsid: type: string name: type: string email: type: string metadata: type: object additionalProperties: type: string dateOfBirth: type: string format: date example: '2000-01-30' phoneNumber: type: object properties: number: type: string example: '4567' coutryCode: type: string example: '1' ssnLastFour: type: string PaymentRequest: type: object required: - amount properties: amount: type: integer format: int64 customer: $ref: '#/components/schemas/CustomerDetail' metaData: type: object additionalProperties: type: string paymentType: enum: - PRE_AUTH - SALE type: string deprecated: true authorizeCard: description: >- When authorizeCard is set as true, the credit card will be authorized for the amount supplied. Later we need to call the Capture API to complete the transaction. The authorization is valid only for 7 days. Applicable payment method types = [CARD] type: boolean default: false partialAuthorization: description: >- When true, card issuers will consider the payment for partial authorization. This flag shall be provided in combination with authorizeCard flag. Applicable payment method types = [CARD] type: boolean default: false paymentMethodId: type: string format: uuid paymentDescription: type: string merchantTransactionId: type: string consent: $ref: '#/components/schemas/Consent' authRequired: type: boolean Consent: type: object properties: merchantConsentId: type: string description: Consent id of the consent collected by the merchant merchantConsentText: type: string description: Consent text to display to the user or agent collectionTimestamp: type: string description: >- Formatted date-time following ISO_DATE_TIME yyyy-MM-dd'T'HH:mm:ss.SSSXXX, e.g. 2023-11-03T10:15:30.100+01:00 collectionDetails: $ref: '#/components/schemas/CollectionDetails' CollectionDetails: type: object properties: type: $ref: '#/components/schemas/ConsentCollectionType' web: $ref: '#/components/schemas/ConsentCollectionWeb' tel: $ref: '#/components/schemas/ConsentCollectionTel' ConsentCollectionType: enum: - WEB - TEL - PPD type: string ConsentCollectionWeb: type: object properties: ipAddress: type: string userAgent: type: string description: Browser User-Agent ConsentCollectionTel: type: object properties: inboundPhoneNumber: $ref: '#/components/schemas/PhoneNumber' PhoneNumber: type: object properties: countryCode: type: string pattern: \d{1-3} number: type: string pattern: \d{4-11} SessionRequest: type: object required: - paymentType properties: payment: $ref: '#/components/schemas/PaymentDetail' customer: $ref: '#/components/schemas/CustomerDetail' consent: $ref: '#/components/schemas/Consent' CheckoutRequest: type: object required: - paymentType properties: amount: type: integer format: int64 metadata: type: object additionalProperties: type: string paymentType: enum: - PRE_AUTH - SALE - REFUND - REVERSAL type: string merchantTransactionId: type: string statementDescriptorSuffix: type: string description: Suffix to be added to the statement descriptor maxLength: 10 example: Chan FAIR pattern: ^(?=.*[a-zA-Z])[a-zA-Z0-9 \-.]{0,10}$|^$ paymentDescription: type: string description: Payment description maxLength: 100 PaymentResponse: type: object properties: id: type: string format: uuid amount: type: integer format: int64 authorizedAmount: type: integer format: int64 capturedAmount: type: integer format: int64 status: enum: - INITIATED - PENDING - PROCESSING - COMPLETED - CANCELED - FAILED - PENDING_FOR_CUSTOMER_CREATION - PENDING_FOR_PAYMENT_METHOD_CREATION type: string vendor: type: string customer: $ref: '#/components/schemas/Customer' metaData: type: object additionalProperties: type: string checkoutId: type: string format: uuid customerId: type: string format: uuid merchantId: type: string format: uuid description: type: string paymentType: enum: - PRE_AUTH - SALE type: string deprecated: true currencyCode: type: string authorizeCard: type: boolean partialAuthorization: description: >- When true, indicates the payment could have been partially authorized based on the card issuer and the maximum amount available for capture can be referred from `authorizedAmount` field. type: boolean default: false paymentMethodId: type: string format: uuid vendorPaymentId: type: string vendorMerchantId: type: string merchantTransactionId: type: string paymentCancellationReason: enum: - DUPLICATE - FRAUDULENT - REQUESTED_BY_CUSTOMER - ABANDONED type: string paymentCancellationMessage: type: string chargeDetails: $ref: '#/components/schemas/ChargeDetails' ChargeDetails: type: object properties: vendorChargeId: type: string format: uuid amount: type: integer format: int64 amountCaptured: type: integer format: int64 amountRefunded: type: integer currencyCode: type: string statementDescriptor: type: string createdAt: type: integer format: int64 paymentMethodType: type: string enum: - CARD - CARD_PRESENT - UNKNOWN card: type: object properties: last4: type: string expiryMonth: type: integer format: int64 expiryYear: type: integer format: int64 countryCode: type: string brand: type: string enum: - VISA - AMEX - DINERS - DISCOVER - JCB - MASTERCARD - UNIONPAY - UNKNOWN vendorPaymentMethodId: type: string chargeStatus: type: string enum: - SUCCEEDED - PENDING - FAILED - UNKNOWN paid: type: boolean default: false chargeError: type: object properties: vendorErrorCode: type: string vendorErrorMessage: type: string SessionResponse: type: object properties: sessionId: type: string format: uuid example: f6567dd8-e069-418e-8893-7d22fcf12459 ResourcePaymentResponse: type: object properties: url: type: string data: $ref: '#/components/schemas/PaymentResponse' ApiResponsePaymentMethod: type: object properties: url: type: string data: $ref: '#/components/schemas/PaymentMethod' SetupPaymentMethodRequest: type: object properties: paymentMethodType: enum: - CARD - BANK_ACCOUNT type: string SetupPaymentMethodResponse: type: object properties: id: type: string format: uuid status: enum: - INITIATED - PENDING - COMPLETED - FAILED type: string paymentMethodType: enum: - CARD - BANK_ACCOUNT type: string platformVendorMerchantId: type: string UpdateCardPaymentMethodCommand: type: object properties: default: type: boolean isDefault: type: boolean expiryYear: type: integer format: int32 nameOnCard: type: string expiryMonth: type: integer format: int32 ApiResponseSetupPaymentMethodResponse: type: object properties: url: type: string data: $ref: '#/components/schemas/SetupPaymentMethodResponse' securitySchemes: gateway: type: oauth2 flows: clientCredentials: scopes: https://api.uhg.com/.default: Default scope assigned to all clients financial/commerce/nonprodcheckout:all: Default scope to be used for all access financial/commerce/nonprodcheckout:user: user scope financial/commerce/nonprodcheckout:merchant: merchant scope tokenUrl: https://api.uhg.com/oauth2/token x-instances: - env: dev path: / probe: path: / method: GET backends: - host: dev-api.healthsafepay.com port: 443 weight: 100 location: azure-centralus protocol: https timeouts: read: 1000 connect: 500 - env: stage path: / probe: path: / method: GET backends: - host: stg-api.healthsafepay.com port: 443 weight: 100 location: azure-centralus protocol: https timeouts: read: 1000 connect: 500 x-catalogEnabled: false x-serviceLevelObjectives: x-throughput: '10' x-availability: '99.99' x-responseTime: '1000' x-maxMsgsPerHour: '500' x-maxPayloadSize: '10' x-expectedMsgsPerDay: '10000'