Skip to content

Sepa

SEPA

Info

To make SEPA payments, you must contact us to provide or obtain a SEPA Creditor Identifier.

1
2
3
4
5
6
{
  "id": "sepa_oazGliEo6BuqUlyCzE42hcNp",
  "bic": "ILADFRPP",
  "last4": "2606",
  "name": "David Coaster"
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
package Stancer::Sepa;

use Moo;
use Stancer::Core::Types qw(:all);

has bic => (is => 'rw', isa => Bic);

has created => (is => 'ro', isa => InstanceOf['DateTime']);

has iban => (is => 'rw', isa => Iban);

has id => (is => 'ro', isa => Char[29]);

has last4 => (is => 'ro', isa => Char[4]);

has name => (is => 'rw', isa => Varchar[4, 64]);

1;
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<?php
namespace Stancer;

use DateTime;

class Sepa
{
  protected ?string $bic;
  protected ?DateTime $created;
  protected ?string $iban;
  protected ?string $id;
  protected ?string $last4;
  protected string $name;

  public function __construct(string $id = null) {}
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from datetime import datetime

class Sepa(object):
  @property
  def bic(self) -> str:
    pass

  @bic.setter
  def bic(self, value: str):
    pass

  @property
  def created(self) -> datetime:
    pass

  @property
  def iban(self) -> str:
    pass

  @iban.setter
  def iban(self, value: str):
    pass

  @property
  def id(self) -> str:
    pass

  @property
  def last4(self) -> str:
    pass

  @property
  def name(self) -> str:
    pass

  @name.setter
  def name(self, value: str):
    pass

The SEPA object is defined as follows:

Parameter Field Description Type
id Given by the API SEPA's id String, fixed size = 29
bic Optional The BIC number associated with the IBAN String, min = 8, max = 11
iban Required The bank account number String, min = 16, max = 34
last4 Given by the API Last 4 bank account number String, fixed size = 4 characters
name Required IBAN holder's name String, min = 4, max = 64
mandate Required The mandate referring to the payment String, min = 3, max = 35
mandate_date Required Timestamp of the mandate signature date, required if mandate was provided Int
created Given by the API The Unix timestamp representing creation date of the object in local time Int

Create a SEPA

HTTP request
/v1/sepa/
Data parameters
Parameter Field
iban Required
name Required
bic Optional
mandate Required
date_mandate Required
Return parameters

The API will replicate your data, except for iban, in the return parameters and add the following ones:

Parameter Field
id Required
bic Required
created Required
last4 Required
mandate Required
date_mandate Required

You may received a 409 Conflict HTTP response if the sepa already exists, whom body will contain the id of the already-existing SEPA.

Code examples
1
2
3
4
5
6
curl -X POST "https://api.stancer.com/v1/sepa/" \
  --header "Content-Type: application/json" \
  --data '{
    "iban": "FR1420041010050500013M02606",
    "name": "David Coaster"
}'

The above command returns JSON structured as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "bic": "TESTFRPP",
  "created": 1611140413,
  "date_mandate": null,
  "id": "sepa_fZvOCm7oDmUJhqvezEtlZwXa",
  "last4": "2606",
  "live_mode": false,
  "mandate": "mndt_fZDtzobQZxTXUFK3nNS41heE",
  "name": "David Coaster"
}

Get SEPA data

HTTP request
/v1/sepa/
id_sepa
Query parameters
Parameter Description
id_sepa The ID of the SEPA to retrieve
Return parameters

It will return the SEPA object asssociated with the id_sepa you provided. If the id_sepa does not exist, the API will return a 404 HTTP response code.

Code examples
1
curl "https://api.stancer.com/v1/sepa/sepa_fZvOCm7oDmUJhqvezEtlZwXa"

The above command returns JSON structured as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "bic": "TESTFRPP",
  "created": 1611140413,
  "date_mandate": null,
  "id": "sepa_fZvOCm7oDmUJhqvezEtlZwXa",
  "last4": "2606",
  "live_mode": false,
  "mandate": "mndt_fZDtzobQZxTXUFK3nNS41heE",
  "name": "David Coaster"
}

Update a sepa

HTTP request
/v1/sepa/
id_sepa

You can update a sepa only if the mandate has not already been signed.

If you need to renew the mandate, you must recreate a sepa object.

Query parameters
Parameter Description
id_sepa SEPA's id
Data parameters
Parameter Field
name Optional, only if date_mandate was not already provided
mandate Optional, only if date_mandate was not already provided
date_mandate Optional, only if not already provided
Return parameters

The above command returns an HTTP 200 / 204 code if correctly processed or an HTTP 404 code if the sepa does not exist.

Code examples
1
2
3
4
5
curl -X PATCH "https://api.stancer.com/v1/sepa/sepa_fZvOCm7oDmUJhqvezEtlZwXa" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Pickle Rick"
}'

Delete a sepa

HTTP request
/v1/sepa/
id_sepa
Query parameters
Parameter Description
id_sepa SEPA's id
Return parameters

The above command returns an HTTP 204 code if correctly processed or an HTTP 404 code if the sepa does not exist.

Code examples
1
curl -X DELETE "https://api.stancer.com/v1/sepa/sepa_fZvOCm7oDmUJhqvezEtlZwXa"