Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions src/main/java/com/gocardless/services/PaymentService.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public static final class PaymentCreateRequest extends IdempotentPostRequest<Pay
private Boolean fasterAch;
private Links links;
private Map<String, String> metadata;
private PsuInteractionType psuInteractionType;
private String reference;
private Boolean retryIfPossible;

Expand Down Expand Up @@ -210,6 +211,22 @@ public PaymentCreateRequest withMetadata(String key, String value) {
return this;
}

/**
* Indicates how a Variable Recurring Payment (VRP) is initiated, by or on behalf of the
* payer.
* <ul>
* <li>`in_session`: The payer is actively participating in the payment creation
* session.</li>
* <li>`off_session`: The payer is not present during the transaction, and the payment is
* initiated by the merchant based on an established consent (e.g., a recurring subscription
* payment).</li>
* </ul>
*/
public PaymentCreateRequest withPsuInteractionType(PsuInteractionType psuInteractionType) {
this.psuInteractionType = psuInteractionType;
return this;
}

/**
* An optional reference that will appear on your customer's bank statement. The character
* limit for this reference is dependent on the scheme.<br />
Expand Down Expand Up @@ -313,6 +330,18 @@ public String toString() {
}
}

public enum PsuInteractionType {
@SerializedName("in_session")
IN_SESSION, @SerializedName("off_session")
OFF_SESSION, @SerializedName("unknown")
UNKNOWN;

@Override
public String toString() {
return name().toLowerCase();
}
}

public static class Links {
private String mandate;

Expand Down