Server API version 1.0
Java

Results for

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

Create mandate with mandatereference

PUT https://{domainname}/v1/{merchantId}/mandates/{uniqueMandateReference}

Mandates

The mandates REST services allow you to manage mandates, used in SEPA Direct Debit payments.

Request

Creates a mandate with mandatereference.

Create mandate supports idempotent requests

PayloadCreateMandateRequest

      Property Type Required Description
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 no SDK object type: MandateCustomer
Customer object containing customer specific inputs
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

language string no

The language of the customer.

recurrenceType enum yes

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

returnUrl string depends

Return url to use if the mandate signing requires redirection.
Depends on: Required if the signatureType is 'SMS'

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

Request example

SDK: Java

This scenario you will probably use the most

  • BankAccountIban bankAccountIban = new BankAccountIban();
    bankAccountIban.setIban("DE46940594210000012345");
    
    MandateContactDetails contactDetails = new MandateContactDetails();
    contactDetails.setEmailAddress("wile.e.coyote@acmelabs.com");
    
    MandateAddress mandateAddress = new MandateAddress();
    mandateAddress.setCity("Monumentenvallei");
    mandateAddress.setCountryCode("NL");
    mandateAddress.setStreet("Woestijnweg");
    mandateAddress.setZip("1337XD");
    
    MandatePersonalName name = new MandatePersonalName();
    name.setFirstName("Wile");
    name.setSurname("Coyote");
    
    MandatePersonalInformation personalInformation = new MandatePersonalInformation();
    personalInformation.setName(name);
    personalInformation.setTitle("Miss");
    
    MandateCustomer customer = new MandateCustomer();
    customer.setBankAccountIban(bankAccountIban);
    customer.setCompanyName("Acme labs");
    customer.setContactDetails(contactDetails);
    customer.setMandateAddress(mandateAddress);
    customer.setPersonalInformation(personalInformation);
    
    CreateMandateRequest body = new CreateMandateRequest();
    body.setCustomer(customer);
    body.setCustomerReference("idonthaveareference");
    body.setLanguage("nl");
    body.setRecurrenceType("UNIQUE");
    body.setSignatureType("UNSIGNED");
    
    CreateMandateResponse response = client.merchant("merchantId").mandates().createWithMandateReference("42268d8067df43e18a50a2ebf4bdb729", body);
    

Responses

Please find below an overview of the possible responses.

Response 201 - CreatedCreateMandateResponse

The create mandate with mandatereference request succeeded. Data on the resulting mandate can be found in the response.

       Property Type Required Description
object no SDK object type: MandateResponse
Object containing information on a mandate
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 no SDK object type: MandateCustomer
Customer object containing customer specific inputs
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 the customer to which this mandate is applicable

recurrenceType enum yes

Specifieds whether the mandate is for one-off or recurring payments.

status enum no

The status of the mandate. Possible values are:
  • ACTIVE
  • EXPIRED
  • CREATED
  • REVOKED
  • WAITING_FOR_REFERENCE
  • BLOCKED
  • USED

uniqueMandateReference string no

The unique identifier of the mandate

object no SDK object type: MandateMerchantAction
Object that contains the action, including the needed data, that you should perform next, showing the redirect to a third party to complete the payment or like showing instructions
actionType enum no

Action merchants needs to take in the online mandate process. Possible values are:
  • REDIRECT - The consumer needs to be redirected using the details found in redirectData

object no SDK object type: MandateRedirectData
Object containing all data needed to redirect the consumer
RETURNMAC string no

A Message Authentication Code (MAC) is used to authenticate the redirection back to merchant after the payment.

redirectURL string no

The URL that the consumer should be redirected to

Response example

SDK: Java

This scenario you will probably use the most

  • {
        "mandate" : {
            "customerReference" : "idonthaveareference",
            "customer" : {
                "bankAccountIban" : {
                    "iban" : "DE46940594210000012345"
                },
                "mandateAddress" : {
                    "street" : "Woestijnweg",
                    "city" : "Monumentenvallei",
                    "zip" : "1337XD",
                    "countryCode" : "NL"
                },
                "companyName" : "Acme labs",
                "contactDetails" : {
                    "emailAddress" : "wile.e.coyote@acmelabs.com"
                },
                "personalInformation" : {
                    "name" : {
                        "firstName" : "Wile",
                        "surname" : "Coyote"
                    },
                    "title" : "Miss"
                }
            },
            "recurrenceType" : "UNIQUE",
            "status" : "ACTIVE",
            "uniqueMandateReference" : "42268d8067df43e18a50a2ebf4bdb729"
        }
    }
    

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" : "customer.billingAddress.street",
                "message" : "PARAMETER_NOT_FOUND_IN_REQUEST"
            }
        ]
    }
    

Response 409 - ConflictErrorResponse

The create mandate with mandatereference request failed because a mandate with the given reference already exists.

     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" : "98281bc6-5cb2-4ffe-b835-6a3425b06dff-00000df2",
        "errors" : [
            {
                "id" : "MANDATE_ALREADY_EXISTS",
                "code" : "8888888",
                "category" : "MANDATE_PLATFORM_ERROR",
                "propertyName" : "uniqueMandateReference",
                "message" : "A mandate with that reference already exists",
                "httpStatusCode" : 409
            }
        ]
    }
    
icon_top_1