Interface PaymentsClientInterface
- All Known Implementing Classes:
PaymentsClient
public interface PaymentsClientInterface
Payments client. Thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptioncancelPayment(String paymentId, CancelPaymentRequest body) Resource /v2/{merchantId}/payments/{paymentId}/cancel - Cancel paymentcancelPayment(String paymentId, CancelPaymentRequest body, CallContext context) Resource /v2/{merchantId}/payments/{paymentId}/cancel - Cancel paymentcapturePayment(String paymentId, CapturePaymentRequest body) Resource /v2/{merchantId}/payments/{paymentId}/capture - Capture paymentcapturePayment(String paymentId, CapturePaymentRequest body, CallContext context) Resource /v2/{merchantId}/payments/{paymentId}/capture - Capture paymentResource /v2/{merchantId}/payments - Create paymentcreatePayment(CreatePaymentRequest body, CallContext context) Resource /v2/{merchantId}/payments - Create paymentgetPayment(String paymentId) Resource /v2/{merchantId}/payments/{paymentId} - Get paymentgetPayment(String paymentId, CallContext context) Resource /v2/{merchantId}/payments/{paymentId} - Get paymentgetPaymentDetails(String paymentId) Resource /v2/{merchantId}/payments/{paymentId}/details - Get payment detailsgetPaymentDetails(String paymentId, CallContext context) Resource /v2/{merchantId}/payments/{paymentId}/details - Get payment detailsrefundPayment(String paymentId, RefundRequest body) Resource /v2/{merchantId}/payments/{paymentId}/refund - Refund paymentrefundPayment(String paymentId, RefundRequest body, CallContext context) Resource /v2/{merchantId}/payments/{paymentId}/refund - Refund paymentsubsequentPayment(String paymentId, SubsequentPaymentRequest body) Resource /v2/{merchantId}/payments/{paymentId}/subsequent - Subsequent paymentsubsequentPayment(String paymentId, SubsequentPaymentRequest body, CallContext context) Resource /v2/{merchantId}/payments/{paymentId}/subsequent - Subsequent payment
-
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- CreatePaymentRequestcontext- 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
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
Resource /v2/{merchantId}/payments/{paymentId} - Get payment- Parameters:
paymentId- Stringcontext- 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
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
Resource /v2/{merchantId}/payments/{paymentId}/details - Get payment details- Parameters:
paymentId- Stringcontext- 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
Resource /v2/{merchantId}/payments/{paymentId}/cancel - Cancel payment- Parameters:
paymentId- Stringbody- 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- Stringbody- CancelPaymentRequestcontext- 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
Resource /v2/{merchantId}/payments/{paymentId}/capture - Capture payment- Parameters:
paymentId- Stringbody- 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
Resource /v2/{merchantId}/payments/{paymentId}/capture - Capture payment- Parameters:
paymentId- Stringbody- CapturePaymentRequestcontext- 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
Resource /v2/{merchantId}/payments/{paymentId}/refund - Refund payment- Parameters:
paymentId- Stringbody- 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
Resource /v2/{merchantId}/payments/{paymentId}/refund - Refund payment- Parameters:
paymentId- Stringbody- RefundRequestcontext- 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
Resource /v2/{merchantId}/payments/{paymentId}/subsequent - Subsequent payment- Parameters:
paymentId- Stringbody- 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- Stringbody- SubsequentPaymentRequestcontext- 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
-