public static final class PaymentService.PaymentCancelRequest extends PostRequest<Payment>
Request class for PaymentService.cancel(java.lang.String)
.
Cancels the payment if it has not already been submitted to the banks. Any metadata supplied to this endpoint will be stored on the payment cancellation event it causes.
This will fail with a cancellation_failed
error unless the payment’s status is pending_submission
.
Modifier and Type | Method and Description |
---|---|
PaymentService.PaymentCancelRequest |
withHeader(java.lang.String headerName,
java.lang.String headerValue) |
PaymentService.PaymentCancelRequest |
withMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Key-value store of custom data.
|
PaymentService.PaymentCancelRequest |
withMetadata(java.lang.String key,
java.lang.String value)
Key-value store of custom data.
|
execute, executeWrapped
public PaymentService.PaymentCancelRequest withMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
public PaymentService.PaymentCancelRequest withMetadata(java.lang.String key, java.lang.String value)
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
public PaymentService.PaymentCancelRequest withHeader(java.lang.String headerName, java.lang.String headerValue)