openapi: 3.0.1 info: title: Connector API version: 1.0.0 paths: /healthcheck: get: operationId: healthCheck responses: "200": content: application/json: schema: type: string example: database: healthy: true message: Healthy cardExecutorService: healthy: true message: Healthy ping: healthy: true message: Healthy sqsQueue: healthy: true message: Healthy deadlocks: healthy: true message: Healthy description: OK "503": description: Service Unavailable summary: "Healthcheck endpoint for connector (checks postgresql, cardExecutorService,\ \ ping, sqsQueue, deadlocks)" tags: - Other /v1/api/accounts: get: operationId: searchGatewayAccounts parameters: - in: query name: accountIds schema: type: string description: Comma separate list of gateway account IDs example: "1,2" pattern: "^[\\d,]+$" - in: query name: serviceIds schema: type: string description: Comma separated list of service external IDs example: "46eb1b601348499196c99de90482ee68,service-external-id-2" pattern: "^(?:[A-z0-9]+,?)+$" - in: query name: moto_enabled schema: type: string description: The accounts will be filtered by whether or not MOTO payment are enabled for the account if this parameter is provided. "true" or "false" example: "true" pattern: true|false - in: query name: apple_pay_enabled schema: type: string description: The accounts will be filtered by whether or not Apple pay is enabled for the account if this parameter is provided. "true" or "false". example: "true" pattern: true|false - in: query name: google_pay_enabled schema: type: string description: The accounts will be filtered by whether or not Google pay is enabled for the account if this parameter is provided. "true" or "false". example: "true" pattern: true|false - in: query name: requires_3ds schema: type: string description: The accounts will be filtered by whether or not 3DS is required for the account if this parameter is provided. "true" or "false". example: "true" pattern: true|false - in: query name: type schema: type: string description: The accounts will be filtered by type if this parameter is provided. "test" or "live". example: live pattern: live|test - in: query name: payment_provider schema: type: string description: "The accounts will be filtered by payment provider if this\ \ parameter is provided. One of \"sandbox\" or \"worldpay\", \"smartpay\"\ , \"epdq\" or \"stripe\"" example: live pattern: sandbox|worldpay|smartpay|epdq|stripe - in: query name: payment_provider_account_id schema: type: string description: Accounts will be filtered by payment provider account ID example: payment-provider-account-id - in: query name: provider_switch_enabled schema: type: string description: The accounts will be filtered by whether or not payment provider switch is enabled for the account if this parameter is provided. "true" or "false". example: "true" pattern: true|false - in: query name: recurring_enabled schema: type: string description: The accounts will be filtered by whether or not recurring payments are enabled for the account when this parameter is provided. example: "true" pattern: true|false responses: "200": content: application/json: schema: $ref: "#/components/schemas/GatewayAccountsListDTO" description: OK summary: Search gateway accounts tags: - Gateway accounts post: operationId: createNewGatewayAccount parameters: - in: query name: degatewayification schema: type: boolean requestBody: content: application/json: schema: $ref: "#/components/schemas/GatewayAccountRequest" required: true responses: "201": content: application/json: schema: $ref: "#/components/schemas/CreateGatewayAccountResponse" description: Created "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Missing required fields or invalid values summary: 'Create a new gateway account ' tags: - Gateway accounts /v1/api/accounts/{accountId}: get: description: "Get gateway account by internal ID. Returns notifications credentials,\ \ gateway account credentials (without password). Doesn't include card_types\ \ or gateway_merchant_id" operationId: getGatewayAccount parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 responses: "200": content: application/json: schema: $ref: "#/components/schemas/GatewayAccountWithCredentialsWithInternalIdResponse" description: OK "404": description: Not found summary: Find gateway account by ID tags: - Gateway accounts patch: description: "A generic endpoint that allows the patching of allow_apple_pay,\ \ allow_google_pay, block_prepaid_cards, notify_settings, email_collection_mode,\ \ corporate_credit_card_surcharge_amount, corporate_debit_card_surcharge_amount,\ \ corporate_prepaid_debit_card_surcharge_amount, allow_zero_amount, allow_moto,\ \ moto_mask_card_number_input, moto_mask_card_security_code_input, allow_telephone_payment_notifications,\ \ send_payer_ip_address_to_gateway, send_payer_email_to_gateway, integration_version_3ds,\ \ send_reference_to_gateway, allow_authorisation_api or worldpay_exemption_engine_enabled\ \ using a JSON Patch-esque message body." operationId: patchGatewayAccountByGatewayAccountId parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: type: string example: op: replace path: allow_apple_pay value: true responses: "200": description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request "404": description: Not found summary: 'Patch a gateway account ' tags: - Gateway accounts /v1/api/accounts/{accountId}/3ds-flex-credentials: post: operationId: createOrUpdateWorldpay3dsCredentials parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: "#/components/schemas/Worldpay3dsFlexCredentialsRequest" responses: "200": description: OK "404": description: Not found - account not found or not a Worldpay gateway account "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Unprocessable Entity - Invalid or missing mandatory fields summary: Create or update 3DS flex credentials (worldpay accounts) tags: - Gateway account credentials /v1/api/accounts/{accountId}/agreements: post: operationId: createAgreement parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: "#/components/schemas/AgreementCreateRequest" responses: "200": content: application/json: schema: $ref: "#/components/schemas/AgreementResponse" description: OK "404": description: Not found "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Missing required fields summary: Create an agreement tags: - Agreements /v1/api/accounts/{accountId}/agreements/{agreementId}/cancel: post: operationId: cancelAgreement parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 - in: path name: agreementId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/AgreementCancelRequest" responses: default: content: '*/*': {} description: default response tags: - Agreements /v1/api/accounts/{accountId}/charges: post: operationId: createNewCharge parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 - in: header name: Idempotency-Key schema: type: string nullable: true requestBody: content: '*/*': schema: $ref: "#/components/schemas/ChargeCreateRequest" required: true responses: "201": content: application/json: schema: $ref: "#/components/schemas/ChargeResponse" description: Created "400": description: Bad Request "403": description: Gateway account is disabled "404": description: Not found "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Missing required fields or invalid values summary: Create new charge for gateway account tags: - Charges /v1/api/accounts/{accountId}/charges/{chargeId}: get: operationId: getChargeByGatewayAccountId parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 - description: Charge external ID example: b02b63b370fd35418ad66b0101 in: path name: chargeId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/ChargeResponse" description: OK "404": description: Not found summary: Get charge by account ID and charge external ID tags: - Charges /v1/api/accounts/{accountId}/charges/{chargeId}/cancel: post: operationId: cancelCharge parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 - description: Charge external ID example: b02b63b370fd35418ad66b0101 in: path name: chargeId required: true schema: type: string responses: "202": description: Accepted - operation already in progress "204": description: No content "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - charge is not in correct state "404": description: Not found - charge not found summary: Cancel charge tags: - Charge operations /v1/api/accounts/{accountId}/charges/{chargeId}/capture: post: description: "This endpoint should be called to capture a delayed capture charge.\ \ The charge needs to have been previously marked as AWAITING CAPTURE REQUEST\ \ for this call to succeed. When a charge is in any of the states CAPTURED,\ \ CAPTURE APPROVED, CAPTURE APPROVED RETRY, CAPTURE READY, CAPTURE SUBMITTED\ \ then nothing happens and the response will be a 204. When a charge is in\ \ a status that cannot transition (eg. none of the above) then 409 response\ \ is returned. " operationId: markChargeAsCaptureApproved parameters: - in: path name: accountId required: true schema: type: integer format: int64 - in: path name: chargeId required: true schema: type: string responses: "204": description: No content "404": description: Not found - charge not found "409": description: Conflict - if charge is not in correct state "500": description: Internal server error summary: Mark delayed capture charge as eligible for capture and adds charge to capture queue tags: - Charge operations /v1/api/accounts/{accountId}/charges/{chargeId}/events: get: operationId: getEvents parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 - description: Charge external ID example: 2c6vtn9pth38ppbmnt20d57t49 in: path name: chargeId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/ChargeEventsResponse" description: OK summary: Get transaction history for a charge tags: - Charge events /v1/api/accounts/{accountId}/charges/{chargeId}/refunds: post: operationId: submitRefund parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 - description: Charge external ID example: 2c6vtn9pth38ppbmnt20d57t49 in: path name: chargeId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/RefundRequest" responses: "200": content: application/json: schema: type: string example: amount: 3444 created_date: 2016-10-05T14:15:34.096Z refund_id: vijjk08adovg10gfqc46joem2l user_external_id: AA213FD51B3801043FBC status: success _links: self: href: https://connector.example.com/v1/api/accounts/1/charges/2c6vtn9pth38ppbmnt20d57t49/refunds/vijjk08adovg10gfqc46joem2l payment: href: https://connector.example.com/v1/api/accounts/1/charges/2c6vtn9pth38ppbmnt20d57t49 description: OK "400": description: Bad request - Invalid fields or not sufficient amount available for refund "404": description: Not found - gateway account or charge not found "412": description: Precondition failed - Refund amount available does not match "500": description: Internal server error summary: Refund a charge tags: - Refunds /v1/api/accounts/{accountId}/charges/{chargeId}/refunds/{refundId}: get: operationId: getRefund parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 - description: Charge external ID example: uqu4s24383qkod35rsb06gv3cn in: path name: chargeId required: true schema: type: string - description: Refund external ID example: vijjk08adovg10gfqc46joem2l in: path name: refundId required: true schema: type: string responses: "200": content: application/json: schema: type: string example: _links: payment: href: https://connector.example.com/v1/api/accounts/2/charges/uqu4s24383qkod35rsb06gv3cn self: href: https://connector.example.com/v1/api/accounts/2/charges/uqu4s24383qkod35rsb06gv3cn/refunds/vijjk08adovg10gfqc46joem2l amount: 3444 created_date: 2016-10-05T14:15:34.096Z refund_id: vijjk08adovg10gfqc46joem2l user_external_id: AA213FD51B3801043FBC status: success description: OK "404": description: Not found - charge or refund not found summary: Get a refund tags: - Refunds /v1/api/accounts/{accountId}/charges/{chargeId}/resend-confirmation-email: post: operationId: resendConfirmationEmail parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 - description: Charge external ID example: spmh0fb7rbi1lebv1j3f7hc3m9 in: path name: chargeId required: true schema: type: string responses: "204": description: No content "402": description: Could not send email "404": description: Not found - charge not found "500": description: Internal server error summary: Resend confirmation email for a charge /v1/api/accounts/{accountId}/credentials: post: operationId: createGatewayAccountCredentials parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: "#/components/schemas/GatewayAccountCredentialsRequest" required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/GatewayAccountCredentialsWithInternalId" description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - Invalid or missing mandatory fields "404": description: Not found - account not found summary: Create credentials for a gateway account tags: - Gateway account credentials /v1/api/accounts/{accountId}/credentials/{credentialsId}: patch: operationId: updateGatewayAccountCredentials parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 - description: Credential ID example: 1 in: path name: credentialsId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: type: string example: - op: replace path: state value: VERIFIED_WITH_LIVE_PAYMENT responses: "200": content: application/json: schema: $ref: "#/components/schemas/GatewayAccountCredentialsWithInternalId" description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - Invalid or missing mandatory fields "404": description: Not found - account or credential not found summary: Update a gateway account credential tags: - Gateway account credentials /v1/api/accounts/{accountId}/email-notification: patch: description: Allowed paths
- /payment_confirmed/enabled (values true/false)
- /refund_issued/enabled (values true/false)
- /payment_confirmed/template_body
- /refund_issued/template_body operationId: enableEmailNotification parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: type: string example: op: replace path: /payment_confirmed/enabled value: false responses: "200": description: OK "404": description: Not found "422": description: Unprocessable Content - invalid or missing mandatory fields summary: Enables/disables email notifications for gateway account tags: - Gateway accounts /v1/api/accounts/{accountId}/stripe-account: get: operationId: getStripeAccount parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 responses: "200": content: application/json: schema: $ref: "#/components/schemas/StripeAccountResponse" description: OK "404": description: "Not found - Account does not exist or not a stripe gateway\ \ account or account does not have Stripe credentials, " summary: Retrieves Stripe Connect account information for a given gateway account ID tags: - Gateway accounts /v1/api/accounts/{accountId}/stripe-setup: get: operationId: getStripeAccountSetup parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 responses: "200": content: application/json: schema: $ref: "#/components/schemas/StripeAccountSetup" description: OK "404": description: Not found summary: Retrieve Stripe connect account setup tasks for a given gateway account ID tags: - Gateway accounts patch: description: "Support patching following paths:
bank_account, responsible_person,\ \ vat_number, company_number, director, government_entity_document, organisation_details" operationId: patchStripeAccountSetup parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: type: string example: - op: replace path: bank_account value: true - op: replace path: responsible_person value: false responses: "200": description: OK "404": description: Not found "422": description: Unprocessable Content - operation not allowed summary: Update Stripe Connect account setup tasks have been completed for a given accountId tags: - Gateway accounts /v1/api/accounts/{accountId}/switch-psp: post: operationId: switchPaymentProviderByGatewayAccountId parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: "#/components/schemas/GatewayAccountSwitchPaymentProviderRequest" required: true responses: "200": description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request "404": description: Not found summary: Switch payment provider of a gateway account tags: - Gateway accounts /v1/api/accounts/{accountId}/telephone-charges: post: description: "Create a new telephone charge for gateway account. These are externally\ \ taken payments and the outcome is reported to this endpoint. provider_id\ \ is used as an idempotency key for API calls. If a payment already exists\ \ with the provider_id provided, the API will not store a record about a new\ \ payment, or update or change the record about a payment previously stored." operationId: createNewTelephoneChargeByAccountId parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: '*/*': schema: $ref: "#/components/schemas/TelephoneChargeCreateRequest" required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/ChargeResponse" description: OK - returns existing charge for provider_id "201": content: application/json: schema: $ref: "#/components/schemas/ChargeResponse" description: Created "403": content: application/json: schema: type: string example: error_identifier: TELEPHONE_PAYMENT_NOTIFICATIONS_NOT_ALLOWED message: - Telephone payment notifications are not enabled for this gateway account description: Forbidden "404": description: Not found "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Missing required fields or invalid values summary: Create a new telephone charge for gateway account. tags: - Charges /v1/api/accounts/{accountId}/worldpay/check-3ds-flex-config: post: operationId: validateWorldpay3dsCredentials parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: "#/components/schemas/Worldpay3dsFlexCredentialsRequest" responses: "200": content: application/json: schema: $ref: "#/components/schemas/ValidationResult" description: OK "404": description: Not found - account not found or not a Worldpay gateway account "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Unprocessable Entity - Invalid or missing mandatory fields "503": description: Service unavailable summary: Validate Worldpay 3DS flex credentials tags: - Gateway account credentials /v1/api/accounts/{accountId}/worldpay/check-credentials: post: operationId: validateWorldpayCredentials parameters: - in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: "#/components/schemas/WorldpayValidatableCredentials" responses: "200": content: application/json: schema: $ref: "#/components/schemas/ValidationResult" description: OK "404": description: Not found - account not found or not a Worldpay gateway account "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Unprocessable Entity - Invalid or missing mandatory fields "500": description: Internal server error summary: Validate Worldpay credentials tags: - Gateway account credentials /v1/api/card-types: get: operationId: getCardTypes responses: "200": content: application/json: schema: $ref: "#/components/schemas/CardTypesResponse" description: OK summary: List all card types /v1/api/charges/authorise: post: operationId: authorise requestBody: content: '*/*': schema: $ref: "#/components/schemas/MotoApiAuthoriseRequest" required: true responses: "204": description: No content "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - invalid one time token or one_time_token has already been used "402": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Authorisation declined "404": description: Not found - charge not found "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Unprocessable Entity - Invalid payload or missing mandatory attributes "500": description: Authorisation error summary: Authorise MOTO (api) payment tags: - Charge operations /v1/api/charges/gateway_transaction/{gatewayTransactionId}: get: operationId: getChargeForGatewayTransactionId parameters: - description: Gateway transaction ID example: 5422624d-12b1-4821-8b26-d0383ecf1602 in: path name: gatewayTransactionId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/ChargeResponse" description: OK "404": description: Not found summary: Find charge by gateway transaction ID tags: - Charges /v1/api/discrepancies/report: post: operationId: listDiscrepancies requestBody: content: application/json: schema: type: array items: type: string example: charge-external-id minLength: 1 required: true responses: "200": content: application/json: schema: type: array items: $ref: "#/components/schemas/GatewayStatusComparison" description: OK "500": description: Internal server error summary: Compare charge status with gateway tags: - Discrepancies /v1/api/discrepancies/resolve: post: description: "When charge status mismatches with Gateway and is in cancellable\ \ state, charge is cancelled. Otherwise no action takes place" operationId: resolveDiscrepancies requestBody: content: application/json: schema: type: array items: type: string example: charge-external-id minLength: 1 required: true responses: "200": content: application/json: schema: type: array items: $ref: "#/components/schemas/GatewayStatusComparison" description: OK "500": description: Internal server error summary: Resolve charge status discrepancy tags: - Discrepancies /v1/api/notifications/adyen/payments: post: description: Accepts Adyen payment webhooks as JSON and preserves the raw request body for signature verification. operationId: authoriseAdyenPaymentsNotifications parameters: - example: 5.6.7.8 in: header name: X-Forwarded-For schema: type: string requestBody: content: application/json: schema: type: string responses: "200": description: OK "403": description: Forbidden - notification rejected "405": description: Method Not Allowed - Unsupported HTTP method "415": description: Unsupported Media Type - Unsupported content type summary: Handle Adyen payment notifications tags: - Notifications /v1/api/notifications/adyen/tokens: post: description: Accepts Adyen recurring token webhooks as JSON and preserves the raw request body for signature verification. operationId: authoriseAdyenRecurringTokenNotifications parameters: - example: 5.6.7.8 in: header name: X-Forwarded-For schema: type: string - example: sha256=example-signature in: header name: hmacSignature schema: type: string requestBody: content: application/json: schema: type: string responses: "200": description: OK "400": description: Bad Request - invalid JSON payload or missing required headers "403": description: Forbidden - notification rejected "405": description: Method Not Allowed - Unsupported HTTP method "415": description: Unsupported Media Type - Unsupported content type summary: Handle Adyen token notifications tags: - Notifications /v1/api/notifications/sandbox: post: description: This endpoint returns a HTTP status code of 200 for authorized requests. This is used for testing purposes. Note that the authorization methods for each of the v1/api/notifications/ endpoints uses different authorization methods and a successful response from this endpoint does not guarantee that the other notifications endpoints are working as expected. It does provide assurance that the requests are being correctly proxied to Connector and that Connector is responding.
Requests are authorised either via the source IP address extracted from the HTTP x-forwarded-for header against the expected CIDRs from SANDBOX_ALLOWED_CIDRS or by validating the secret provided via the HTTP Authorization header against the secret within SANDBOX_AUTH_TOKEN. The latter use of the HTTP Authorization header provides a means to test the endpoint without needing to send the request from a fixed IP address.
The request body is not deserialised or processed in any way. operationId: authoriseSandboxNotifications parameters: - example: let-me-in in: header name: Authorization schema: type: string - example: "1.1.1.1, 3.3.3.3" in: header name: X-Forwarded-For schema: type: string responses: "200": description: OK "403": description: Forbidden - notification rejected summary: Handle sandbox notifications tags: - Notifications /v1/api/notifications/stripe: post: operationId: authoriseStripeNotifications parameters: - example: "t=1492774577,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd,v0=6ffbb59b2300aae63f272406069a9788598b792a944a07aba816edb039989a39" in: header name: Stripe-Signature schema: type: string - example: 1.2.3.4 in: header name: X-Forwarded-For schema: type: string requestBody: content: application/json: schema: type: string responses: "200": description: OK "403": description: Forbidden - notification rejected summary: Handle Stripe notifications tags: - Notifications /v1/api/notifications/worldpay: post: description: See https://github.com/alphagov/pay-connector/blob/master/src/test/resources/templates/worldpay/notification.txt for example notification operationId: authoriseWorldpayNotifications parameters: - example: 4.3.2.1 in: header name: X-Forwarded-For schema: type: string requestBody: content: text/xml: schema: type: string responses: "200": description: OK "403": description: Forbidden - notification rejected summary: Handle Worldpay notifications tags: - Notifications /v1/api/service/{serviceExternalId}/account/{accountType}/switch-psp: post: operationId: switchPaymentProviderByServiceIdAndAccountType parameters: - description: Service External Id example: 1 in: path name: serviceExternalId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live requestBody: content: application/json: schema: $ref: "#/components/schemas/GatewayAccountSwitchPaymentProviderRequest" required: true responses: "200": description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request "404": description: Not found summary: Switch payment provider of a gateway account tags: - Gateway accounts /v1/api/service/{serviceId}/account/{accountType}: get: description: "Get gateway account by service external ID and account type (test|live).\ \ Returns notifications credentials, gateway account credentials (without\ \ password). Doesn't include card_types or gateway_merchant_id" operationId: getGatewayAccountByServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live responses: "200": content: application/json: schema: $ref: "#/components/schemas/GatewayAccountWithCredentialsResponse" description: OK "404": description: Not found summary: Find gateway account by service external ID and account type (test|live) tags: - Gateway accounts patch: description: "A generic endpoint that allows the patching of allow_apple_pay,\ \ allow_google_pay, block_prepaid_cards, notify_settings, email_collection_mode,\ \ corporate_credit_card_surcharge_amount, corporate_debit_card_surcharge_amount,\ \ corporate_prepaid_debit_card_surcharge_amount, allow_zero_amount, allow_moto,\ \ moto_mask_card_number_input, moto_mask_card_security_code_input, allow_telephone_payment_notifications,\ \ send_payer_ip_address_to_gateway, send_payer_email_to_gateway, integration_version_3ds,\ \ send_reference_to_gateway, allow_authorisation_api, worldpay_corporate_exemptions_enabled\ \ or worldpay_exemption_engine_enabled using a JSON Patch-esque message body." operationId: patchGatewayAccountByServiceIdAndType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live requestBody: content: application/json: schema: type: string example: op: replace path: allow_apple_pay value: true responses: "200": description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request "404": description: Not found summary: 'Patch a gateway account ' tags: - Gateway accounts /v1/api/service/{serviceId}/account/{accountType}/3ds-flex-credentials: put: operationId: createOrUpdateWorldpay3dsCredentialsByServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live requestBody: content: application/json: schema: $ref: "#/components/schemas/Worldpay3dsFlexCredentialsRequest" responses: "200": description: OK "404": description: Not found - account not found or not a Worldpay gateway account "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Unprocessable Entity - Invalid or missing mandatory fields summary: Create or update 3DS flex credentials (worldpay accounts) tags: - Gateway account credentials /v1/api/service/{serviceId}/account/{accountType}/adyen-setup/{credentialExternalId}: get: operationId: getAdyenAccountSetup parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live - description: Credential External ID example: 46eb1b601348499196c99de90482ee68 in: path name: credentialExternalId required: true schema: type: string responses: "200": content: application/json: example: service_id: 46eb1b601348499196c99de90482ee68 credential_external_id: 46eb1b601348499196c99de90482ee68 gateway_account_id: 123 tasks: bank_account: status: COMPLETED director: status: COMPLETED responsible_person: status: COMPLETED vat_number: status: COMPLETED company_number: status: COMPLETED government_entity_document: status: COMPLETED organisation_details: status: COMPLETED schema: $ref: "#/components/schemas/AdyenAccountSetupResponse" description: OK "404": description: Not found summary: "Retrieve Adyen account setup tasks for a given service ID, account\ \ type and credential ID" tags: - Gateway accounts patch: description: "Support patching following paths:
bank_account, responsible_person,\ \ vat_number, company_number, director, government_entity_document, organisation_details" operationId: patchAdyenAccountSetup parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live - description: Credential External ID example: 46eb1b601348499196c99de90482ee68 in: path name: credentialExternalId required: true schema: type: string requestBody: content: '*/*': example: - op: replace path: bank_account value: COMPLETED - op: replace path: responsible_person value: NOT_STARTED schema: $ref: "#/components/schemas/AdyenSetupPatchRequest" responses: "200": description: OK "400": description: Bad Request "404": description: Not found summary: "Update Adyen account setup tasks for a given service ID, account type\ \ and credential ID" tags: - Gateway accounts /v1/api/service/{serviceId}/account/{accountType}/agreements: post: operationId: createAgreement_1 parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live requestBody: content: application/json: schema: $ref: "#/components/schemas/AgreementCreateRequest" responses: "200": content: application/json: schema: $ref: "#/components/schemas/AgreementResponse" description: OK "404": description: Not found "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Missing required fields summary: Create an agreement for a service ID and account type (test|live) tags: - Agreements /v1/api/service/{serviceId}/account/{accountType}/agreements/{agreementId}/cancel: post: operationId: cancelAgreement_1 parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live - in: path name: agreementId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/AgreementCancelRequest" responses: default: content: '*/*': {} description: default response tags: - Agreements /v1/api/service/{serviceId}/account/{accountType}/charges: post: operationId: createNewChargeByServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live - in: header name: Idempotency-Key schema: type: string nullable: true requestBody: content: '*/*': schema: $ref: "#/components/schemas/ChargeCreateRequest" required: true responses: "201": content: application/json: schema: $ref: "#/components/schemas/ChargeResponse" description: Created "400": description: Bad Request "403": description: Gateway account is disabled "404": description: Not found "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Missing required fields or invalid values summary: Create new charge for service ID and account type tags: - Charges /v1/api/service/{serviceId}/account/{accountType}/charges/{chargeId}: get: operationId: getChargeByServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live - description: Charge external ID example: b02b63b370fd35418ad66b0101 in: path name: chargeId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/ChargeResponse" description: OK "404": description: Not found summary: "Get charge by service ID, account type and charge external ID" tags: - Charges /v1/api/service/{serviceId}/account/{accountType}/charges/{chargeId}/cancel: post: operationId: cancelChargeByServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live - description: Charge external ID example: spmh0fb7rbi1lebv1j3f7hc3m9 in: path name: chargeId required: true schema: type: string responses: "202": description: Accepted - operation already in progress "204": description: No content "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - charge is not in correct state "404": description: Not found - charge not found summary: Cancel charge tags: - Charge operations /v1/api/service/{serviceId}/account/{accountType}/charges/{chargeId}/capture: post: description: "This endpoint should be called to capture a delayed capture charge.\ \ The charge needs to have been previously marked as AWAITING CAPTURE REQUEST\ \ for this call to succeed. When a charge is in any of the states CAPTURED,\ \ CAPTURE APPROVED, CAPTURE APPROVED RETRY, CAPTURE READY, CAPTURE SUBMITTED\ \ then nothing happens and the response will be a 204. When a charge is in\ \ a status that cannot transition (eg. none of the above) then 409 response\ \ is returned. " operationId: markChargeAsCaptureApprovedByServiceId parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live - description: Charge external ID example: spmh0fb7rbi1lebv1j3f7hc3m9 in: path name: chargeId required: true schema: type: string responses: "204": description: No content "404": description: Not found - charge not found "409": description: Conflict - if charge is not in correct state "500": description: Internal server error summary: Mark delayed capture charge as eligible for capture and adds charge to capture queue tags: - Charge operations /v1/api/service/{serviceId}/account/{accountType}/charges/{chargeId}/events: get: operationId: getEventsByChargeIdAndServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live - description: Charge external ID example: 2c6vtn9pth38ppbmnt20d57t49 in: path name: chargeId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/ChargeEventsResponse" description: OK summary: Get transaction history for a charge tags: - Charge events /v1/api/service/{serviceId}/account/{accountType}/charges/{chargeId}/refunds: post: operationId: submitRefundByServiceIdAndAccountType parameters: - description: Service external ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account Type example: test in: path name: accountType required: true schema: type: string enum: - test - live - description: Charge external ID example: 2c6vtn9pth38ppbmnt20d57t49 in: path name: chargeId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/RefundRequest" responses: "200": content: application/json: schema: type: string example: amount: 3444 created_date: 2016-10-05T14:15:34.096Z refund_id: vijjk08adovg10gfqc46joem2l user_external_id: AA213FD51B3801043FBC status: success _links: self: href: https://connector.example.com/v1/api/service/46eb1b601348499196c99de90482ee68/account/test/charges/2c6vtn9pth38ppbmnt20d57t49/refunds/vijjk08adovg10gfqc46joem2l payment: href: https://connector.example.com/v1/api/service/46eb1b601348499196c99de90482ee68/account/test/charges/2c6vtn9pth38ppbmnt20d57t49 description: OK "400": description: Bad request - Invalid fields or not sufficient amount available for refund "404": description: Not found - gateway account or charge not found "412": description: Precondition failed - Refund amount available does not match "500": description: Internal server error summary: Refund a charge tags: - Refunds /v1/api/service/{serviceId}/account/{accountType}/charges/{chargeId}/refunds/{refundId}: get: operationId: getRefund_1 parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live - description: Charge external ID example: b02b63b370fd35418ad66b0101 in: path name: chargeId required: true schema: type: string - description: Refund external ID example: vijjk08adovg10gfqc46joem2l in: path name: refundId required: true schema: type: string responses: "200": content: application/json: schema: type: string example: _links: payment: href: https://connector.example.com/v1/api/accounts/2/charges/uqu4s24383qkod35rsb06gv3cn self: href: https://connector.example.com/v1/api/accounts/2/charges/uqu4s24383qkod35rsb06gv3cn/refunds/vijjk08adovg10gfqc46joem2l amount: 3444 created_date: 2016-10-05T14:15:34.096Z refund_id: vijjk08adovg10gfqc46joem2l user_external_id: AA213FD51B3801043FBC status: success description: OK "404": description: Not found - charge or refund not found summary: Get a refund tags: - Refunds /v1/api/service/{serviceId}/account/{accountType}/charges/{chargeId}/resend-confirmation-email: post: operationId: resendConfirmationEmailByServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live - description: Charge external ID example: spmh0fb7rbi1lebv1j3f7hc3m9 in: path name: chargeId required: true schema: type: string responses: "204": description: No content "402": description: Could not send email "404": description: Not found - charge not found "500": description: Internal server error summary: Resend confirmation email for a charge /v1/api/service/{serviceId}/account/{accountType}/credentials: post: operationId: createGatewayAccountCredentialsByServiceIdAndAccountType parameters: - description: Service external ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live requestBody: content: application/json: schema: $ref: "#/components/schemas/GatewayAccountCredentialsRequest" required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/GatewayAccountCredentials" description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - Invalid or missing mandatory fields "404": description: Not found - account not found summary: Create credentials for a gateway account by service external ID and account type (test|live) tags: - Gateway account credentials /v1/api/service/{serviceId}/account/{accountType}/credentials/{credentialsId}: patch: description: "A generic endpoint that allows the patching of credentials, credentials/worldpay/one_off_customer_initiated\ \ credentials/worldpay/recurring_customer_initiated, credentials/worldpay/recurring_merchant_initiated,\ \ last_updated_by_user_external_id, state, gateway_merchant_id, credentials/gateway_merchant_id,\ \ using a JSON Patch-esque message body." operationId: updateGatewayAccountCredentialsByServiceIdAndAccountType parameters: - description: Service external ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live - description: Credential external ID example: 787460d16d4a4d14b4c94787b8f427db in: path name: credentialsId required: true schema: type: string requestBody: content: application/json: schema: type: string example: - op: replace path: credentials/worldpay/one_off_customer_initiated value: VERIFIED_WITH_LIVE_PAYMENT responses: "200": content: application/json: schema: $ref: "#/components/schemas/GatewayAccountCredentials" description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - Invalid or missing mandatory fields "404": description: Not found - account or credential not found summary: Update a gateway account credential by service ID and account Type tags: - Gateway account credentials /v1/api/service/{serviceId}/account/{accountType}/email-notification: patch: description: Allowed paths
- /payment_confirmed/enabled (values true/false)
- /refund_issued/enabled (values true/false)
- /payment_confirmed/template_body
- /refund_issued/template_body operationId: enableEmailNotificationByServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live requestBody: content: application/json: schema: type: string example: op: replace path: /payment_confirmed/enabled value: false responses: "200": description: OK "404": description: Not found "422": description: Unprocessable Content - invalid or missing mandatory fields summary: Enables/disables email notifications for gateway account tags: - Gateway accounts /v1/api/service/{serviceId}/account/{accountType}/stripe-account: get: operationId: getStripeAccountByServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live responses: "200": content: application/json: schema: $ref: "#/components/schemas/StripeAccountResponse" description: OK "404": description: Not found - Service does not exist or service does not have a Stripe gateway account of this type summary: Retrieves Stripe Connect account information for a given service ID and account type (test|live) tags: - Gateway accounts /v1/api/service/{serviceId}/account/{accountType}/stripe-setup: get: operationId: getStripeAccountSetupByServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live responses: "200": content: application/json: schema: $ref: "#/components/schemas/StripeAccountSetup" description: OK "404": description: Not found summary: Retrieve Stripe connect account setup tasks for a given service ID and account type tags: - Gateway accounts patch: description: "Support patching following paths:
bank_account, responsible_person,\ \ vat_number, company_number, director, government_entity_document, organisation_details" operationId: patchStripeAccountSetupByServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live requestBody: content: application/json: schema: type: string example: - op: replace path: bank_account value: true - op: replace path: responsible_person value: false responses: "200": description: OK "404": description: Not found "422": description: Unprocessable Content - operation not allowed summary: Update Stripe Connect account setup tasks have been completed for a given service ID and account type tags: - Gateway accounts /v1/api/service/{serviceId}/account/{accountType}/telephone-charges: post: description: "Create a new telephone charge for a service and account type.\ \ These are externally taken payments and the outcome is reported to this\ \ endpoint. provider_id is used as an idempotency key for API calls. If a\ \ payment already exists with the provider_id provided, the API will not store\ \ a record about a new payment, or update or change the record about a payment\ \ previously stored." operationId: createNewTelephoneChargeByServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live requestBody: content: '*/*': schema: $ref: "#/components/schemas/TelephoneChargeCreateRequest" required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/ChargeResponse" description: OK - returns existing charge for provider_id "201": content: application/json: schema: $ref: "#/components/schemas/ChargeResponse" description: Created "403": content: application/json: schema: type: string example: error_identifier: TELEPHONE_PAYMENT_NOTIFICATIONS_NOT_ALLOWED message: - Telephone payment notifications are not enabled for this gateway account description: Forbidden "404": description: Not found "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Missing required fields or invalid values summary: Create a new telephone charge by service id and account type tags: - Charges /v1/api/service/{serviceId}/account/{accountType}/worldpay/check-3ds-flex-config: post: operationId: validateWorldpay3dsCredentialsByServiceIdAndType parameters: - description: Service external ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live requestBody: content: application/json: schema: $ref: "#/components/schemas/Worldpay3dsFlexCredentialsRequest" responses: "200": content: application/json: schema: $ref: "#/components/schemas/ValidationResult" description: OK "404": description: Not found - account not found or not a Worldpay gateway account "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Unprocessable Entity - Invalid or missing mandatory fields "503": description: Service unavailable summary: Validate Worldpay 3DS flex credentials tags: - Gateway account credentials /v1/api/service/{serviceId}/account/{accountType}/worldpay/check-credentials: post: operationId: validateWorldpayCredentialsByServiceIdAndAccountType parameters: - description: Service external ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live requestBody: content: application/json: schema: $ref: "#/components/schemas/WorldpayValidatableCredentials" responses: "200": content: application/json: schema: $ref: "#/components/schemas/ValidationResult" description: The response body will contain either 'valid' or 'invalid' to indicate if the supplied credentials are valid or not. "404": description: "Not found - account not found, not a Worldpay gateway account\ \ or not a gateway account switching to Worldpay" "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Unprocessable Entity - Invalid or missing mandatory fields "500": description: "Indicates an internal server error in connector, or an upstream\ \ Worldpay 5xx error." summary: Validate Worldpay credentials by service ID and account type tags: - Gateway account credentials /v1/api/service/{serviceId}/request-adyen-test-account: post: operationId: requestAdyenTestAccount parameters: - description: Service ID example: service-external-id-123 in: path name: serviceId required: true schema: type: string requestBody: content: '*/*': schema: type: object additionalProperties: type: string responses: "200": description: OK "409": description: Adyen account already exists "502": description: Bad gateway summary: Creates an Adyen Test Account and associated entities tags: - Gateway accounts /v1/api/service/{serviceId}/request-stripe-test-account: post: operationId: requestStripeTestAccount parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string responses: "201": description: OK "404": description: Not found - Account with serviceId does not exist "409": description: "Stripe Connect Account already exists, or existing test account\ \ is not a Sandbox one" summary: 1) Creates a Stripe Connect Account 2) Creates a gateway account in connector and links this with the Stripe Connect Account id 3) Disables the old sandbox account tags: - Gateway accounts /v1/api/service/{serviceId}/switch-to-adyen-test-account: post: operationId: switchToAdyenTestAccount parameters: - description: Service ID example: service-external-id-123 in: path name: serviceId required: true schema: type: string requestBody: content: '*/*': schema: type: object additionalProperties: type: string responses: "200": description: OK "400": description: Bad request - account ineligible for switch "502": description: Bad gateway summary: "Disables Stripe test account, creates an Adyen Test Account and associated\ \ entities" tags: - Gateway accounts /v1/frontend/accounts/external-id/{externalId}: get: description: "Get gateway account by external ID. Also returns notifications\ \ credentials, gateway account credentials (without password)" operationId: getFrontendGatewayAccountByExternalId parameters: - in: path name: externalId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/GatewayAccountWithCredentialsWithInternalIdResponse" description: OK "404": description: Not found summary: Find gateway account by gateway account external ID tags: - Gateway accounts /v1/frontend/accounts/{accountId}/3ds-toggle: patch: operationId: updateGatewayAccount3dsToggleByGatewayAccountId parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: type: string example: toggle_3ds: "true" responses: "200": description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request "404": description: Not found "409": description: Conflict - 3ds cannot be disabled for account summary: Set requires3ds flag on a gateway account tags: - Gateway accounts /v1/frontend/accounts/{accountId}/card-types: get: operationId: getGatewayAccountAcceptedCardTypes parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 responses: "200": content: application/json: schema: type: string example: card_types: - id: ab8a3abd-bcfd-4fa6-8905-321ce913e7f5 brand: visa label: Visa type: DEBIT requires3ds: false description: OK "404": description: Not found summary: Get card types for gateway account tags: - Gateway accounts post: operationId: updateGatewayAccountAcceptedCardTypesByGatewayAccountId parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: type: string example: card_types: - ab8a3abd-bcfd-4fa6-8905-321ce913e7f5 - 3863fc6a-6425-49cb-b708-af76296bcfc1 required: - card_types responses: "200": description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request "404": description: Not found "409": description: 'Conflict - requires3DS is false on gateway account but atleast one card type requires 3DS to be enabled. ' summary: Update accepted card types for a gateway account tags: - Gateway accounts /v1/frontend/accounts/{accountId}/servicename: patch: operationId: updateGatewayAccountServiceNameByGatewayAccountId parameters: - description: Gateway account ID example: 1 in: path name: accountId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: type: string example: service_name: a new service name required: - service_name responses: "200": description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request "404": description: Not found summary: Update service name of a gateway account tags: - Gateway accounts /v1/frontend/charges/{chargeId}: get: operationId: getCharge parameters: - description: Charge external ID example: b02b63b370fd35418ad66b0101 in: path name: chargeId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/FrontendChargeResponse" description: OK "404": description: Not found - charge not found summary: Find a charge tags: - Charges - Frontend patch: operationId: patchCharge parameters: - in: path name: chargeId required: true schema: type: string description: Charge external ID example: b02b63b370fd35418ad66b0101 requestBody: content: '*/*': schema: type: string example: op: replace path: email value: newemail@example.org responses: "200": content: application/json: schema: $ref: "#/components/schemas/FrontendChargeResponse" description: OK "400": description: Bad request "404": description: Not found - charge not found "500": description: Internal server error summary: Update charge (email field only) tags: - Charges - Frontend /v1/frontend/charges/{chargeId}/3ds: post: operationId: authorise3dsCharge parameters: - description: Charge external ID example: b02b63b370fd35418ad66b0101 in: path name: chargeId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/Auth3dsResult" responses: "200": description: OK "202": description: Accepted - payment has been submitted for 3ds authorisation and awaiting response from payment service provider "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - invalid payload or the payment has been declined "402": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Gateway error "404": description: Not found - charge not found "500": description: Internal server error - For gateway errors or anything else not handled summary: Authorise 3DS charge tags: - Charge operations /v1/frontend/charges/{chargeId}/cancel: post: operationId: userCancelCharge parameters: - description: Charge external ID example: b02b63b370fd35418ad66b0101 in: path name: chargeId required: true schema: type: string responses: "202": description: Accepted - operation already in progress "204": description: No content "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - charge is not in correct state "404": description: Not found - charge not found summary: Cancel charge (action by user) tags: - Charge operations /v1/frontend/charges/{chargeId}/capture: post: description: Marks charge as eligible (or ready - for delayed capture) for capture and also adds charge to capture queue (if not delayed capture). operationId: captureCharge parameters: - description: Charge external ID example: b02b63b370fd35418ad66b0101 in: path name: chargeId required: true schema: type: string responses: "204": description: No content "400": description: Bad request - if charge is not in correct state "404": description: Not found - charge not found "500": description: Internal server error summary: Mark charge as eligible for capture tags: - Charge operations /v1/frontend/charges/{chargeId}/cards: post: operationId: authoriseCharge parameters: - description: Charge external ID example: b02b63b370fd35418ad66b0101 in: path name: chargeId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/AuthCardDetails" responses: "200": description: OK "202": description: Accepted - payment has been submitted for authorisation and awaiting response from payment service provider "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - invalid payload or the payment has been declined "402": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Gateway error "404": description: Not found - charge not found "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Unprocessable Entity - Invalid payload or missing mandatory attributes "500": description: Internal server error - For gateway errors or anything else not handled summary: Authorise charge tags: - Charge operations /v1/frontend/charges/{chargeId}/status: put: operationId: updateChargeStatus parameters: - description: Charge external ID example: spmh0fb7rbi1lebv1j3f7hc3m9 in: path name: chargeId required: true schema: type: string requestBody: content: '*/*': schema: type: string example: new_status: ENTERING CARD DETAILS responses: "204": description: No content "400": description: Bad request - charge cannot be updated to new status "404": description: Not found - charge not found "422": description: Unprocessable Entity - invalid new status "500": description: Internal server error summary: Update status of a charge tags: - Charges - Frontend /v1/frontend/charges/{chargeId}/wallets/apple: post: operationId: authoriseApplePay parameters: - description: Charge external ID example: b02b63b370fd35418ad66b0101 in: path name: chargeId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/ApplePayAuthRequest" required: true responses: "200": description: OK "202": description: Accepted - payment has been submitted for authorisation and awaiting response from payment service provider "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - invalid payload or the payment has been declined "402": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Gateway error "404": description: Not found "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Unprocessable Entity - Invalid payload or missing mandatory attributes "500": description: Internal server error summary: Authorise Apple Pay payment tags: - Charge operations /v1/frontend/charges/{chargeId}/wallets/google: post: operationId: authoriseChargeGooglePay parameters: - description: Charge external ID example: b02b63b370fd35418ad66b0101 in: path name: chargeId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/GooglePayAuthRequest" required: true responses: "200": description: OK "202": description: Accepted - payment has been submitted for authorisation and awaiting response from payment service provider "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - invalid payload or the payment has been declined "402": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Gateway error "404": description: Not found "422": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Unprocessable Entity - Invalid payload or missing mandatory attributes "500": description: Internal server error summary: Authorise Google Pay payment tags: - Charge operations /v1/frontend/charges/{chargeId}/worldpay/3ds-flex/ddc: get: operationId: getWorldpay3dsFlexDdcJwt parameters: - in: path name: chargeId required: true schema: type: string description: Charge external ID example: b02b63b370fd35418ad66b0101 responses: "200": content: application/json: schema: type: string example: jwt: token description: OK "404": description: Not found - charge not found "409": description: Conflict - Cannot generate Worldpay 3ds Flex JWT because credentials are unavailable or not a Worldpay account "500": description: Internal server error summary: Get Worldpay 3DS Flex DDC JWT tags: - Charges - Frontend /v1/frontend/service/{serviceId}/account/{accountType}/3ds-toggle: patch: operationId: updateGatewayAccount3dsToggleByServiceId parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live requestBody: content: application/json: schema: type: string example: toggle_3ds: "true" responses: "200": description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request "404": description: Not found "409": description: Conflict - 3ds cannot be disabled for account summary: Set requires3ds flag on a gateway account tags: - Gateway accounts /v1/frontend/service/{serviceId}/account/{accountType}/card-types: get: operationId: getAcceptedCardTypesByServiceIdAndAccountType parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live responses: "200": content: application/json: schema: type: string example: card_types: - id: ab8a3abd-bcfd-4fa6-8905-321ce913e7f5 brand: visa label: Visa type: DEBIT requires3ds: false description: OK "404": description: Not found summary: Get card types for gateway account by service external ID and account type tags: - Gateway accounts post: operationId: updateGatewayAccountAcceptedCardTypesByServiceId parameters: - description: Service ID example: 1 in: path name: serviceId required: true schema: type: string - description: Account type example: test in: path name: accountType required: true schema: type: string enum: - test - live requestBody: content: application/json: schema: type: string example: card_types: - ab8a3abd-bcfd-4fa6-8905-321ce913e7f5 - 3863fc6a-6425-49cb-b708-af76296bcfc1 required: - card_types responses: "200": description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request "404": description: Not found "409": description: 'Conflict - requires3DS is false on gateway account but atleast one card type requires 3DS to be enabled. ' summary: Update accepted card types for a gateway account tags: - Gateway accounts /v1/frontend/service/{serviceId}/servicename: patch: operationId: updateGatewayAccountServiceNameByServiceId parameters: - description: Service ID example: 46eb1b601348499196c99de90482ee68 in: path name: serviceId required: true schema: type: string requestBody: content: application/json: schema: type: string example: service_name: a new service name required: - service_name responses: "200": description: OK "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request "404": description: Not found summary: Update service name of Test and Live (if existent) accounts for service tags: - Gateway accounts /v1/frontend/tokens/{chargeTokenId}: delete: operationId: deleteToken parameters: - example: a69a2cf3-d5d1-408f-b196-4b716767b507 in: path name: chargeTokenId required: true schema: type: string responses: "204": description: No content "404": description: Not found summary: Delete secure token tags: - Secure token get: operationId: getToken parameters: - example: a69a2cf3-d5d1-408f-b196-4b716767b507 in: path name: chargeTokenId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/TokenResponse" description: OK "404": description: Not found summary: Retrieve secure token tags: - Secure token /v1/frontend/tokens/{chargeTokenId}/used: post: operationId: markTokenUsed parameters: - example: a69a2cf3-d5d1-408f-b196-4b716767b507 in: path name: chargeTokenId required: true schema: type: string responses: "204": description: No content "404": description: Not found summary: Mark secure token as used tags: - Secure token /v1/tasks/emitted-events-sweep: post: description: "During the state transition event connector puts an event in an\ \ in-memory queue (and database) which is then picked up by the background\ \ process to emit the event to SQS. If the process is interrupted there is\ \ a database record which indicates that the event has been put in an in-memory\ \ queue, but not yet emitted to the SQS.
This task retrieves all the records\ \ that haven't been fully processed, for each event it invokes the backfill\ \ process and marks the event as processed.
The default age of the non-emitted\ \ event is at least 30 minutes. This value can be controlled with NOT_EMITTED_EVENT_MAX_AGE_IN_SECONDS\ \ environment variable." operationId: expireCharges_1 responses: "200": description: OK summary: Sweep emitted events tags: - Tasks /v1/tasks/expired-charges-sweep: post: description: "This starts a task to expire the charges with a default window\ \ of 90 minutes. The default value can be overridden by setting an environment\ \ variable CHARGE_EXPIRY_WINDOW_SECONDS in seconds. Response of the call will\ \ tell you how many charges were successfully expired and how many of them\ \ failed for some reason. This endpoint also expires charges in AWAITING_CAPTURE_REQUEST\ \ status. The default window is 120 hours. It can be overriden by setting\ \ an environment variable AWAITING_DELAY_CAPTURE_EXPIRY_WINDOW in seconds.\ \ Also expires tokens older than the configured TOKEN_EXPIRY_WINDOW_SECONDS,\ \ and expires idempotency keys older than the configured IDEMPOTENCY_KEY_EXPIRY_WINDOW_SECONDS." operationId: expireCharges responses: "200": content: application/json: schema: type: string example: expiry-success: 2 expiry-failed: 0 description: OK summary: "Expire charges, tokens and idempotency keys" tags: - Tasks /v1/tasks/expunge: post: description: "Task to expunge charges and refunds on terminal or expungeable\ \ state from connector.
This task checks parity of charge/refund with ledger\ \ transaction and expunges only if the fields matches. If parity check fails,\ \ new events are emitted for charge/refunds and the record is marked with\ \ latest parity check status." operationId: expunge parameters: - description: Number of charges to expunge. Defaults to EXPUNGE_NO_OF_CHARGES_PER_TASK_RUN environment variable or configuration default example: 100 in: query name: number_of_charges_to_expunge schema: type: integer format: int32 - description: Number of refunds to expunge. Defaults to EXPUNGE_NO_OF_REFUNDS_PER_TASK_RUN environment variable or configuration default example: 100 in: query name: number_of_refunds_to_expunge schema: type: integer format: int32 responses: "200": description: OK "500": description: Internal server error summary: Expunge charges and refunds in terminal state tags: - Tasks /v1/tasks/gateway-cleanup-sweep: post: description: "Finds all charges (ePDQ, Worldpay, Stripe) which have a status\ \ of AUTHORISATION ERROR, AUTHORISATION UNEXPECTED ERROR, AUTHORISATION TIMEOUT\ \ and checks what their status is with the payment gateway. If the charges\ \ exist on the gateway and are in a non-terminal state, e.g. AUTHORISATION\ \ SUCCESS, a request is sent to cancel the charge on the gateway.
The job\ \ will move the charge into one of three statuses when it has successfully\ \ handled it:
- AUTHORISATION ERROR CANCELLED - the charge was authorised\ \ on the gateway but has now been cancelled.
- AUTHORISATION ERROR REJECTED\ \ - the authorisation was rejected on the gateway and no action needed to\ \ be taken to clean up.
- AUTHORISATION ERROR CHARGE MISSING - the charge\ \ was not found on the gateway, most likely because the error was before the\ \ gateway processed the authorisation." operationId: cleanupChargesInAuthErrorWithGateway parameters: - description: The maximum number of charges in an error state that will be processed by the task example: 100 in: query name: limit required: true schema: type: integer format: int32 responses: "200": content: application/json: schema: type: string example: cleanup-success: 90 cleanup-failed: 10 description: OK "500": description: Internal server error summary: Cleanup charges with Gateway tags: - Tasks /v1/tasks/historical-event-emitter: post: description: "Task to emit payment or refunds events for a given start_id and\ \ max_id range.
Historical event emitter task doesn't emit event, if event\ \ was emitted previously. To re-emit events, relevant emitted events records\ \ need to be cleared
.
Note: This task runs in the background." operationId: emitHistoricEvents parameters: - description: Charge/Refund ID (from database) to start with to emit events. Defaults to 0 example: 1 in: query name: start_id schema: type: integer format: int64 - description: "Charge/Refund ID until which events to be emitted. If not provided,\ \ this is set to maximum ID available." example: 100 in: query name: max_id schema: type: integer format: int64 - description: Type of records (charge/refund) for which events to be emitted. Defaults to 'charge' example: charge in: query name: record_type schema: type: string enum: - charge - refund - description: Duration (in seconds) until which emitted event sweeper should ignore retrying emitting events example: 7200 in: query name: do_not_retry_emit_until_duration schema: type: integer format: int64 responses: "200": description: OK summary: Emit events for charges or refunds tags: - Tasks /v1/tasks/historical-event-emitter-by-date: post: description: "Task to emit payment and refunds events for a given start_date\ \ and end_date range.
Historical event emitter by date task doesn't emit\ \ event, if event was emitted previously. To re-emit events, relevant emitted\ \ events records need to be cleared

Note: This task runs in the background." operationId: emitHistoricEventsByDate parameters: - description: Start date of charge events or refund history events for which events to be emitted example: 2016-01-25T13:23:55Z in: query name: start_date required: true schema: type: string - description: Date until which the events to be emitted example: 2016-01-25T13:23:55Z in: query name: end_date required: true schema: type: string - description: Duration (in seconds) until which emitted event sweeper should ignore retrying emitting events example: 1200 in: query name: do_not_retry_emit_until_duration schema: type: integer format: int64 responses: "200": description: OK summary: Emit events for charges or refunds by date tags: - Tasks /v1/tasks/parity-checker: post: description: "Task to parity check charges or refunds with ledger for a given\ \ start_id and max_id range or by parity_check_status. Parity checker compares\ \ fields of ledger transaction to charge/refund record in connector.
When\ \ parity check fails, new events are emitted even when the events have been\ \ emitted previously.
Note: Task is executed in the background. " operationId: parityCheck parameters: - description: Charge/Refund ID (from database) to start with for parity checking. Defaults to 0 example: 1 in: query name: start_id schema: type: integer format: int64 - description: "Charge/Refund ID until which the records to be parity checked.\ \ If not provided, this is set to maximum ID available." example: 10 in: query name: max_id schema: type: integer format: int64 - description: Set to true to skip parity checking the records which were previously parity checked and matches with ledger transaction. Defaults to false example: true in: query name: do_not_reprocess_valid_records schema: type: boolean - description: "Parity check the records, which were parity checked and marked\ \ with parity_check_status. start_id and max_id are ignored if parity checking\ \ by parity check status" example: DATA_MISMATCH in: query name: parity_check_status schema: type: string - description: Duration (in seconds) until which emitted event sweeper should ignore retrying emitting events example: 7200 in: query name: do_not_retry_emit_until schema: type: integer format: int64 - description: Type of records (charge/refund) to be parity checked. Defaults to 'charge' example: charge in: query name: record_type schema: type: string enum: - charge - refund responses: "200": description: OK "500": description: Internal server error summary: Parity check charges or refunds with ledger tags: - Tasks components: schemas: Address: type: object properties: city: type: string example: London country: type: string example: GB county: type: string example: county line1: type: string example: Address line 1 line2: type: string example: Address line 2 postcode: type: string example: AB1 2CD AdyenAccountSetupResponse: type: object properties: credential_external_id: type: string gateway_account_id: type: integer format: int64 service_id: type: string tasks: type: object additionalProperties: type: object additionalProperties: type: string enum: - NOT_STARTED - COMPLETED AdyenCredentials: type: object properties: account_holder_id: type: string balance_account_id: type: string legal_entity_id: type: string store_id: type: string AdyenGatewayAccountRequest: type: object allOf: - $ref: "#/components/schemas/GatewayAccountRequest" - type: object properties: allow_apple_pay: type: boolean writeOnly: true allow_google_pay: type: boolean writeOnly: true analytics_id: type: string writeOnly: true credentials: $ref: "#/components/schemas/AdyenCredentials" description: type: string payment_provider: type: string writeOnly: true requires_3ds: type: boolean writeOnly: true send_payer_email_to_gateway: type: boolean writeOnly: true send_payer_ip_address_to_gateway: type: boolean writeOnly: true service_id: type: string writeOnly: true service_name: type: string writeOnly: true type: type: string writeOnly: true AdyenSetupPatchRequest: type: object properties: op: type: string path: type: string value: type: string AgreementCancelRequest: type: object properties: user_email: type: string user_external_id: type: string AgreementCreateRequest: type: object properties: description: type: string example: Description for the paying user describing the purpose of the agreement reference: type: string example: Service agreement reference user_identifier: type: string example: reference for the paying user required: - description - reference AgreementResponse: type: object properties: agreement_id: type: string example: iaouobo39hiv0m2560q45j3p04 created_date: type: string format: date-time example: 2022-06-27T13:07:57.58Z description: type: string example: Description for the paying user describing the purpose of the agreement live: type: boolean reference: type: string example: Service agreement reference service_id: type: string example: Service external ID user_identifier: type: string example: reference for the paying user ApplePayAuthRequest: type: object properties: payment_data: type: string description: "paymentData of Apple Pay payment token as String. This is\ \ de-serialised and decrypted for WorldPay payments. For Stripe payments,\ \ the value is passed as is when creating a token" example: "{\"version\":\"EC_v1\",\"data\":\"MLHhOn2BXhNw9wLLDR48DyeUcuSmRJ6KnAIGTMGqsgiMpc+AoJ…\ LUQ6UovkfSnW0sFH6NGZ0jhoap6LYnThYb9WT6yKfEm/rDhM=\",\"signature\":\"MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFAD…\ ZuQFfsLJ+Nb3+7bpjfBsZAhA1sIT1XmHoGFdoCUT3AAAAAAAA\",\"header\":{\"ephemeralPublicKey\"\ :\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE5/Qc6z4TY5HQ5n…KC3kJ4DtIWedPQ70N35PBZzJUrFjtvDZFUvs80uo2ynu+lw==\"\ ,\"publicKeyHash\":\"Xzn7W3vsrlKlb0QvUAviASubdtW4BotWrDo5mGG+UWY=\",\"\ transactionId\":\"372c3858122b6bc39c6095eca2f994a8aa012f3b025d0d72ecfd449c2a5877f9\"\ }}" payment_info: $ref: "#/components/schemas/ApplePayPaymentInfo" required: - payment_info ApplePayPaymentInfo: type: object properties: brand: type: string example: visa card_type: type: string enum: - DEBIT - CREDIT - CREDIT_OR_DEBIT example: DEBIT cardholder_name: type: string example: Joe B maxLength: 255 display_name: type: string example: MasterCard 1234 email: type: string example: mr@payment.test maxLength: 254 last_digits_card_number: type: string description: last digits card number example: "4242" network: type: string example: MasterCard transaction_identifier: type: string example: 372C3858122B6BC39C6095ECA2F994A8AA012F3B025D0D72ECFD449C2A5877F9 Auth3dsData: type: object properties: htmlOut: type: string description: "Applicable for ePDQ 3DS payments. If the transaction goes\ \ via the challenge flow, the response contains the additional field HTML_ANSWER\ \ (from ePDQ) which is a BASE-64 encoded code block" issuerUrl: type: string description: 'Issuer 3DS url to direct users to complete 3DS authentication ' example: https://3ds-secure-redirect-url.example.org md: type: string description: payment session identifier returned by the card issuer example: NnheOml4nhgrnx...pP6oBb3KQqKXiYGL3X8= paRequest: type: string description: Holds 3D secure request data for the issuer. example: eNpVUttygjAQ/R...jI+ts3+f4Afk4a3Y worldpayChallengeJwt: type: string description: "When the charge is in status 'AUTHORISATION 3DS REQUIRED'\ \ state and the 3DS data on the charge contains challenge data, Json Web\ \ Token is calculated and returned to the frontend." Auth3dsResult: type: object properties: auth_3ds_result: type: string writeOnly: true md: type: string pa_response: type: string redirect_result: type: string description: Adyen 3DS2 Redirect Result data AuthCardDetails: type: object properties: accept_header: type: string example: text/html accept_language_header: type: string example: "fr;q=0.9, fr-CH;q=1.0, en;q=0.8, de;q=0.7, *;q=0.5" address: $ref: "#/components/schemas/Address" card_brand: type: string example: visa card_number: type: string description: Card number. See https://docs.payments.service.gov.uk/testing_govuk_pay/#mock-card-numbers-and-email-addresses for test card numbers example: "4242424242424242" card_type: type: string enum: - DEBIT - CREDIT - CREDIT_OR_DEBIT example: DEBIT cardholder_name: type: string description: Cardholder name example: Joe B corporate_card: type: boolean example: false cvc: type: string example: "123" expiry_date: $ref: "#/components/schemas/CardExpiryDate" ip_address: type: string example: 127.0.0.1 js_enabled: type: boolean example: true js_navigator_language: type: string example: en-GB js_screen_color_depth: type: string example: "24" js_screen_height: type: string example: "900" js_screen_width: type: string example: "1440" js_timezone_offset_mins: type: string example: "-60" prepaid: type: string enum: - PREPAID - NOT_PREPAID - UNKNOWN example: NOT_PREPAID user_agent_header: type: string example: Mozilla/5.0 worldpay_3ds_flex_ddc_result: type: string example: 1f1154b7-620d-4654-801b-893b5bb22db1 AuthorisationSummary: type: object description: Object containing information about the authentication of the payment properties: three_d_secure: $ref: "#/components/schemas/ThreeDSecure" CardExpiryDate: type: object description: The expiry date of the card the user paid with. example: 01/99 properties: fourDigitYear: type: string twoDigitMonth: type: string twoDigitYear: type: string CardTypeEntity: type: object description: The supported card types for the account properties: brand: type: string example: visa id: type: string format: uuid example: ac8a3abd-bcfd-4fa6-8905-321ce913e7f5 label: type: string example: Visa requires3ds: type: boolean type: type: string enum: - CREDIT - DEBIT example: DEBIT CardTypesResponse: type: object properties: card_types: type: array items: $ref: "#/components/schemas/CardTypeEntity" ChargeCreateRequest: type: object properties: agreement_id: type: string description: Agreement ID to associate charge with example: md1mjge8gb6p4qndfs8mf8gto5 agreement_payment_type: type: string description: Reason for taking a recurring payment enum: - instalment - recurring - unscheduled amount: type: integer format: int64 description: Amount in pence example: 100 maximum: 10000000 minimum: 0 authorisation_mode: type: string description: Mode of authorisation for the payment. Payments created in `web` mode require the paying user to visit the `next_url` to complete the payment. enum: - web - moto_api - agreement - external credential_id: type: string description: Credential external ID to which charge to be associated. Used when verifying a live payment during PSP switch delayed_capture: type: boolean description: type: string description: The payment description (shown to the user on the payment pages) example: payment description maximum: 255 email: type: string example: joe.blogs@example.org language: type: string enum: - en - cy example: en metadata: $ref: "#/components/schemas/ExternalMetadata" moto: type: boolean description: Mail Order / Telephone Order (MOTO) payment flag example: true prefilled_cardholder_details: $ref: "#/components/schemas/PrefilledCardHolderDetails" reference: type: string description: The reference issued by the government service for this payment example: payment reference maximum: 255 return_url: type: string description: The url to return the user to after the payment process has completed. Required when authorisation_mode is 'web' example: https://service-name.gov.uk/transactions/12345 save_payment_instrument_to_agreement: type: boolean description: Applicable for recurring card payments. Indicated whether the payment method should be saved to agreement source: type: string description: Source of payment (e.g. CARD_PAYMENT_LINK) - defaults to CARD_API (which cannot be specified explicitly). enum: - CARD_API - CARD_PAYMENT_LINK - CARD_AGENT_INITIATED_MOTO - CARD_EXTERNAL_TELEPHONE example: CARD_API required: - amount - description - reference ChargeEventsResponse: type: object properties: charge_id: type: string example: 2c6vtn9pth38ppbmnt20d57t49 events: type: array items: $ref: "#/components/schemas/TransactionEvent" ChargeResponse: type: object properties: agreement_id: type: string description: 'Application for Recurring card payments. Agreement ID that the payment is associated with ' example: md1mjge8gb6p4qndfs8mf8gto5 agreement_payment_type: type: string description: Reason for taking a recurring payment enum: - instalment - recurring - unscheduled amount: type: integer format: int64 description: Amount of this charge example: 100 auth_3ds_data: $ref: "#/components/schemas/Auth3dsData" auth_code: type: string description: Only applicable for telephone payments reported. Authorisation ID received from payment provider when the payment was authorised example: "91011" authorisation_mode: type: string default: web description: How the payment will be authorised. Payments created in `web` mode require the paying user to visit the `next_url` to complete the payment. enum: - web - moto_api - agreement - external example: web authorisation_summary: $ref: "#/components/schemas/AuthorisationSummary" authorised_date: type: string format: date-time description: 'Only applicable for telephone payments reported. Date and time Payment service provider authorised the payment. ' example: 2022-06-28T16:05:33Z card_brand: type: string example: Visa card_details: $ref: "#/components/schemas/PersistedCard" charge_id: type: string description: Unique identifier for the charge example: b02b63b370fd35418ad66b0101 corporate_card_surcharge: type: integer format: int64 created_date: type: string format: date-time example: 2022-06-28T09:24:45.715Z delayed_capture: type: boolean description: "Set to true, if payment is to be captured separately" description: type: string description: The payment description example: payment description email: type: string example: Joe.Bogs@example.org exemption: $ref: "#/components/schemas/Exemption" fee: type: integer format: int64 description: "processing fee taken by the GOV.UK Pay platform, in pence.\ \ Only available depending on payment service provider" example: 10 gateway_transaction_id: type: string description: The reference number the payment gateway associated with the payment. example: 5422624d-12b1-4821-8b26-d0383ecf1602 language: type: string description: The language of the user’s payment page. enum: - en - cy example: en links: type: array description: Array of relevant resource references related to this charge example: - href: https://connector.example.com/v1/api/charges/b02b63b370fd35418ad66b0101 method: GET rel: self - href: https://frontend.example.com/charges/1?chargeTokenId=82347 method: GET rel: next_url - href: https://connector.example.com//v1/api/accounts/1/charges/b02b63b370fd35418ad66b0101/refunds method: GET rel: refunds items: type: object additionalProperties: type: object description: Array of relevant resource references related to this charge example: - href: https://connector.example.com/v1/api/charges/b02b63b370fd35418ad66b0101 method: GET rel: self - href: https://frontend.example.com/charges/1?chargeTokenId=82347 method: GET rel: next_url - href: https://connector.example.com//v1/api/accounts/1/charges/b02b63b370fd35418ad66b0101/refunds method: GET rel: refunds description: Array of relevant resource references related to this charge example: - href: https://connector.example.com/v1/api/charges/b02b63b370fd35418ad66b0101 method: GET rel: self - href: https://frontend.example.com/charges/1?chargeTokenId=82347 method: GET rel: next_url - href: https://connector.example.com//v1/api/accounts/1/charges/b02b63b370fd35418ad66b0101/refunds method: GET rel: refunds metadata: $ref: "#/components/schemas/ExternalMetadata" moto: type: boolean description: Mail Order / Telephone Order (MOTO) payment flag net_amount: type: integer format: int64 description: "amount including all surcharges and less all fees, in pence.\ \ Available depending on payment service provider" example: 90 payment_outcome: $ref: "#/components/schemas/PaymentOutcome" payment_provider: type: string description: The payment provider used for this transaction example: sandbox processor_id: type: string description: Only applicable for telephone payments reported. unique supplier internal reference number associated with the payment example: "12345" provider_id: type: string description: Only applicable for telephone payments reported. Gateway transaction ID example: "45678" reference: $ref: "#/components/schemas/ServicePaymentReference" refund_summary: $ref: "#/components/schemas/RefundSummary" return_url: type: string description: service return url example: https://service-name.gov.uk/transactions/12345 settlement_summary: $ref: "#/components/schemas/SettlementSummary" state: $ref: "#/components/schemas/ExternalTransactionState" telephone_number: type: string description: Only applicable for telephone payments reported. User's telephone number example: "+44000000000" total_amount: type: integer format: int64 description: "Amount your user paid in pence, including corporate card fees.\ \ total_amount only appears if corporate card surcharge is applied to\ \ the payment." wallet_type: type: string description: Indicates if the payment was completed using wallet payment (GOOGLE_PAY or APPLE_PAY) enum: - APPLE_PAY - GOOGLE_PAY example: APPLE_PAY CreateGatewayAccountResponse: type: object properties: analytics_id: type: string example: ananytics-id description: type: string example: account for some gov org external_id: type: string example: ab2c296ed98647e9a25f045f5e6e87a2 gateway_account_id: type: string example: "2" links: type: array example: - href: https://connector.url/v1/api/accounts/2 method: GET rel: self items: type: object additionalProperties: type: object example: - href: https://connector.url/v1/api/accounts/2 method: GET rel: self example: - href: https://connector.url/v1/api/accounts/2 method: GET rel: self requires_3ds: type: boolean example: true send_payer_email_to_gateway: type: boolean example: true send_payer_ip_address_to_gateway: type: boolean example: true service_name: type: string example: service name type: type: string example: live EmailNotificationEntity: type: object description: The settings for the different emails (payments/refunds) that are sent out example: REFUND_ISSUED: version: 1 enabled: true template_body: null PAYMENT_CONFIRMED: version: 1 enabled: true template_body: null properties: enabled: type: boolean description: Indicates whether emails are enabled for notifications type example: true template_body: type: string description: Custom paragraph for the email template version: type: integer format: int64 EmailNotificationPatchRequest: type: object properties: op: type: string path: type: string value: type: string EpdqCredentials: type: object properties: merchant_id: type: string username: type: string ErrorResponse: type: object properties: error_identifier: type: string enum: - ACCOUNT_DISABLED - ACCOUNT_NOT_LINKED_WITH_PSP - AGREEMENT_NOT_ACTIVE - AGREEMENT_NOT_FOUND - AMOUNT_BELOW_MINIMUM - AUTH_TOKEN_INVALID - AUTH_TOKEN_REVOKED - AUTHORISATION_API_NOT_ALLOWED - AUTHORISATION_ERROR - AUTHORISATION_REJECTED - AUTHORISATION_TIMEOUT - CANCEL_CHARGE_FAILURE_DUE_TO_CONFLICTING_TERMINAL_STATE_AT_GATEWAY_CHARGE_STATE_FORCIBLY_TRANSITIONED - CANCEL_CHARGE_FAILURE_DUE_TO_CONFLICTING_TERMINAL_STATE_AT_GATEWAY_INVALID_STATE_TRANSITION - CARD_NUMBER_IN_PAYMENT_LINK_REFERENCE_REJECTED - CARD_NUMBER_REJECTED - GENERIC - IDEMPOTENCY_KEY_USED - INCORRECT_AUTHORISATION_MODE_FOR_SAVE_PAYMENT_INSTRUMENT_TO_AGREEMENT - INVALID_ATTRIBUTE_VALUE - MISSING_MANDATORY_ATTRIBUTE - MOTO_NOT_ALLOWED - NON_HTTPS_RETURN_URL_NOT_ALLOWED_FOR_A_LIVE_ACCOUNT - ONE_TIME_TOKEN_ALREADY_USED - ONE_TIME_TOKEN_INVALID - RECURRING_CARD_PAYMENTS_NOT_ALLOWED - REFUND_AMOUNT_AVAILABLE_MISMATCH - REFUND_NOT_AVAILABLE - REFUND_NOT_AVAILABLE_DUE_TO_DISPUTE - TELEPHONE_PAYMENT_NOTIFICATIONS_NOT_ALLOWED - UNEXPECTED_ATTRIBUTE - ZERO_AMOUNT_NOT_ALLOWED example: GENERIC message: type: array items: type: string example: error message reason: type: string example: "Optional - ex: amount_not_available" Exemption: type: object description: Object containing information about 3DS exemption request of the payment. example: exemption: requested: true properties: outcome: $ref: "#/components/schemas/Outcome" requested: type: boolean description: Flag indicating whether 3ds exemption was requested for the payment. example: true type: type: string description: Indicating the type of the 3ds exemption was requested for the payment if applicable. example: corporate ExternalMetadata: type: object example: "{\"property1\": \"value1\", \"property2\": \"value2\"}\"" properties: metadata: type: object additionalProperties: type: object required: - metadata ExternalTransactionState: type: object description: A structure representing the current state of the payment in its lifecycle properties: can_retry: type: boolean description: "If a failed payment, whether it may be possible to retry it" example: true code: type: string description: Error code for failed payments example: P0010 finished: type: boolean example: true message: type: string description: Message describing error code if payment failed example: Payment method rejected status: type: string example: success FirstDigitsCardNumber: type: object description: The first 6 digits of the card the user paid with. example: 424242 FrontendChargeResponse: type: object description: The charge associated with the token properties: agreement: $ref: "#/components/schemas/AgreementResponse" agreement_id: type: string description: 'Application for Recurring card payments. Agreement ID that the payment is associated with ' example: md1mjge8gb6p4qndfs8mf8gto5 agreement_payment_type: type: string description: Reason for taking a recurring payment enum: - instalment - recurring - unscheduled amount: type: integer format: int64 description: Amount of this charge example: 100 auth_3ds_data: $ref: "#/components/schemas/Auth3dsData" auth_code: type: string description: Only applicable for telephone payments reported. Authorisation ID received from payment provider when the payment was authorised example: "91011" authorisation_mode: type: string default: web description: How the payment will be authorised. Payments created in `web` mode require the paying user to visit the `next_url` to complete the payment. enum: - web - moto_api - agreement - external example: web authorisation_summary: $ref: "#/components/schemas/AuthorisationSummary" authorised_date: type: string format: date-time description: 'Only applicable for telephone payments reported. Date and time Payment service provider authorised the payment. ' example: 2022-06-28T16:05:33Z card_brand: type: string example: Visa card_details: $ref: "#/components/schemas/PersistedCard" charge_id: type: string description: Unique identifier for the charge example: b02b63b370fd35418ad66b0101 corporate_card_surcharge: type: integer format: int64 created_date: type: string format: date-time example: 2022-06-28T09:24:45.715Z delayed_capture: type: boolean description: "Set to true, if payment is to be captured separately" description: type: string description: The payment description example: payment description email: type: string example: Joe.Bogs@example.org exemption: $ref: "#/components/schemas/Exemption" fee: type: integer format: int64 description: "processing fee taken by the GOV.UK Pay platform, in pence.\ \ Only available depending on payment service provider" example: 10 gateway_account: $ref: "#/components/schemas/FrontendGatewayAccountResponse" gateway_transaction_id: type: string description: The reference number the payment gateway associated with the payment. example: 5422624d-12b1-4821-8b26-d0383ecf1602 language: type: string description: The language of the user’s payment page. enum: - en - cy example: en links: type: array description: Array of relevant resource references related to this charge example: - href: https://connector.example.com/v1/api/charges/b02b63b370fd35418ad66b0101 method: GET rel: self - href: https://frontend.example.com/charges/1?chargeTokenId=82347 method: GET rel: next_url - href: https://connector.example.com//v1/api/accounts/1/charges/b02b63b370fd35418ad66b0101/refunds method: GET rel: refunds items: type: object additionalProperties: type: object description: Array of relevant resource references related to this charge example: - href: https://connector.example.com/v1/api/charges/b02b63b370fd35418ad66b0101 method: GET rel: self - href: https://frontend.example.com/charges/1?chargeTokenId=82347 method: GET rel: next_url - href: https://connector.example.com//v1/api/accounts/1/charges/b02b63b370fd35418ad66b0101/refunds method: GET rel: refunds description: Array of relevant resource references related to this charge example: - href: https://connector.example.com/v1/api/charges/b02b63b370fd35418ad66b0101 method: GET rel: self - href: https://frontend.example.com/charges/1?chargeTokenId=82347 method: GET rel: next_url - href: https://connector.example.com//v1/api/accounts/1/charges/b02b63b370fd35418ad66b0101/refunds method: GET rel: refunds metadata: $ref: "#/components/schemas/ExternalMetadata" moto: type: boolean description: Mail Order / Telephone Order (MOTO) payment flag net_amount: type: integer format: int64 description: "amount including all surcharges and less all fees, in pence.\ \ Available depending on payment service provider" example: 90 payment_confirmation_email_enabled: type: boolean payment_outcome: $ref: "#/components/schemas/PaymentOutcome" payment_provider: type: string description: The payment provider used for this transaction example: sandbox processor_id: type: string description: Only applicable for telephone payments reported. unique supplier internal reference number associated with the payment example: "12345" provider_id: type: string description: Only applicable for telephone payments reported. Gateway transaction ID example: "45678" reference: $ref: "#/components/schemas/ServicePaymentReference" refund_summary: $ref: "#/components/schemas/RefundSummary" return_url: type: string description: service return url example: https://service-name.gov.uk/transactions/12345 save_payment_instrument_to_agreement: type: boolean settlement_summary: $ref: "#/components/schemas/SettlementSummary" state: $ref: "#/components/schemas/ExternalTransactionState" status: type: string telephone_number: type: string description: Only applicable for telephone payments reported. User's telephone number example: "+44000000000" total_amount: type: integer format: int64 description: "Amount your user paid in pence, including corporate card fees.\ \ total_amount only appears if corporate card surcharge is applied to\ \ the payment." wallet_type: type: string description: Indicates if the payment was completed using wallet payment (GOOGLE_PAY or APPLE_PAY) enum: - APPLE_PAY - GOOGLE_PAY example: APPLE_PAY FrontendGatewayAccountResponse: type: object description: Representation of a gateway account for use by the card frontend application properties: allow_apple_pay: type: boolean default: false description: Set to true to enable Apple Pay example: true allow_google_pay: type: boolean default: false description: Set to true to enable Google Pay example: true analytics_id: type: string description: An identifier used to identify the service in Google Analytics. The default value is null block_prepaid_cards: type: boolean default: false description: Whether pre-paid cards are allowed as a payment method for this gateway account example: true card_types: type: array description: The supported card types for the account items: $ref: "#/components/schemas/CardTypeEntity" corporate_credit_card_surcharge_amount: type: integer format: int64 corporate_debit_card_surcharge_amount: type: integer format: int64 corporate_prepaid_debit_card_surcharge_amount: type: integer format: int64 email_collection_mode: type: string description: "Whether email address is required from paying users. Can be\ \ MANDATORY, OPTIONAL or OFF" enum: - MANDATORY - OPTIONAL - "OFF" external_id: type: string description: External ID for the gateway account example: fbf905a3f7ea416c8c252410eb45ddbd gateway_account_id: type: integer format: int64 description: The account ID example: 1 gateway_merchant_id: type: string description: Google Pay merchant ID for Worldpay accounts example: abc123 integration_version_3ds: type: integer format: int32 description: 3DS version used for payments for the gateway account example: 2 moto_mask_card_number_input: type: boolean default: false description: Indicates whether the card number is masked when being input for MOTO payments. The default value is false. moto_mask_card_security_code_input: type: boolean default: false description: Indicates whether the card security code is masked when being input for MOTO payments. payment_provider: type: string description: The payment provider for which this account is created example: sandbox requires3ds: type: boolean description: Flag to indicate whether 3DS is enabled example: true service_id: type: string description: Service external ID example: cd1b871207a94a7fa157dee678146acd service_name: type: string description: The service name for the account example: service name type: type: string description: Account type for the payment provider (test/live) example: test GatewayAccountCredentials: type: object properties: active_end_date: type: string format: date-time active_start_date: type: string format: date-time example: 2022-06-28T16:40:56.869Z created_date: type: string format: date-time example: 2022-06-30T15:44:19.323Z credentials: $ref: "#/components/schemas/GatewayCredentials" external_id: type: string example: 787460d16d4a4d14b4c94787b8f427db gateway_account_id: type: integer format: int64 example: 1 last_updated_by_user_external_id: type: string description: User external ID example: vdwke0d16d4a4d14b4c94787b8f427d payment_provider: type: string example: stripe state: type: string enum: - CREATED - ENTERED - VERIFIED_WITH_LIVE_PAYMENT - ACTIVE - RETIRED example: ACTIVE GatewayAccountCredentialsRequest: type: object properties: credentials: type: object additionalProperties: type: string example: "{\"stripe_account_id\":\"accnt_id\"}" example: stripe_account_id: accnt_id payment_provider: type: string description: "Payment provider. Accepted values - stripe, worldpay" example: stripe GatewayAccountCredentialsWithInternalId: type: object properties: active_end_date: type: string format: date-time active_start_date: type: string format: date-time example: 2022-06-28T16:40:56.869Z created_date: type: string format: date-time example: 2022-06-30T15:44:19.323Z credentials: $ref: "#/components/schemas/GatewayCredentials" external_id: type: string example: 787460d16d4a4d14b4c94787b8f427db gateway_account_credential_id: type: integer format: int64 example: 1 gateway_account_id: type: integer format: int64 example: 1 last_updated_by_user_external_id: type: string description: User external ID example: vdwke0d16d4a4d14b4c94787b8f427d payment_provider: type: string example: stripe state: type: string enum: - CREATED - ENTERED - VERIFIED_WITH_LIVE_PAYMENT - ACTIVE - RETIRED example: ACTIVE GatewayAccountRequest: type: object discriminator: propertyName: payment_provider properties: allow_apple_pay: type: boolean description: Set to 'true' to enable Apple Pay for this account writeOnly: true allow_google_pay: type: boolean description: Set to 'true' to enable Google Pay for this account writeOnly: true analytics_id: type: string description: Google Analytics (GA) unique ID for the GOV.UK Pay platform example: analytics-id writeOnly: true description: type: string description: Some useful non-ambiguous description about the gateway account example: account for some gov org payment_provider: type: string default: sandbox description: The payment provider for which this account is created example: stripe writeOnly: true requires_3ds: type: boolean description: Set to 'true' to enable 3DS for this account writeOnly: true send_payer_email_to_gateway: type: boolean description: Set to 'true' to enable send payer's email for this account writeOnly: true send_payer_ip_address_to_gateway: type: boolean description: Set to 'true' to enable send payer's IP address for this account writeOnly: true service_id: type: string example: service-external-id writeOnly: true service_name: type: string example: service name writeOnly: true type: type: string default: test description: Account type for this provider (test/live) example: live writeOnly: true GatewayAccountResponse: type: object properties: _links: type: object additionalProperties: type: object additionalProperties: type: string format: uri example: "{ { \"href\": \"https://connector.url/v1/api/accounts/1\"\ , \"rel\": \"self\", \"method\": \"GET\" \ \ } }" example: "{ { \"href\": \"https://connector.url/v1/api/accounts/1\"\ , \"rel\": \"self\", \"method\": \"GET\" \ \ } }" example: "{ { \"href\": \"https://connector.url/v1/api/accounts/1\"\ , \"rel\": \"self\", \"method\": \"GET\" \ \ } }" allow_apple_pay: type: boolean default: false description: Set to true to enable Apple Pay example: true allow_authorisation_api: type: boolean default: false description: Flag to indicate whether the account is allowed to initiate MOTO payments that are authorised via an API request rather than the web interface example: true allow_google_pay: type: boolean default: false description: Set to true to enable Google Pay example: true allow_moto: type: boolean default: false description: Indicates whether the Mail Order and Telephone Order (MOTO) payments are allowed allow_telephone_payment_notifications: type: boolean default: false description: Indicates if the account is used for telephone payments reporting allow_zero_amount: type: boolean default: false description: Set to true to support charges with a zero amount example: true analytics_id: type: string description: An identifier used to identify the service in Google Analytics. The default value is null block_prepaid_cards: type: boolean default: false description: Whether pre-paid cards are allowed as a payment method for this gateway account example: true corporate_credit_card_surcharge_amount: type: integer format: int64 default: 0 description: A corporate credit card surcharge amount in pence example: 250 corporate_debit_card_surcharge_amount: type: integer format: int64 default: 0 description: A corporate debit card surcharge amount in pence example: 250 corporate_prepaid_debit_card_surcharge_amount: type: integer format: int64 description: A corporate prepaid debit card surcharge amount in pence example: 0 description: type: string default: "null" description: An internal description to identify the gateway account. The default value is null. example: Account for service xxx disabled: type: boolean default: false description: Flag to indicate whether the account is allowed to take payments and make refunds example: false disabled_reason: type: string description: "The reason the account is disabled, if applicable" example: No longer required email_collection_mode: type: string description: "Whether email address is required from paying users. Can be\ \ MANDATORY, OPTIONAL or OFF" enum: - MANDATORY - OPTIONAL - "OFF" email_notifications: type: object additionalProperties: $ref: "#/components/schemas/EmailNotificationEntity" description: The settings for the different emails (payments/refunds) that are sent out example: PAYMENT_CONFIRMED: enabled: true template_body: null version: 1 REFUND_ISSUED: enabled: true template_body: null version: 1 external_id: type: string description: External ID for the gateway account example: fbf905a3f7ea416c8c252410eb45ddbd gateway_account_id: type: integer format: int64 description: The account ID example: 1 integration_version_3ds: type: integer format: int32 description: 3DS version used for payments for the gateway account example: 2 live: type: boolean description: Whether the account is live example: true moto_mask_card_number_input: type: boolean default: false description: Indicates whether the card number is masked when being input for MOTO payments. The default value is false. moto_mask_card_security_code_input: type: boolean default: false description: Indicates whether the card security code is masked when being input for MOTO payments. payment_provider: type: string description: The payment provider for which this account is created example: sandbox provider_switch_enabled: type: boolean default: false description: Flag to enable payment provider switching example: false recurring_enabled: type: boolean default: false description: Flag to indicate whether the account is allowed to take recurring card payments example: true requires3ds: type: boolean description: Flag to indicate whether 3DS is enabled example: true send_payer_email_to_gateway: type: boolean default: false description: "If enabled, user email address is included in the authorisation\ \ request to gateway" example: true send_payer_ip_address_to_gateway: type: boolean default: false description: "If enabled, user IP address is sent to to gateway" example: true send_reference_to_gateway: type: boolean default: false description: "If enabled, service payment reference is sent to gateway as\ \ description. Otherwise payment description is sent to the gateway. Only\ \ applicable for Worldpay accounts. Default value is 'false'" example: true service_id: type: string description: Service external ID example: cd1b871207a94a7fa157dee678146acd service_name: type: string description: The service name for the account example: service name type: type: string description: Account type for the payment provider (test/live) example: test worldpay_3ds_flex: $ref: "#/components/schemas/Worldpay3dsFlexCredentials" GatewayAccountSwitchPaymentProviderRequest: type: object properties: gateway_account_credential_external_id: type: string description: Gateway account credential external ID to switch to example: dfokpo23ji0213ldsm0123ofsm213kdfg user_external_id: type: string description: User external ID switching payment service provider example: vfrg4245bd0e7453c9b1b0d7e6999f11b required: - gateway_account_credential_external_id - user_external_id GatewayAccountWithCredentialsResponse: type: object properties: _links: type: object additionalProperties: type: object additionalProperties: type: string format: uri example: "{ { \"href\": \"https://connector.url/v1/api/accounts/1\"\ , \"rel\": \"self\", \"method\": \"GET\" \ \ } }" example: "{ { \"href\": \"https://connector.url/v1/api/accounts/1\"\ , \"rel\": \"self\", \"method\": \"GET\" \ \ } }" example: "{ { \"href\": \"https://connector.url/v1/api/accounts/1\"\ , \"rel\": \"self\", \"method\": \"GET\" \ \ } }" allow_apple_pay: type: boolean default: false description: Set to true to enable Apple Pay example: true allow_authorisation_api: type: boolean default: false description: Flag to indicate whether the account is allowed to initiate MOTO payments that are authorised via an API request rather than the web interface example: true allow_google_pay: type: boolean default: false description: Set to true to enable Google Pay example: true allow_moto: type: boolean default: false description: Indicates whether the Mail Order and Telephone Order (MOTO) payments are allowed allow_telephone_payment_notifications: type: boolean default: false description: Indicates if the account is used for telephone payments reporting allow_zero_amount: type: boolean default: false description: Set to true to support charges with a zero amount example: true analytics_id: type: string description: An identifier used to identify the service in Google Analytics. The default value is null block_prepaid_cards: type: boolean default: false description: Whether pre-paid cards are allowed as a payment method for this gateway account example: true corporate_credit_card_surcharge_amount: type: integer format: int64 default: 0 description: A corporate credit card surcharge amount in pence example: 250 corporate_debit_card_surcharge_amount: type: integer format: int64 default: 0 description: A corporate debit card surcharge amount in pence example: 250 corporate_prepaid_debit_card_surcharge_amount: type: integer format: int64 description: A corporate prepaid debit card surcharge amount in pence example: 0 description: type: string default: "null" description: An internal description to identify the gateway account. The default value is null. example: Account for service xxx disabled: type: boolean default: false description: Flag to indicate whether the account is allowed to take payments and make refunds example: false disabled_reason: type: string description: "The reason the account is disabled, if applicable" example: No longer required email_collection_mode: type: string description: "Whether email address is required from paying users. Can be\ \ MANDATORY, OPTIONAL or OFF" enum: - MANDATORY - OPTIONAL - "OFF" email_notifications: type: object additionalProperties: $ref: "#/components/schemas/EmailNotificationEntity" description: The settings for the different emails (payments/refunds) that are sent out example: PAYMENT_CONFIRMED: enabled: true template_body: null version: 1 REFUND_ISSUED: enabled: true template_body: null version: 1 external_id: type: string description: External ID for the gateway account example: fbf905a3f7ea416c8c252410eb45ddbd gateway_account_credentials: type: array description: Array of the credentials configured for this account items: $ref: "#/components/schemas/GatewayAccountCredentials" gateway_account_id: type: integer format: int64 description: The account ID example: 1 integration_version_3ds: type: integer format: int32 description: 3DS version used for payments for the gateway account example: 2 live: type: boolean description: Whether the account is live example: true moto_mask_card_number_input: type: boolean default: false description: Indicates whether the card number is masked when being input for MOTO payments. The default value is false. moto_mask_card_security_code_input: type: boolean default: false description: Indicates whether the card security code is masked when being input for MOTO payments. notifySettings: type: object additionalProperties: type: string description: An object containing the Notify credentials and configuration for sending custom branded emails description: An object containing the Notify credentials and configuration for sending custom branded emails payment_provider: type: string description: The payment provider for which this account is created example: sandbox provider_switch_enabled: type: boolean default: false description: Flag to enable payment provider switching example: false recurring_enabled: type: boolean default: false description: Flag to indicate whether the account is allowed to take recurring card payments example: true requires3ds: type: boolean description: Flag to indicate whether 3DS is enabled example: true send_payer_email_to_gateway: type: boolean default: false description: "If enabled, user email address is included in the authorisation\ \ request to gateway" example: true send_payer_ip_address_to_gateway: type: boolean default: false description: "If enabled, user IP address is sent to to gateway" example: true send_reference_to_gateway: type: boolean default: false description: "If enabled, service payment reference is sent to gateway as\ \ description. Otherwise payment description is sent to the gateway. Only\ \ applicable for Worldpay accounts. Default value is 'false'" example: true service_id: type: string description: Service external ID example: cd1b871207a94a7fa157dee678146acd service_name: type: string description: The service name for the account example: service name type: type: string description: Account type for the payment provider (test/live) example: test worldpay_3ds_flex: $ref: "#/components/schemas/Worldpay3dsFlexCredentials" GatewayAccountWithCredentialsWithInternalIdResponse: type: object properties: _links: type: object additionalProperties: type: object additionalProperties: type: string format: uri example: "{ { \"href\": \"https://connector.url/v1/api/accounts/1\"\ , \"rel\": \"self\", \"method\": \"GET\" \ \ } }" example: "{ { \"href\": \"https://connector.url/v1/api/accounts/1\"\ , \"rel\": \"self\", \"method\": \"GET\" \ \ } }" example: "{ { \"href\": \"https://connector.url/v1/api/accounts/1\"\ , \"rel\": \"self\", \"method\": \"GET\" \ \ } }" allow_apple_pay: type: boolean default: false description: Set to true to enable Apple Pay example: true allow_authorisation_api: type: boolean default: false description: Flag to indicate whether the account is allowed to initiate MOTO payments that are authorised via an API request rather than the web interface example: true allow_google_pay: type: boolean default: false description: Set to true to enable Google Pay example: true allow_moto: type: boolean default: false description: Indicates whether the Mail Order and Telephone Order (MOTO) payments are allowed allow_telephone_payment_notifications: type: boolean default: false description: Indicates if the account is used for telephone payments reporting allow_zero_amount: type: boolean default: false description: Set to true to support charges with a zero amount example: true analytics_id: type: string description: An identifier used to identify the service in Google Analytics. The default value is null block_prepaid_cards: type: boolean default: false description: Whether pre-paid cards are allowed as a payment method for this gateway account example: true corporate_credit_card_surcharge_amount: type: integer format: int64 default: 0 description: A corporate credit card surcharge amount in pence example: 250 corporate_debit_card_surcharge_amount: type: integer format: int64 default: 0 description: A corporate debit card surcharge amount in pence example: 250 corporate_prepaid_debit_card_surcharge_amount: type: integer format: int64 description: A corporate prepaid debit card surcharge amount in pence example: 0 description: type: string default: "null" description: An internal description to identify the gateway account. The default value is null. example: Account for service xxx disabled: type: boolean default: false description: Flag to indicate whether the account is allowed to take payments and make refunds example: false disabled_reason: type: string description: "The reason the account is disabled, if applicable" example: No longer required email_collection_mode: type: string description: "Whether email address is required from paying users. Can be\ \ MANDATORY, OPTIONAL or OFF" enum: - MANDATORY - OPTIONAL - "OFF" email_notifications: type: object additionalProperties: $ref: "#/components/schemas/EmailNotificationEntity" description: The settings for the different emails (payments/refunds) that are sent out example: PAYMENT_CONFIRMED: enabled: true template_body: null version: 1 REFUND_ISSUED: enabled: true template_body: null version: 1 external_id: type: string description: External ID for the gateway account example: fbf905a3f7ea416c8c252410eb45ddbd gateway_account_credentials: type: array description: Array of the credentials configured for this account items: $ref: "#/components/schemas/GatewayAccountCredentialsWithInternalId" gateway_account_id: type: integer format: int64 description: The account ID example: 1 integration_version_3ds: type: integer format: int32 description: 3DS version used for payments for the gateway account example: 2 live: type: boolean description: Whether the account is live example: true moto_mask_card_number_input: type: boolean default: false description: Indicates whether the card number is masked when being input for MOTO payments. The default value is false. moto_mask_card_security_code_input: type: boolean default: false description: Indicates whether the card security code is masked when being input for MOTO payments. notifySettings: type: object additionalProperties: type: string description: An object containing the Notify credentials and configuration for sending custom branded emails description: An object containing the Notify credentials and configuration for sending custom branded emails payment_provider: type: string description: The payment provider for which this account is created example: sandbox provider_switch_enabled: type: boolean default: false description: Flag to enable payment provider switching example: false recurring_enabled: type: boolean default: false description: Flag to indicate whether the account is allowed to take recurring card payments example: true requires3ds: type: boolean description: Flag to indicate whether 3DS is enabled example: true send_payer_email_to_gateway: type: boolean default: false description: "If enabled, user email address is included in the authorisation\ \ request to gateway" example: true send_payer_ip_address_to_gateway: type: boolean default: false description: "If enabled, user IP address is sent to to gateway" example: true send_reference_to_gateway: type: boolean default: false description: "If enabled, service payment reference is sent to gateway as\ \ description. Otherwise payment description is sent to the gateway. Only\ \ applicable for Worldpay accounts. Default value is 'false'" example: true service_id: type: string description: Service external ID example: cd1b871207a94a7fa157dee678146acd service_name: type: string description: The service name for the account example: service name type: type: string description: Account type for the payment provider (test/live) example: test worldpay_3ds_flex: $ref: "#/components/schemas/Worldpay3dsFlexCredentials" GatewayAccountsListDTO: type: object properties: accounts: type: array items: $ref: "#/components/schemas/GatewayAccountResponse" GatewayCredentials: type: object oneOf: - $ref: "#/components/schemas/WorldpayCredentials" - $ref: "#/components/schemas/StripeCredentials" - $ref: "#/components/schemas/EpdqCredentials" GatewayStatusComparison: type: object properties: chargeId: type: string example: 2c6vtn9pth38ppbmnt20d57t49 gatewayExternalStatus: type: string enum: - EXTERNAL_CREATED - EXTERNAL_STARTED - EXTERNAL_SUBMITTED - EXTERNAL_CAPTURABLE - EXTERNAL_SUCCESS - EXTERNAL_FAILED_REJECTED - EXTERNAL_FAILED_EXPIRED - EXTERNAL_FAILED_CANCELLED - EXTERNAL_CANCELLED - EXTERNAL_ERROR_GATEWAY example: EXTERNAL_SUBMITTED gatewayStatus: type: string enum: - UNDEFINED - CREATED - PAYMENT NOTIFICATION CREATED - ENTERING CARD DETAILS - AUTHORISATION ABORTED - AUTHORISATION READY - AUTHORISATION 3DS REQUIRED - AUTHORISATION 3DS READY - AUTHORISATION SUBMITTED - AUTHORISATION SUCCESS - AUTHORISATION REJECTED - AUTHORISATION CANCELLED - AUTHORISATION ERROR - AUTHORISATION TIMEOUT - AUTHORISATION UNEXPECTED ERROR - AWAITING CAPTURE REQUEST - CAPTURE APPROVED - CAPTURE APPROVED RETRY - CAPTURE READY - CAPTURED - CAPTURE SUBMITTED - CAPTURE ERROR - CAPTURE QUEUED - AUTHORISATION USER NOT PRESENT QUEUED - EXPIRE CANCEL READY - EXPIRE CANCEL FAILED - EXPIRE CANCEL SUBMITTED - EXPIRED - SYSTEM CANCEL READY - SYSTEM CANCEL ERROR - SYSTEM CANCEL SUBMITTED - SYSTEM CANCELLED - USER CANCEL READY - USER CANCEL SUBMITTED - USER CANCELLED - USER CANCEL ERROR - AUTHORISATION ERROR CANCELLED - AUTHORISATION ERROR REJECTED - AUTHORISATION ERROR CHARGE MISSING example: AUTHORISED payExternalStatus: type: string example: EXTERNAL_SUBMITTED payStatus: type: string enum: - UNDEFINED - CREATED - PAYMENT NOTIFICATION CREATED - ENTERING CARD DETAILS - AUTHORISATION ABORTED - AUTHORISATION READY - AUTHORISATION 3DS REQUIRED - AUTHORISATION 3DS READY - AUTHORISATION SUBMITTED - AUTHORISATION SUCCESS - AUTHORISATION REJECTED - AUTHORISATION CANCELLED - AUTHORISATION ERROR - AUTHORISATION TIMEOUT - AUTHORISATION UNEXPECTED ERROR - AWAITING CAPTURE REQUEST - CAPTURE APPROVED - CAPTURE APPROVED RETRY - CAPTURE READY - CAPTURED - CAPTURE SUBMITTED - CAPTURE ERROR - CAPTURE QUEUED - AUTHORISATION USER NOT PRESENT QUEUED - EXPIRE CANCEL READY - EXPIRE CANCEL FAILED - EXPIRE CANCEL SUBMITTED - EXPIRED - SYSTEM CANCEL READY - SYSTEM CANCEL ERROR - SYSTEM CANCEL SUBMITTED - SYSTEM CANCELLED - USER CANCEL READY - USER CANCEL SUBMITTED - USER CANCELLED - USER CANCEL ERROR - AUTHORISATION ERROR CANCELLED - AUTHORISATION ERROR REJECTED - AUTHORISATION ERROR CHARGE MISSING example: AUTHORISATION SUCCESS processed: type: boolean rawGatewayResponse: type: string example: Worldpay response () GooglePayAuthRequest: type: object properties: encrypted_payment_data: $ref: "#/components/schemas/GooglePayEncryptedPaymentData" payment_info: $ref: "#/components/schemas/GooglePayPaymentInfo" token_id: type: string description: only required for Stripe payments writeOnly: true GooglePayEncryptedPaymentData: type: object description: only required for Worldpay and Sandbox payments properties: protocol_version: type: string example: ECv1 writeOnly: true signature: type: string example: MEQCIB54h8T/hWY3864Ufkwo4SF5IjhoMV9hjpJRIsqbAn4LAiBZz1VBZ+aiaduX8MN3dBtzyDOZVstwG/8bqJZDbrhKfQ= minLength: 1 signed_message: type: string example: aSignedMessage writeOnly: true required: - signature GooglePayPaymentInfo: type: object properties: accept_header: type: string example: "text/html;q=1.0, */*;q=0.9" brand: type: string example: visa card_type: type: string enum: - DEBIT - CREDIT - CREDIT_OR_DEBIT example: DEBIT cardholder_name: type: string example: Joe B maxLength: 255 email: type: string example: mr@payment.test maxLength: 254 ip_address: type: string example: 203.0.113.1 last_digits_card_number: type: string description: last digits card number example: "4242" user_agent_header: type: string example: Mozilla/5.0 worldpay_3ds_flex_ddc_result: type: string description: SessionId returned by Worldpay/CardinalCommerce as part of device data collection. Applicable for Google Pay payments only example: 1f1154b7-620d-4654-801b-893b5bb22db1 JsonNode: type: object LastDigitsCardNumber: type: object description: The last 4 digits of the card the user paid with. example: 4242 MotoApiAuthoriseRequest: type: object properties: card_number: type: string example: "4242424242424242" maxLength: 19 minLength: 12 cardholder_name: type: string description: Cardholder name example: Joe B maxLength: 255 minLength: 1 cvc: type: string example: "123" maxLength: 4 minLength: 3 expiry_date: type: string description: 5 character string in MM/YY format example: 01/99 maxLength: 5 minLength: 5 one_time_token: type: string description: the one time token provided in the `auth_url_post` link of the create payment API response example: 123abc123 minLength: 1 required: - card_number - cardholder_name - cvc - expiry_date - one_time_token NewChargeStatusRequest: type: object properties: new_status: type: string description: Only `ENTERING CARD DETAILS` is allowed example: ENTERING CARD DETAILS minLength: 1 required: - new_status Outcome: type: object description: Object containing information about the outcome of the 3ds exemption request example: honoured properties: result: type: string description: Indicating the result if 3ds exemption was requested for the payment. enum: - not requested - honoured - rejected - out of scope example: honoured PaymentOutcome: type: object description: Only applicable for telephone payments reported. Outcome after the payment has been authorised with payment provider properties: code: type: string description: Error code example: P0010 status: type: string example: failed supplemental: $ref: "#/components/schemas/Supplemental" PersistedCard: type: object properties: billing_address: $ref: "#/components/schemas/Address" card_brand: type: string example: Visa card_type: type: string enum: - CREDIT - DEBIT example: debit cardholder_name: type: string description: The cardholder name the user entered when they paid. example: Joe B expiry_date: $ref: "#/components/schemas/CardExpiryDate" first_digits_card_number: $ref: "#/components/schemas/FirstDigitsCardNumber" last_digits_card_number: $ref: "#/components/schemas/LastDigitsCardNumber" PrefilledAddress: type: object description: A structure representing the billing address of a card properties: city: type: string example: London maxLength: 255 minLength: 0 country: type: string example: GB county: type: string example: country maxLength: 255 minLength: 0 line1: type: string example: address line 1 maxLength: 255 minLength: 0 line2: type: string example: address line 2 maxLength: 255 minLength: 0 postcode: type: string example: AB1 2CD maxLength: 25 minLength: 0 PrefilledCardHolderDetails: type: object properties: billing_address: $ref: "#/components/schemas/PrefilledAddress" cardholder_name: type: string description: prefilled cardholder name example: Joe B RefundRequest: type: object properties: amount: type: integer format: int64 description: Amount to refund in pence example: 3444 refund_amount_available: type: integer format: int64 description: Total amount still available before issuing the refund example: 30000 user_email: type: string description: Email address of the user refunding payment example: joeb@example.org user_external_id: type: string description: The ID of the user who issued the refund example: "3444" required: - amount - refund_amount_available RefundSummary: type: object description: Provides refund amount available and the amount that has already been submitted for refund properties: amount_available: type: integer format: int64 description: Amount available for refund in pence example: 100 amount_submitted: type: integer format: int64 description: Amount submitted for refunds on this Payment in pence example: 0 status: type: string description: Availability status of the refund example: available user_external_id: type: string description: User external ID issuing refund example: sk03k2pojvsojd1po2joij92pspodrkwpenl ServicePaymentReference: type: object description: Service reference for the payment example: payment reference SettlementSummary: type: object description: "Provides a settlement summary of the charge containing date and\ \ time of capture, if present" properties: capture_submit_time: type: string description: Date and time capture request has been submitted. May be null if capture request was not immediately acknowledged by payment gateway. example: 2022-06-28T09:26:45.715Z capturedTime: type: string format: date-time writeOnly: true captured_date: type: string description: Date of the capture event example: 2022-06-28 State: type: object properties: code: type: string example: P0040 finished: type: boolean example: true message: type: string example: Payment was cancelled by service status: type: string example: cancelled StripeAccountResponse: type: object properties: stripe_account_id: type: string example: acct_123example123 required: - stripe_account_id StripeAccountSetup: type: object properties: bank_account: type: boolean company_number: type: boolean director: type: boolean government_entity_document: type: boolean organisation_details: type: boolean responsible_person: type: boolean vat_number: type: boolean StripeCredentials: type: object properties: stripe_account_id: type: string StripeGatewayAccountRequest: type: object allOf: - $ref: "#/components/schemas/GatewayAccountRequest" - type: object properties: allow_apple_pay: type: boolean writeOnly: true allow_google_pay: type: boolean writeOnly: true analytics_id: type: string writeOnly: true credentials: $ref: "#/components/schemas/StripeCredentials" description: type: string payment_provider: type: string writeOnly: true requires_3ds: type: boolean writeOnly: true send_payer_email_to_gateway: type: boolean writeOnly: true send_payer_ip_address_to_gateway: type: boolean writeOnly: true service_id: type: string writeOnly: true service_name: type: string writeOnly: true type: type: string writeOnly: true StripeSetupPatchRequest: type: object properties: op: type: string path: type: string value: type: string Supplemental: type: object properties: error_code: type: string example: E1234 error_message: type: string example: The payment card does not exist TelephoneChargeCreateRequest: type: object properties: amount: type: integer format: int64 description: Amount in pence example: 100 maximum: 10000000 auth_code: type: string description: Authorisation ID received from payment provider when the payment was authorised example: "91011" maxLength: 50 authorised_date: type: string description: "Date and time when payment service provider authorised the\ \ payment. Must be in ISO 8601-1 datetime format, including the time zone" example: 2022-06-28T16:05:33Z maxLength: 50 card_expiry: $ref: "#/components/schemas/CardExpiryDate" card_type: type: string description: "card_type and must be one of the following strings: master-card,\ \ visa, maestro, diners-club, american-express, jcb" example: debit created_date: type: string description: "Date and time the payment was initiated. Must be in ISO 8601-1\ \ datetime format, including time zone " example: 2022-06-28T09:24:45.715Z maximum: 50 description: type: string description: The payment description example: payment description maxLength: 255 email_address: type: string description: user's email address example: Joe.Bogs@example.org first_six_digits: type: string description: First 6 digits of user's payment card example: "424242" last_four_digits: type: string description: Last 4 digits of user's payment card example: "4242" name_on_card: type: string description: user's name on the front of their payment card example: Joe B payment_outcome: $ref: "#/components/schemas/PaymentOutcome" processor_id: type: string description: unique supplier internal reference number associated with the payment example: "12345" provider_id: type: string description: Gateway transaction ID example: "45678" reference: type: string description: service payment reference example: payment reference maxLength: 255 telephone_number: type: string description: user's telephone number example: "+44000000000" maxLength: 50 required: - amount - description - payment_outcome - processor_id - provider_id - reference ThreeDSecure: type: object description: Object containing information about the 3D Secure authentication of the payment properties: required: type: boolean description: Flag indicating whether the payment required 3D Secure authentication. example: true version: type: string description: 3DS version used to authorise payment example: 2.1.0 TokenResponse: type: object properties: charge: $ref: "#/components/schemas/FrontendChargeResponse" used: type: boolean description: true or false depending on whether the token has been marked as used or not TransactionEvent: type: object properties: amount: type: integer format: int64 example: 100 refund_reference: type: string state: $ref: "#/components/schemas/State" submitted_by: type: string type: type: string enum: - PAYMENT - REFUND example: PAYMENT updated: type: string example: 2022-06-28T10:41:40.460Z Update3dsToggleRequest: type: object properties: toggle_3ds: type: boolean required: - toggle_3ds UpdateServiceNameRequest: type: object properties: service_name: type: string required: - service_name ValidationResult: type: object properties: result: type: string description: valid/invalid result for Worldpay flex credentials example: valid Worldpay3dsFlexCredentials: type: object properties: corporate_exemptions_enabled: type: boolean example: false exemption_engine_enabled: type: boolean example: true issuer: type: string example: issuer organisational_unit_id: type: string example: org_unit_id Worldpay3dsFlexCredentialsRequest: type: object properties: issuer: type: string description: "Lower-case hexadecimal characters. Should only contain characters\ \ [0-9a-f]" example: 53f0917f101a4428b69d5fb0 maxLength: 24 minLength: 24 jwt_mac_key: type: string description: UUID in lowercase canonical representation example: 4cabd5d2-0133-4e82-b0e5-2024dbeddaa9 organisational_unit_id: type: string description: "Lower-case hexadecimal characters. Should only contain characters\ \ [0-9a-f]" example: 57992a087a0c4849895ab8a2 maxLength: 24 minLength: 24 WorldpayCredentials: type: object properties: gateway_merchant_id: type: string one_off_customer_initiated: $ref: "#/components/schemas/WorldpayMerchantCodeCredentials" recurring_customer_initiated: $ref: "#/components/schemas/WorldpayMerchantCodeCredentials" recurring_merchant_initiated: $ref: "#/components/schemas/WorldpayMerchantCodeCredentials" WorldpayMerchantCodeCredentials: type: object properties: merchant_code: type: string username: type: string WorldpayValidatableCredentials: type: object properties: merchant_code: type: string merchant_id: type: string password: type: string minLength: 1 username: type: string minLength: 1 required: - password - username