Interface PaymentsClientInterface

All Known Implementing Classes:
PaymentsClient

public interface PaymentsClientInterface
Payments client. Thread-safe.
  • Method Details

    • createPayment

      Resource /v2/{merchantId}/payments - Create payment
      Parameters:
      body - CreatePaymentRequest
      Returns:
      CreatePaymentResponse
      Throws:
      DeclinedPaymentException - if the payment platform declined / rejected the payment. The payment result will be available from the exception.
      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 payment platform, the payment 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 payment platform returned any other error
    • createPayment

      Resource /v2/{merchantId}/payments - Create payment
      Parameters:
      body - CreatePaymentRequest
      context - CallContext
      Returns:
      CreatePaymentResponse
      Throws:
      DeclinedPaymentException - if the payment platform declined / rejected the payment. The payment result will be available from the exception.
      IdempotenceException - if an idempotent request caused a conflict (HTTP status code 409)
      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 payment platform, the payment 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 payment platform returned any other error
    • getPayment

      PaymentResponse getPayment(String paymentId)
      Resource /v2/{merchantId}/payments/{paymentId} - Get payment
      Parameters:
      paymentId - String
      Returns:
      PaymentResponse
      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 payment platform, the payment 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 payment platform returned any other error
    • getPayment

      PaymentResponse getPayment(String paymentId, CallContext context)
      Resource /v2/{merchantId}/payments/{paymentId} - Get payment
      Parameters:
      paymentId - String
      context - CallContext
      Returns:
      PaymentResponse
      Throws:
      IdempotenceException - if an idempotent request caused a conflict (HTTP status code 409)
      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 payment platform, the payment 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 payment platform returned any other error
    • getPaymentDetails

      PaymentDetailsResponse getPaymentDetails(String paymentId)
      Resource /v2/{merchantId}/payments/{paymentId}/details - Get payment details
      Parameters:
      paymentId - String
      Returns:
      PaymentDetailsResponse
      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 payment platform, the payment 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 payment platform returned any other error
    • getPaymentDetails

      PaymentDetailsResponse getPaymentDetails(String paymentId, CallContext context)
      Resource /v2/{merchantId}/payments/{paymentId}/details - Get payment details
      Parameters:
      paymentId - String
      context - CallContext
      Returns:
      PaymentDetailsResponse
      Throws:
      IdempotenceException - if an idempotent request caused a conflict (HTTP status code 409)
      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 payment platform, the payment 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 payment platform returned any other error
    • cancelPayment

      CancelPaymentResponse cancelPayment(String paymentId, CancelPaymentRequest body)
      Resource /v2/{merchantId}/payments/{paymentId}/cancel - Cancel payment
      Parameters:
      paymentId - String
      body - CancelPaymentRequest
      Returns:
      CancelPaymentResponse
      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 payment platform, the payment 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 payment platform returned any other error
    • cancelPayment

      CancelPaymentResponse cancelPayment(String paymentId, CancelPaymentRequest body, CallContext context)
      Resource /v2/{merchantId}/payments/{paymentId}/cancel - Cancel payment
      Parameters:
      paymentId - String
      body - CancelPaymentRequest
      context - CallContext
      Returns:
      CancelPaymentResponse
      Throws:
      IdempotenceException - if an idempotent request caused a conflict (HTTP status code 409)
      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 payment platform, the payment 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 payment platform returned any other error
    • capturePayment

      CaptureResponse capturePayment(String paymentId, CapturePaymentRequest body)
      Resource /v2/{merchantId}/payments/{paymentId}/capture - Capture payment
      Parameters:
      paymentId - String
      body - CapturePaymentRequest
      Returns:
      CaptureResponse
      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 payment platform, the payment 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 payment platform returned any other error
    • capturePayment

      CaptureResponse capturePayment(String paymentId, CapturePaymentRequest body, CallContext context)
      Resource /v2/{merchantId}/payments/{paymentId}/capture - Capture payment
      Parameters:
      paymentId - String
      body - CapturePaymentRequest
      context - CallContext
      Returns:
      CaptureResponse
      Throws:
      IdempotenceException - if an idempotent request caused a conflict (HTTP status code 409)
      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 payment platform, the payment 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 payment platform returned any other error
    • refundPayment

      RefundResponse refundPayment(String paymentId, RefundRequest body)
      Resource /v2/{merchantId}/payments/{paymentId}/refund - Refund payment
      Parameters:
      paymentId - String
      body - RefundRequest
      Returns:
      RefundResponse
      Throws:
      DeclinedRefundException - if the payment platform declined / rejected the refund. The refund result will be available from the exception.
      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 payment platform, the payment 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 payment platform returned any other error
    • refundPayment

      RefundResponse refundPayment(String paymentId, RefundRequest body, CallContext context)
      Resource /v2/{merchantId}/payments/{paymentId}/refund - Refund payment
      Parameters:
      paymentId - String
      body - RefundRequest
      context - CallContext
      Returns:
      RefundResponse
      Throws:
      DeclinedRefundException - if the payment platform declined / rejected the refund. The refund result will be available from the exception.
      IdempotenceException - if an idempotent request caused a conflict (HTTP status code 409)
      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 payment platform, the payment 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 payment platform returned any other error
    • subsequentPayment

      SubsequentPaymentResponse subsequentPayment(String paymentId, SubsequentPaymentRequest body)
      Resource /v2/{merchantId}/payments/{paymentId}/subsequent - Subsequent payment
      Parameters:
      paymentId - String
      body - SubsequentPaymentRequest
      Returns:
      SubsequentPaymentResponse
      Throws:
      DeclinedPaymentException - if the payment platform declined / rejected the payment. The payment result will be available from the exception.
      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 payment platform, the payment 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 payment platform returned any other error
    • subsequentPayment

      SubsequentPaymentResponse subsequentPayment(String paymentId, SubsequentPaymentRequest body, CallContext context)
      Resource /v2/{merchantId}/payments/{paymentId}/subsequent - Subsequent payment
      Parameters:
      paymentId - String
      body - SubsequentPaymentRequest
      context - CallContext
      Returns:
      SubsequentPaymentResponse
      Throws:
      DeclinedPaymentException - if the payment platform declined / rejected the payment. The payment result will be available from the exception.
      IdempotenceException - if an idempotent request caused a conflict (HTTP status code 409)
      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 payment platform, the payment 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 payment platform returned any other error