diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 4f7521a5..9f500447 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -758,6 +758,7 @@ private PaymentRequest() { private FundsSettlement fundsSettlement; private Links links; private Map metadata; + private String reference; private String scheme; /** @@ -818,6 +819,15 @@ public Map getMetadata() { return metadata; } + /** + * A custom payment reference defined by the merchant. It is only available for payments + * using the Direct Funds settlement model on the Faster Payments scheme. + * + */ + public String getReference() { + return reference; + } + /** * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is * supported in the UK (GBP) and `sepa_credit_transfer` and `sepa_instant_credit_transfer` diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index 1a152f37..3dc82c6a 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -461,6 +461,19 @@ public BillingRequestCreateRequest withPaymentRequestMetadata( return this; } + /** + * A custom payment reference defined by the merchant. It is only available for payments + * using the Direct Funds settlement model on the Faster Payments scheme. + * + */ + public BillingRequestCreateRequest withPaymentRequestReference(String reference) { + if (paymentRequest == null) { + paymentRequest = new PaymentRequest(); + } + paymentRequest.withReference(reference); + return this; + } + /** * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is * supported in the UK (GBP) and `sepa_credit_transfer` and `sepa_instant_credit_transfer` @@ -895,6 +908,7 @@ public static class PaymentRequest { private String description; private FundsSettlement fundsSettlement; private Map metadata; + private String reference; private String scheme; /** @@ -957,6 +971,16 @@ public PaymentRequest withMetadata(Map metadata) { return this; } + /** + * A custom payment reference defined by the merchant. It is only available for payments + * using the Direct Funds settlement model on the Faster Payments scheme. + * + */ + public PaymentRequest withReference(String reference) { + this.reference = reference; + return this; + } + /** * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is * supported in the UK (GBP) and `sepa_credit_transfer` and