java.lang.Object
com.worldline.acquiring.sdk.java.ApiResource
com.worldline.acquiring.sdk.java.v1.acquirer.merchant.cardpayments.CardPaymentsClient

public class CardPaymentsClient extends ApiResource
CardPayments client. Thread-safe.
  • Constructor Details

  • Method Details

    • processPayment

      public ApiPaymentResponse processPayment(ApiPaymentRequest body)
      Resource /processing/v1/{acquirerId}/{merchantId}/payments - Create payment
      Parameters:
      body - ApiPaymentRequest
      Returns:
      ApiPaymentResponse
      Throws:
      ValidationException - if the request was not correct and couldn't be processed (HTTP status code 400)
      AuthorizationException - if the request was not allowed (HTTP status code 403)
      ReferenceException - if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
      PlatformException - if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
      ApiException - if the Worldline Acquiring platform returned any other error
    • processPayment

      public ApiPaymentResponse processPayment(ApiPaymentRequest body, CallContext context)
      Resource /processing/v1/{acquirerId}/{merchantId}/payments - Create payment
      Parameters:
      body - ApiPaymentRequest
      context - CallContext
      Returns:
      ApiPaymentResponse
      Throws:
      ValidationException - if the request was not correct and couldn't be processed (HTTP status code 400)
      AuthorizationException - if the request was not allowed (HTTP status code 403)
      ReferenceException - if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
      PlatformException - if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
      ApiException - if the Worldline Acquiring platform returned any other error
    • getPaymentStatus

      public ApiPaymentResource getPaymentStatus(String paymentId, GetPaymentStatusParams query)
      Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId} - Retrieve payment
      Parameters:
      paymentId - String
      query - GetPaymentStatusParams
      Returns:
      ApiPaymentResource
      Throws:
      ValidationException - if the request was not correct and couldn't be processed (HTTP status code 400)
      AuthorizationException - if the request was not allowed (HTTP status code 403)
      ReferenceException - if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
      PlatformException - if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
      ApiException - if the Worldline Acquiring platform returned any other error
    • getPaymentStatus

      public ApiPaymentResource getPaymentStatus(String paymentId, GetPaymentStatusParams query, CallContext context)
      Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId} - Retrieve payment
      Parameters:
      paymentId - String
      query - GetPaymentStatusParams
      context - CallContext
      Returns:
      ApiPaymentResource
      Throws:
      ValidationException - if the request was not correct and couldn't be processed (HTTP status code 400)
      AuthorizationException - if the request was not allowed (HTTP status code 403)
      ReferenceException - if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
      PlatformException - if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
      ApiException - if the Worldline Acquiring platform returned any other error
    • simpleCaptureOfPayment

      public ApiActionResponse simpleCaptureOfPayment(String paymentId, ApiCaptureRequest body)
      Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId}/captures - Capture payment
      Parameters:
      paymentId - String
      body - ApiCaptureRequest
      Returns:
      ApiActionResponse
      Throws:
      ValidationException - if the request was not correct and couldn't be processed (HTTP status code 400)
      AuthorizationException - if the request was not allowed (HTTP status code 403)
      ReferenceException - if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
      PlatformException - if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
      ApiException - if the Worldline Acquiring platform returned any other error
    • simpleCaptureOfPayment

      public ApiActionResponse simpleCaptureOfPayment(String paymentId, ApiCaptureRequest body, CallContext context)
      Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId}/captures - Capture payment
      Parameters:
      paymentId - String
      body - ApiCaptureRequest
      context - CallContext
      Returns:
      ApiActionResponse
      Throws:
      ValidationException - if the request was not correct and couldn't be processed (HTTP status code 400)
      AuthorizationException - if the request was not allowed (HTTP status code 403)
      ReferenceException - if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
      PlatformException - if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
      ApiException - if the Worldline Acquiring platform returned any other error
    • reverseAuthorization

      public ApiReversalResponse reverseAuthorization(String paymentId, ApiPaymentReversalRequest body)
      Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId}/authorization-reversals - Reverse authorization
      Parameters:
      paymentId - String
      body - ApiPaymentReversalRequest
      Returns:
      ApiReversalResponse
      Throws:
      ValidationException - if the request was not correct and couldn't be processed (HTTP status code 400)
      AuthorizationException - if the request was not allowed (HTTP status code 403)
      ReferenceException - if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
      PlatformException - if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
      ApiException - if the Worldline Acquiring platform returned any other error
    • reverseAuthorization

      public ApiReversalResponse reverseAuthorization(String paymentId, ApiPaymentReversalRequest body, CallContext context)
      Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId}/authorization-reversals - Reverse authorization
      Parameters:
      paymentId - String
      body - ApiPaymentReversalRequest
      context - CallContext
      Returns:
      ApiReversalResponse
      Throws:
      ValidationException - if the request was not correct and couldn't be processed (HTTP status code 400)
      AuthorizationException - if the request was not allowed (HTTP status code 403)
      ReferenceException - if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
      PlatformException - if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
      ApiException - if the Worldline Acquiring platform returned any other error
    • incrementPayment

      public ApiIncrementResponse incrementPayment(String paymentId, ApiIncrementRequest body)
      Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId}/increments - Increment authorization
      Parameters:
      paymentId - String
      body - ApiIncrementRequest
      Returns:
      ApiIncrementResponse
      Throws:
      ValidationException - if the request was not correct and couldn't be processed (HTTP status code 400)
      AuthorizationException - if the request was not allowed (HTTP status code 403)
      ReferenceException - if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
      PlatformException - if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
      ApiException - if the Worldline Acquiring platform returned any other error
    • incrementPayment

      public ApiIncrementResponse incrementPayment(String paymentId, ApiIncrementRequest body, CallContext context)
      Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId}/increments - Increment authorization
      Parameters:
      paymentId - String
      body - ApiIncrementRequest
      context - CallContext
      Returns:
      ApiIncrementResponse
      Throws:
      ValidationException - if the request was not correct and couldn't be processed (HTTP status code 400)
      AuthorizationException - if the request was not allowed (HTTP status code 403)
      ReferenceException - if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
      PlatformException - if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
      ApiException - if the Worldline Acquiring platform returned any other error
    • createRefund

      public ApiActionResponseForRefund createRefund(String paymentId, ApiPaymentRefundRequest body)
      Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId}/refunds - Refund card payment
      Parameters:
      paymentId - String
      body - ApiPaymentRefundRequest
      Returns:
      ApiActionResponseForRefund
      Throws:
      ValidationException - if the request was not correct and couldn't be processed (HTTP status code 400)
      AuthorizationException - if the request was not allowed (HTTP status code 403)
      ReferenceException - if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
      PlatformException - if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
      ApiException - if the Worldline Acquiring platform returned any other error
    • createRefund

      public ApiActionResponseForRefund createRefund(String paymentId, ApiPaymentRefundRequest body, CallContext context)
      Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId}/refunds - Refund card payment
      Parameters:
      paymentId - String
      body - ApiPaymentRefundRequest
      context - CallContext
      Returns:
      ApiActionResponseForRefund
      Throws:
      ValidationException - if the request was not correct and couldn't be processed (HTTP status code 400)
      AuthorizationException - if the request was not allowed (HTTP status code 403)
      ReferenceException - if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
      PlatformException - if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
      ApiException - if the Worldline Acquiring platform returned any other error