API Reference

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 Details
createMandateInfo object yes read close
close

Description

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.
  • SDK Object type
    HostedMandateInfo
alias string no read close
close

Description

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.
customer object depends read close
close

Description

Customer object containing customer specific inputs

Depends on:

Required for Create mandate and Create payment calls
  • SDK Object type
    MandateCustomer
bankAccountIban object depends read close
close

Description

Object containing IBAN information

Depends on:

Required for Create mandate and Create payment calls
  • SDK Object type
    BankAccountIban
accountHolderName string (30) depends read close
close

Description

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 read close
close

Description

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 read close
close

Description

Name of company, as a consumer
contactDetails object no read close
close

Description

Object containing contact details like email address and phone number
  • SDK Object type
    MandateContactDetails
emailAddress string (70) no read close
close

Description

Email address of the consumer
mandateAddress object depends read close
close

Description

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.
  • SDK Object type
    MandateAddress
city string (40) depends read close
close

Description

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 read close
close

Description

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 read close
close

Description

House number
street string (50) depends read close
close

Description

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 read close
close

Description

Zip code

Depends on:

Required for Create mandate and Create payment calls.
Required for Create hostedCheckout calls where the IBAN is also provided.
personalInformation object depends read close
close

Description

Object containing personal information of the consumer

Depends on:

Required for Create mandate and Create payment calls
  • SDK Object type
    MandatePersonalInformation
name object depends read close
close

Description

Object containing the name details of the consumer

Depends on:

Required for create mandate and Create payment calls
  • SDK Object type
    MandatePersonalName
firstName string (15) depends read close
close

Description

Given name(s) or first name(s) of the consumer

Depends on:

Required for create mandate and Create payment calls
surname string (70) depends read close
close

Description

Surname(s) or last name(s) of the consumer

Depends on:

Required for create mandate and Create payment calls
title enum depends read close
close

Description

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 read close
close

Description

The unique identifier of a customer
recurrenceType enum yes read close
close

Description

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

Description

Specifies whether the mandate is unsigned or singed by SMS. Possible values are:
  • UNSIGNED
  • SMS
uniqueMandateReference string no read close
close

Description

The unique identifier of the mandate
hostedMandateManagementSpecificInput object no read close
close

Description

Object containing hosted mandate management specific data
  • SDK Object type
    HostedMandateManagementSpecificInput
locale string (6) no read close
close

Description

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 read close
close

Description

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 read close
close

Description

  • 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 read close
close

Description

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 Details
RETURNMAC string no read close
close

Description

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 read close
close

Description

This is the ID under which the data for this mandate management can be retrieved.
partialRedirectUrl string no read close
close

Description

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 Details
errorId string yes read close
close

Description

Unique reference, for debugging purposes, of this error response
errors array of object yes read close
close

Description

List of one or more errors
items object no read close
close
  • SDK Object type
    APIError
category string no read close
close

Description

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 read close
close

Description

Error code
httpStatusCode integer no read close
close

Description

HTTP status code for this error that can be used to determine the type of error
id string no read close
close

Description

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

Description

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 read close
close

Description

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 read close
close

Description

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