public class RedirectFlow
extends java.lang.Object
Represents a redirect flow resource returned from the API.
Redirect flows enable you to use GoCardless’ hosted payment pages to set up mandates with your customers. These pages are fully compliant and have been translated into Dutch, French, German, Italian, Portuguese, Spanish and Swedish.
The overall flow is:
You create a redirect flow for your customer, and redirect them to the returned redirect url, e.g. https://pay.gocardless.com/flow/RE123
.
Your customer supplies their name, email, address, and bank account details, and submits the form. This securely stores their details, and redirects them back to your success_redirect_url
with redirect_flow_id=RE123
in the querystring.
You complete the redirect flow, which creates a customer, customer bank account, and mandate, and returns the ID of the mandate. You may wish to create a subscription or payment at this point.
Once you have completed the redirect flow via the API, you should display a confirmation page to your customer, confirming that their Direct Debit has been set up. You can build your own page, or redirect to the one we provide in the confirmation_url
attribute of the redirect flow.
Redirect flows expire 30 minutes after they are first created. You cannot complete an expired redirect flow.
Modifier and Type | Class and Description |
---|---|
static class |
RedirectFlow.Links |
static class |
RedirectFlow.Scheme |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConfirmationUrl()
The URL of a confirmation page, which you may optionally redirect the customer to rather than use your own page, that confirms in their chosen language that their Direct Debit has been set up successfully.
|
java.lang.String |
getCreatedAt()
Fixed timestamp, recording when this resource was created.
|
java.lang.String |
getDescription()
A description of the item the customer is paying for.
|
java.lang.String |
getId()
Unique identifier, beginning with “RE”.
|
RedirectFlow.Links |
getLinks() |
java.lang.String |
getRedirectUrl()
The URL of the hosted payment pages for this redirect flow.
|
RedirectFlow.Scheme |
getScheme()
The Direct Debit scheme of the mandate.
|
java.lang.String |
getSessionToken()
The customer’s session ID must be provided when the redirect flow is set up and again when it is completed.
|
java.lang.String |
getSuccessRedirectUrl()
The URL to redirect to upon successful mandate setup.
|
public java.lang.String getConfirmationUrl()
The URL of a confirmation page, which you may optionally redirect the customer to rather than use your own page, that confirms in their chosen language that their Direct Debit has been set up successfully. Only returned once the customer has set up their mandate via the payment pages and the redirect flow has been completed, and only available for 15 minutes from when you complete the redirect flow. The structure of this URL may change at any time, so you should read it directly from the API response.
public java.lang.String getCreatedAt()
Fixed timestamp, recording when this resource was created.
public java.lang.String getDescription()
A description of the item the customer is paying for. This will be shown on the hosted payment pages.
public java.lang.String getId()
Unique identifier, beginning with “RE”.
public RedirectFlow.Links getLinks()
public java.lang.String getRedirectUrl()
The URL of the hosted payment pages for this redirect flow. This is the URL you should redirect your customer to.
public RedirectFlow.Scheme getScheme()
The Direct Debit scheme of the mandate. If specified, the payment pages will only allow the set-up of a mandate for the specified scheme. It is recommended that you leave this blank so the most appropriate scheme is picked based on the customer’s bank account.
public java.lang.String getSessionToken()
The customer’s session ID must be provided when the redirect flow is set up and again when it is completed. This allows integrators to ensure that the user who was originally sent to the GoCardless payment pages is the one who has completed them.
public java.lang.String getSuccessRedirectUrl()
The URL to redirect to upon successful mandate setup. You must use a URL beginning https
in the live environment.