diff --git a/src/main/java/com/gocardless/resources/BillingRequestFlow.java b/src/main/java/com/gocardless/resources/BillingRequestFlow.java index fea439d3..1e96834c 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestFlow.java +++ b/src/main/java/com/gocardless/resources/BillingRequestFlow.java @@ -31,6 +31,7 @@ private BillingRequestFlow() { private String sessionToken; private Boolean showRedirectButtons; private Boolean showSuccessRedirectButton; + private Boolean skipSuccessScreen; /** * URL for a GC-controlled flow which will allow the payer to fulfil the billing request @@ -182,6 +183,14 @@ public Boolean getShowSuccessRedirectButton() { return showSuccessRedirectButton; } + /** + * If true, the payer will not be redirected to the success screen after completing the flow. A + * redirect_uri needs to be provided for this parameter to be taken into account. + */ + public Boolean getSkipSuccessScreen() { + return skipSuccessScreen; + } + public static class Links { private Links() { // blank to prevent instantiation diff --git a/src/main/java/com/gocardless/services/BillingRequestFlowService.java b/src/main/java/com/gocardless/services/BillingRequestFlowService.java index 399d234c..4eeddcec 100644 --- a/src/main/java/com/gocardless/services/BillingRequestFlowService.java +++ b/src/main/java/com/gocardless/services/BillingRequestFlowService.java @@ -59,6 +59,7 @@ public static final class BillingRequestFlowCreateRequest private String redirectUri; private Boolean showRedirectButtons; private Boolean showSuccessRedirectButton; + private Boolean skipSuccessScreen; /** * (Experimental feature) Fulfil the Billing Request on completion of the flow (true by @@ -373,6 +374,15 @@ public BillingRequestFlowCreateRequest withShowSuccessRedirectButton( return this; } + /** + * If true, the payer will not be redirected to the success screen after completing the + * flow. A redirect_uri needs to be provided for this parameter to be taken into account. + */ + public BillingRequestFlowCreateRequest withSkipSuccessScreen(Boolean skipSuccessScreen) { + this.skipSuccessScreen = skipSuccessScreen; + return this; + } + private BillingRequestFlowCreateRequest(HttpClient httpClient) { super(httpClient); }