DropPay API - Bank v.1 - ISO 20022 Messages - Bank to Customer Statement (CAMT.053)¶
The BankToCustomerStatement message is sent by the account servicer to an account owner or to a party authorised by the account owner to receive the message. It is used to inform the account owner, or authorised party, of the entries booked to the account, and to provide the owner with balance information on the account at a given point in time.
The CAMT.053 (camt.053.001.06 BankToCustomerAccountStatementV06) is an end of day statement message.
The CAMT.053 is usually an previous day statement message. Nevertheless DropPay will provide this type of message by putting you in control of which day you want the statement being referred to, that is you can decide which day your system is running in, today or any day before today.
How it works¶
In order to get delivered with a CAMT 053 you have to: * POST
a request that initializes a job with desired parameters in a json object; * PATCH
the job resource until it's ready to be launched; * make the job run and wait for it to issue a new statement, catching the event your client has been subscribed to; * get the XML 20022 CAMT.053 file directly from an uri provided in a json attribute of the job;
Get further reading the peculiarities of time ranged statements.
Date Ranged Statements¶
In order to get CAMT.053.001 statements produced you can set attributes to define the date range issuing. date_range_statement
is an optional attribute.
Date-time and durations are ISO 8601 compliant representations.
"date_range_statement": {
"begin": "2016-07-16",
"end": "2016-07-16",
"duration": "P2M"
},
Semanthics of date range are listed in the table below:
Date Range | Description |
---|---|
begin , end | produces one CAMT 053 with absolute time range |
begin , duration | produces one CAMT 053, from begin to begin+duration |
end , duration | produces one CAMT 053, from end-duration to end |
begin , end , duration | produces one CAMT 053 with absolute time range, ignores duration |
Statements can be produced scheduling a job and then fetching resulting files once job status switch to, DONE
or CANCELLED
. Files will be available until 48 hours after the status has changed to DONE
or CANCELLED
. Late fetches will result in a 410/500
HTTP Status Error.
Default range¶
If date_range_statement
is not passed in, DropPay will issue statements setting a default date range beginning at 00:00 of the current day and ending at the time the request is performed.
CAMT 053 Versioning¶
Currently DropPay supports only Version 6 of CAMT 053.
Anyway if any other version compliance will be added in the future, you'll be able to require DropPay to produce CAMT 053 statements accordingly with the version set as job attribute.
"version": "001.006",
CAMT 053 DropPay specification¶
You can find XML schema specified as a formatted table in the document DropPay-ISO20022-CAMT.053.001.pdf
REST Entities¶
Every REST entity is described listing her properties with the following formatting conventions:
- this is a property name
this is an example of property value
- (type, policy, direction) is the specification of a property
- type can be "string", "number", "object" or a proper object class name
- policy can be "optional" or "required"
- direction can be "posted" or "received" depending on whether you set it in the request or you got it from the response
- after the dash "-" there's the property description
name: example_value
(type, policy, direction) - Property description
CAMT 053.001¶
CAMT 053.001
- id:
ISO145123G6YY
(string, returned) - Unique job identifier - description
my wonderful unstoppable job
(string, optional, posted) - user's description of the job - version:
001.006
(enum, optional, posted, returned) - requested ISO 20022 supported version of XML statements- enum members
- 001.006
- enum members
- date_creation
2016-07-16T19:20:30+01:00
(string, returned) - ISO 8601 time representation of job creation timestamp - iban:
IT00A1000010000393471122333
(string, required, posted) - bank account IBAN - date_range_statement (object, optional, posted)
- begin:
2016-07-16
(string, optional, posted) - ISO 8601 time representation of date range start - end:
2016-07-16
(string, optional, posted) - ISO 8601 time representation of date range end - duration:
P2M
(string, required) (string, optional, posted) - ISO 8601 duration representation (in example "two months")
- begin:
- status:
DRAFT
(enum, returned)- enum members
- DRAFT
- SCHEDULED
- RUNNING
- CANCELLED
- DELETED
- DONE
- enum members
- webhooks (object, optional, posted)
- camt053:
https://credenA:credenB@app.server.com/listener
(string, optional) - optional webhook where to receive event notification ofRUNNING-IDLE
state switching to.
- camt053:
- statements (array[object], returned) - Download URL of the statement. Item is added only once the statement file with results has been created. Filename is built with Bank Acccount number and issuing timestamp
- object
- date_issue:
2016-07-16T19:20:30+01:00
- ISO 8601 time representation of statement issuing date - file:
https://api.drop-pay.io/bank/iso20022/v1/reports/ISO145123G6YY/393471122333-41208652835.xml
- date_issue:
- object
REST Endpoints¶
Security¶
Requests must be authenticated with User Access Token. User Access Token can be obtained requesting it with and active Connection Code.
Details at Authentication v.1 API Reference
Manage CAMT 053 jobs¶
DropPay Push API publishes the following methods :
- POST a new Push order entity to send money
- GET the Push order entity to read the order status;
- PATCH the Push order entity to modify the order attributes until it is set with second factor disposition protocol;
- DELETE the Push order entity
POST Create a new CAMT 053 job
Create a new CAMT 053 job¶
Example¶
Request¶
curl --request POST
--url https://api.drop-pay.io/bank/iso20022/v1/camt/053/
--header 'authorization: Bearer ac9185e9f2984867b11069fd2881ff1a'
--header 'content-type:application/json'
{
"description `my wonderful unstoppable job`": "",
"version": "001.006",
"iban": "IT00A1000010000393471122333",
"date_range_statement": {
"begin": "2016-07-16",
"end": "2016-07-16",
"duration": "P2M"
},
}
Response 200
{
"id": "ISO145123G6YY",
"description": "my wonderful unstoppable job",
"version": "001.006",
"date_creation": "2016-07-16T19:20:30+01:00",
"iban": "IT00A1000010000393471122333",
"date_range_statement": {
"begin": "2016-07-16,
"end": "2016-07-16",
"duration": "P2M"
},
"status": "DRAFT",
"webhooks": {
"camt053": "https://credenA:credenB@app.server.com/listener"
},
"statements": [
{
"date_issue": "2016-07-16T19:20:30+01:00",
"file": "https://api.drop-pay.io/bank/iso20022/v1/reports/ISO145123G6YY/RPT523623G6YY"
}
],
}
Response 400
{
"code": "100",
"description": "Missing arguments"
}
PATCH Update an existent CAMT 053 job
Update an existent CAMT 053 job¶
Example¶
Request¶
curl --request PATCH
--url https://api.drop-pay.io/bank/iso20022/v1/camt/053/{id}
--header 'Authorization: Bearer ac9185e9f2984867b11069fd2881ff1a'
--header 'Content-type: application/json'
URL Parameters
- id:
ISO145123G6YY
- Unique ID of the job
{
"status": "SCHEDULED"
}
Response 200
{
"id": "ISO145123G6YY",
"description": "my wonderful unstoppable job",
"version": "001.006",
"date_creation": "2016-07-16T19:20:30+01:00",
"iban": "IT00A1000010000393471122333",
"date_range_statement": {
"begin": "2016-07-16",
"end": "2016-07-16",
"duration": "P2M"
},
"status": "SCHEDULED",
"webhooks": {
"camt053": "https://credenA:credenB@app.server.com/listener"
},
"statements": [
{
"date_issue": "2016-07-16T19:20:30+01:00",
"file": "https://api.drop-pay.io/bank/iso20022/v1/reports/ISO145123G6YY/RPT523623G6YY"
}
],
}
Response 400
{
"code": "100",
"description": "Missing arguments"
}
GET Read an existent CAMT 053 job
Read an existent CAMT 053 CAMT 053 job¶
Example¶
Request¶
curl --request GET
--url https://api.drop-pay.io/bank/iso20022/v1/camt/053/{id}
--header 'Authorization: Bearer ac9185e9f2984867b11069fd2881ff1a'
URL Parameters
- id:
ISO145123G6YY
- Unique ID of the job
Response 200
{
"id": "ISO145123G6YY",
"description": "my wonderful unstoppable job",
"version": "001.006",
"date_creation": "2016-07-16T19:20:30+01:00",
"iban": "IT00A1000010000393471122333",
"date_range_statement": {
"begin": "2016-07-16",
"end": "2016-07-16",
"duration": "P2M"
},
"status": "DRAFT",
"webhooks": {
"camt053": "https://credenA:credenB@app.server.com/listener"
},
"statements": [
{
"date_issue": "2016-07-16T19:20:30+01:00",
"file": "https://api.drop-pay.io/bank/iso20022/v1/reports/ISO145123G6YY/RPT523623G6YY"
}
],
}
Response 400
{
"code": "100",
"description": "Missing arguments"
}
DELETE Delete an existent CAMT 053 job
Delete an existent CAMT 053 job¶
Delete method changes semanthic depending upon origin status, so :
- if origin status is
DRAFT
orSCHEDULED
delete moves order toDELETED
- if origin status is
RUNNING
, delete moves order toCANCELLED
- if origin status is
DONE
, delete returns a409:103
HTTP Status Error
Example¶
Request¶
curl --request DELETE
--url https://api.drop-pay.io/bank/iso20022/v1/camt/053/{id}
--header 'Authorization: Bearer ac9185e9f2984867b11069fd2881ff1a'
URL Parameters
- id:
ISO145123G6YY
- Unique ID of the job
Response 200
{
"id": "ISO145123G6YY",
"description": "my wonderful unstoppable job",
"version": "001.006",
"date_creation": "2016-07-16T19:20:30+01:00",
"iban": "IT00A1000010000393471122333",
"date_range_statement": {
"begin": "2016-07-16",
"end": "2016-07-16",
"duration": "P2M"
},
"status": "CANCELLED",
"webhooks": {
"camt053": "https://credenA:credenB@app.server.com/listener"
},
"statements": [
{
"date_issue": "2016-07-16T19:20:30+01:00",
"file": "https://api.drop-pay.io/bank/iso20022/v1/reports/ISO145123G6YY/RPT523623G6YY"
}
],
}
Response 400
{
"code": "100",
"description": "Missing arguments"
}
Listing CAMT 053 jobs¶
GET Read an existent CAMT 053 job
Read an existent CAMT 053 job¶
WARNING!! no item_offsets, total_items->number of statements, paging on number of jobs
Example¶
Request¶
curl --request GET
--url https://api.drop-pay.io/bank/iso20022/v1/camt/053s/{?iban,status,description,date_from,date_to,pg_offset,pg_size}
--header 'Authorization: Bearer ac9185e9f2984867b11069fd2881ff1a'
URL Parameters
- iban (string, optional) - whole CAMT053 history of a DropPay account
- status (string, optional) - Comma Separated list of Values (CSV) with available status labels.
- description (string, optional) - text search in job's description property
- pg_size: 100 (number,optional)
- pg_offset: 0 (number,optional)
Response 200
`` json { "camt053s": [ { "id": "ISO145123G6YY", "description
my wonderful unstoppable job": "", "version": "001.006", "date_creation
2016-07-16T19:20:30+01:00`": "", "iban": "IT00A1000010000393471122333", "date_range_statement": { "begin": "2016-07-16", "end": "2016-07-16T19:20:30+01:00" }, "status": "DRAFT", "webhooks": { "camt053": "https://credenA:credenB@app.server.com/listener" }, "statements": [ { "date_issue": "2016-07-16T19:20:30+01:00", "file": "https://api.drop-pay.io/bank/iso20022/v1/reports/ISO145123G6YY/393471122333-41208652835.xml" } ],
}
],
"paging_info": {
"current_page": 0,
"total_pages": 0,
"page_size": 0,
"total_items": 0
}
}
```
Group Webhooks & Events¶
Webhooks & Events¶
Your Application can subscribe to the following webhooks
Webhooks
- all: an URL you provide that is enabled to receive a POST with the updated Statement json payload
- camt053: an URL you provide that is enabled to receive a POST with the updated Statement json payload
Add a webhook
property as show below.
"webhooks": {
"camt053": "https://credenA:credenB@app.server.com/listener"
},
Port 443 allowed only (HTTPS)
Please remember that only secure HTTPS on well-known port 443
webhooks are allowed DropPay doesn't validate webhooks URL, but you won't receive any notification event.
Events of useful status updates¶
Event fired when a new camt.053 statement is delivered.
{
"etime": "2017-06-30T12:00:00+01:00",
"etype": "iso20022.camt053.issued",
"edata": { A CAMT053 entity }
}
Event fired when a camt.053 job is complete.
{
"etime": "2017-06-30T12:00:00+01:00",
"etype": "iso20022.camt053.done",
"edata": { A CAMT053 entity }
}
Webhook | Event |
---|---|
camt053, all | iso20022.camt053.issued |
camt053, all | iso20022.camt053.done |