Server API version 1.0
Java

Results for

icon-search-large No search results yet
Enter your search query above

Create hosted mandate management

POST https://{domainname}/v1/{merchantId}/hostedmandatemanagements

Hosted Mandate Management

Using hostedMandateManagement you can create mandates through our easy to use hosted responsive pages.

Request

You can start a hostedMandateManagement flow by posting the relevant details to the endpoint. We will then return you all the details you need to redirect the consumer to us, retrieve the status and recognize the consumer when he/she returns to your website.

PayloadCreateHostedMandateManagementRequest

       Property Type Required Description
object yes SDK object type: HostedMandateInfo
Object containing partial information needed for the creation of the mandate. The recurrencetype, signature type of the mandate and reference to the customer are mandatory. You can also supply any personal information you already know about the customer so they have to fill in less details.
alias string no

An alias for the mandate. This can be used to visually represent the mandate.
Do not include any unobfuscated sensitive data in the alias.
Default value if not provided is the obfuscated IBAN of the customer.

object depends SDK object type: MandateCustomer
Customer object containing customer specific inputs
Depends on: Required for Create mandate and Create payment calls
object depends SDK object type: BankAccountIban
Object containing IBAN information
Depends on: Required for Create mandate and Create payment calls
accountHolderName string (30) depends

Name in which the account is held.
Depends on: Required for the creation of a Payout
Required for Create and Update token calls.

iban string (50) depends

The IBAN is the International Bank Account Number. It is an internationally agreed format for the BBAN and includes the ISO country code and two check digits.
Depends on: Required for the creation of a Payout
Required for Create and Update token.
Required for payments with product 9000 in Austria (AT) and Germany (DE).
Required for Create mandate and Create payment with mandate calls

companyName string (40) no

Name of company, as a consumer

object no SDK object type: MandateContactDetails
Object containing contact details like email address and phone number
emailAddress string (70) no

Email address of the consumer

object depends SDK object type: MandateAddress
Object containing billing address details
Depends on: Required for Create mandate and Create payment calls.
Required for Create hostedCheckout calls where the IBAN is also provided.
city string (40) depends

City
Depends on: Required for Create mandate and Create payment calls.
Required for Create hostedCheckout calls where the IBAN is also provided.

countryCode string (2) depends

ISO 3166-1 alpha-2 country code
Depends on: Required for Create mandate and Create payment calls.
Required for Create hostedCheckout calls where the IBAN is also provided.

houseNumber string (15) no

House number

street string (50) depends

Streetname
Depends on: Required for Create mandate and Create payment calls.
Required for Create hostedCheckout calls where the IBAN is also provided.

zip string (10) depends

Zip code
Depends on: Required for Create mandate and Create payment calls.
Required for Create hostedCheckout calls where the IBAN is also provided.

object depends SDK object type: MandatePersonalInformation
Object containing personal information of the consumer
Depends on: Required for Create mandate and Create payment calls
object depends SDK object type: MandatePersonalName
Object containing the name details of the consumer
Depends on: Required for create mandate and Create payment calls
firstName string (15) depends

Given name(s) or first name(s) of the consumer
Depends on: Required for create mandate and Create payment calls

surname string (70) depends

Surname(s) or last name(s) of the consumer
Depends on: Required for create mandate and Create payment calls

title enum depends

Object containing the title of the consumer (Mr, Miss or Mrs)
Depends on: Required for create mandate and Create payment calls

customerReference string (35) yes

The unique identifier of a customer

recurrenceType enum yes

Specifies whether the mandate is for one-off or recurring payments. Possible values are:
  • UNIQUE
  • RECURRING

signatureType enum yes

Specifies whether the mandate is unsigned or singed by SMS. Possible values are:
  • UNSIGNED
  • SMS

uniqueMandateReference string no

The unique identifier of the mandate

object no SDK object type: HostedMandateManagementSpecificInput
Object containing hosted mandate management specific data
locale string (6) no

Locale to use to present the hosted mandate pages to the consumer. Please make sure that a language pack is configured for the locale you are submitting. If you submit a locale that is not setup on your account we will use the default language pack for your account. You can easily upload additional language packs and set the default language pack in the Configuration Center.

returnUrl string (512) no

The URL that the consumer is redirect to after the mandate flow has finished. You can add any number of key value pairs in the query string that, for instance help you to identify the consumer when they return to your site. Please note that we will also append some additional key value pairs that will also help you with this identification process.
Note: The provided URL should be absolute and contain the protocol to use, e.g. http:// or https://. For use on mobile devices a custom protocol can be used in the form of protocol://. This protocol must be registered on the device first.
URLs without a protocol will be rejected.

showResultPage boolean no

  • true - MyMandate will show a result page to the consumer when applicable. Default.
  • false - MyMandate will redirect the consumer back to the provided returnUrl when this is possible.
The default value for this field is true.

variant string no

The ID of the variant used to create the Hosted Mandate Management Session in which the payment was made.

Request example

SDK: Java

This scenario you will probably use the most

  • HostedMandateInfo createMandateInfo = new HostedMandateInfo();
    createMandateInfo.setCustomerReference("idonthaveareference");
    createMandateInfo.setRecurrenceType("RECURRING");
    createMandateInfo.setSignatureType("UNSIGNED");
    
    HostedMandateManagementSpecificInput hostedMandateManagementSpecificInput = new HostedMandateManagementSpecificInput();
    hostedMandateManagementSpecificInput.setLocale("fr_FR");
    hostedMandateManagementSpecificInput.setReturnUrl("http://www.example.com");
    hostedMandateManagementSpecificInput.setVariant("101");
    
    CreateHostedMandateManagementRequest body = new CreateHostedMandateManagementRequest();
    body.setCreateMandateInfo(createMandateInfo);
    body.setHostedMandateManagementSpecificInput(hostedMandateManagementSpecificInput);
    
    CreateHostedMandateManagementResponse response = client.merchant("merchantId").hostedmandatemanagements().create(body);
    

Responses

For every successfully created hosted mandate management session an HTTP 201 response is returned.

Response 201 - CreatedCreateHostedMandateManagementResponse

The response contains a partialRedirectUrl. Because you can create several subdomains under which your MyCheckout payment pages will be available, you will need to add the relevant subdomain and datacenter alias that you wish to use for the transaction in front of the returned partialRedirectUrl. Next to this you also need to add the protocol (https://) in front of the whole URL. So the full redirect might be something like https://yourname.pay1.poweredbyglobalcollect.com/pay8915-53ebca407e6b4a1dbd086aad4f10354d:8915-28e5b79c889641c8ba770f1ba576c1fe:9798f4c44ac6406e8288494332d1daa0

In the HTTP header the location is provided of the created hostedMandateManagement object so you can easily query its status, by simply performing a GET on the URI provided in this header.

   Property Type Required Description
RETURNMAC string no

When the consumer is returned to your site we will append this field and value to the query-string. You should store this data, so you can identify the returning consumer.

hostedMandateManagementId string no

This is the ID under which the data for this mandate management can be retrieved.

partialRedirectUrl string no

The partial URL as generated by our system. You will need to add the protocol and the relevant subdomain to this URL, before redirecting your consumer to this URL. A special 'payment' subdomain will always work so you can always add 'https://payment.' at the beginning of this response value to view your hosted mandate management pages.

Response example

SDK: Java

This scenario you will probably use the most

  • {
        "RETURNMAC" : "fecab85c-9b0e-42ee-a9d9-ebb69b0c2eb0",
        "hostedMandateManagementId" : "15c09dac-bf44-486a-af6b-edfd8680a166",
        "partialRedirectUrl" : "pay1.secured-by-ingenico.com/mandatemanagement/1701-8cc800ebc3b84667a0b0c9b7981d5b6a:15c09dac-bf44-486a-af6b-edfd8680a166:af6276be66bc4743abfbaa48524c59aa?requestToken=89836363-f87c-4d17-8b11-270d7d9cda9a"
    }
    

Response 400 - Bad requestErrorResponse

     Property Type Required Description
errorId string yes

Unique reference, for debugging purposes, of this error response

array yes
List of one or more errors
object no SDK object type: APIError
category string no

Category the error belongs to. The category should give an indication of the type of error you are dealing with. Possible values:
  • CONNECT_PLATFORM_ERROR - indicating that a functional error has occurred in the Connect platform.
  • PAYMENT_PLATFORM_ERROR - indicating that a functional error has occurred in the Payment platform.
  • IO_ERROR - indicating that a technical error has occurred within the Connect platform or between Connect and any of the payment platforms or third party systems.

code string yes

Error code

httpStatusCode integer no

HTTP status code for this error that can be used to determine the type of error

id string no

ID of the error. This is a short human-readable message that briefly describes the error.

message string no

Human-readable error message that is not meant to be relayed to consumer as it might tip off people who are trying to commit fraud

propertyName string no

Returned only if the error relates to a value that was missing or incorrect.
Contains a location path to the value as a JSonata query.
Some common examples:
  • a.b selects the value of property b of root property a,
  • a[1] selects the first element of the array in root property a,
  • a[b='some value'] selects all elements of the array in root property a that have a property b with value 'some value'.

requestId string no

ID of the request that can be used for debugging purposes

Response example

SDK: Java

This scenario you will probably use the most

  • {
        "errorId" : "15eabcd5-30b3-479b-ae03-67bb351c07e6-00000092",
        "errors" : [
            {
                "code" : "20000000",
                "propertyName" : "bankAccountBban.accountNumber",
                "message" : "PARAMETER_NOT_FOUND_IN_REQUEST"
            }
        ]
    }
    
icon_top_1