Recurring
Subscription Model
A Subscription Model contains the details of the pricing information for your different products and feature levels. For example, you can have a €30 /month plan for basic offer and a different €100 /month subscription model (plan) for your premium offer.
Subscription Model
A Subscription Model contains the details of the pricing information for your different products and feature levels. For example, you can have a €30 /month plan for basic offer and a different €100 /month subscription model (plan) for your premium offer.
curl -v https://test-api.centralpay.net/v2/rest/subscriptionModel \
-u 'doctest:4I9HJRTd' \
-d amount=2990 \
-d currency='EUR' \
-d name=Abonnement_Test \
-d intervalUnit=MONTH \
-d intervalCount=1 \
-d iterationCount=12
{
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "Abonnement_Test",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 12,
"additionalData": {}
}
Create a subscription model
This function allows you to create a model of subscription.
This function allows you to create a Subscription model
amount | Amount Required: yes |
currency | Currency Required: yes |
name | Display name Required: yes |
intervalUnit | Unit of interval
Required: yesValue must be DAY / WEEK / MONTH / YEAR |
intervalCount | Number of interval
Required: yes Default value is '1' |
merchantSubscriptionModelId UUID (36) |
CentralPay Merchand Subscription Model ID Required: no |
pointOfSaleId UUID (36) |
CentralPay Point Of Sale ID
Required: no |
description | Description Required: no |
iterationCount | Number of iteration
Required: no Default value is '1' |
additionalData String (303) |
Merchant data
Required: no
Note: Number of key/value pairs as it can take multiple key and values. |
curl -v https://test-api.centralpay.net/v2/rest/subscriptionModel \
-u 'doctest:4I9HJRTd' \
-d amount=2990 \
-d currency='EUR' \
-d name=Abonnement_Test \
-d intervalUnit=MONTH \
-d intervalCount=1 \
-d iterationCount=12
{
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "Abonnement_Test",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 12,
"additionalData": {}
}
curl -v https://test-api.centralpay.net/v2/rest/subscriptionModel/6fd1580d-944d-4a94-936d-d47aa56fff59 \
-u 'doctest:4I9HJRTd' \
-d name=cpfmi
{
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
}
Update a Subscription Model
This function allows you to update a Subscription Model
subscriptionModelId (URL) SubscriptionModel |
Subscription Model ID Required: yes Validation: Existing UUID, belongs to the merchant |
merchantSubscriptionModelId String |
Merchant ID Required: no Validation: .{0,100} Unset with null value |
name String |
Display name Required: no Validation: .{3,100} |
description String |
Description Required: no Validation: .{0,256} Unset with null value |
additionalData String (303) |
Merchant data
Required: no |
curl -v https://test-api.centralpay.net/v2/rest/subscriptionModel/6fd1580d-944d-4a94-936d-d47aa56fff59 \
-u 'doctest:4I9HJRTd' \
-d name=cpfmi
{
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
}
GET https://test-api.centralpay.net/v2/rest/subscriptionModel/<subscriptionModelId>
curl -v -X GET https://test-api.centralpay.net/v2/rest/subscriptionModel/6fd1580d-944d-4a94-936d-d47aa56fff59 \
-u 'doctest:4I9HJRTd'
{
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
}
Retrieve a Subscription Model
This function allows tou to retrieve a Subscription Model
subscriptionModelId (URL) SubscriptionModel |
Subscription Model ID Required: yes Validation: Existing UUID belong to the merchant |
GET https://test-api.centralpay.net/v2/rest/subscriptionModel/<subscriptionModelId>
curl -v -X GET https://test-api.centralpay.net/v2/rest/subscriptionModel/6fd1580d-944d-4a94-936d-d47aa56fff59 \
-u 'doctest:4I9HJRTd'
{
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
}
curl -v -X GET https://test-api.centralpay.net/v2/rest/subscriptionModel \
-u 'doctest:4I9HJRTd'
{
"list": [
{
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
{
"subscriptionModelId": "dae6f170-d046-4c42-9d74-68c982577565",
"creationDate": "2020-08-17T10:31:39.237331+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "Abonnement_Test",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
}
],
"totalCount": 11
}
List Subscription Models
This function allows you to list Subscription Models. All the paramers used to search must be passed in the form of queries parameters.
merchantSubscriptionModelId String |
Merchant ID Required: no Validation: .{0,100} |
after String |
Only returns items created after specified date time Example : 2020-08-31T07:13:22.639Z Required: no |
before String |
Only returns items created before specified date time Example : 2020-08-31T07:13:22.639Z Required: no |
limit String |
Number of items to return Default value : 10 Required: no |
page String |
Page index to get Default value : 1 Required: no |
curl -v -X GET https://test-api.centralpay.net/v2/rest/subscriptionModel \
-u 'doctest:4I9HJRTd'
{
"list": [
{
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
{
"subscriptionModelId": "dae6f170-d046-4c42-9d74-68c982577565",
"creationDate": "2020-08-17T10:31:39.237331+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "Abonnement_Test",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
}
],
"totalCount": 11
}
Subscription Model object
The Json "Subscription Model" Object
The "Subscription Model" object response represents a model of subscription.
subscriptionModelId String (36) |
Subscription Model ID Note: UUID Format |
|
creationDate OffsetDateTime |
Creation date | |
merchantSubscriptionModelId String |
Merchant ID | |
pointOfSaleId UUID |
POS ID | |
amount Number |
Unit amout of the echeances | |
currency String |
Currency Note: favorite format |
|
name String |
Display name | |
description String |
Description | |
intervalUnit Enum IntervalUnit |
Interval unit | |
intervalCount Integer |
Number of intervals | |
iterationCount Integer |
Number of interation Note : by default infinite > 1 if DAY : <= 365 if WEEK : <= 50 if MONTH : <= 24 if YEAR : <= 5 if empty : illimited |
|
additionalData[*] Map |
Merchant data |
Subscription
Subscriptions allow you to charge a customer's card on a recurring basis. It represents recurring payment that will be automatically charged on a customer you've previously created. Frequency and amount are defined by a SubscriptionModel.
Subscriptions are billed to customer's current default card.
curl https://test-api.centralpay.net/v2/rest/subscription \
-u 'doctest:4I9HJRTd' \
-d subscriptionModelId=6fd1580d-944d-4a94-936d-d47aa56fff59 \
-d customerId=d3522f3d-c826-4801-9b09-b08ccc72bc77 \
-d endUserIp=245.100.1.15
{
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"creationDate": "2020-08-17T14:08:23.761657+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": null,
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-09-16",
"cancellationDate": null,
"merchantSubscriptionId": null,
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "ACTIVE",
"cancelAtPeriodEnd": null,
"lastInvoice": {
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"creationDate": "2020-08-17T14:08:24.189603+02:00",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "c03301d3-3d5d-4bb4-994a-7b8d5378ef47",
"creationDate": "2020-08-17T14:08:24.021035+02:00",
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"e007d6e3-fb5f-4d4e-b5d7-d6ba9e9f0aaf"
],
"eventReceivedDate": null,
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
}
Create a subscription
This function allows you to create a subscription
subscriptionModelId SubscriptionModel |
Subscription model ID Required: yes Validation: Existing UUID belong to the merchant Attribut subscriptions dans Customer |
endUserIp String |
Final customer IP Required: yes Validation: InetAddressValidator |
customerId Customer |
Customer ID Required: conditional Validation: Existing UUID belong to the merchant Attribut subscriptions in Customer, create a subscription paid by a card. If this field is filled, the walletId and the mandateId must be empty. |
walletId Wallet |
Wallet ID Required: conditional Validation: Existing UUID belong to the merchant Attribut subscriptions in Wallet, create a subscription paid by a wallet transfer. If this field is filled, the customerId and the mandateId must be empty. |
mandateId Customer |
Mandate ID Required: conditional Validation: Existing UUID belong to the merchant Attribut subscriptions in SDDTransaction, create a subscription paid by a sddTransaction. If this field is filled, the walletId and the customerId must be empty. The mandate must be created beforehand. |
endToEndIdentification String |
A unique and specific identification created by the merchant. Required: conditional Validation: must be filled only if the mandateId is filled. |
remittanceInformation String (140) |
Motif of payment. Required: conditional Validation: must be filled only if the mandateId is filled. |
requestedCollectionDate LocalDate |
Date of the deadline of the SDD Transaction Required: conditional Validation : Now or later, in the limit of 15 day after today, must be filled only if the mandateId is filled. |
merchantSubscriptionId String(36) |
Merchant ID Required: no Validation: Between 0 and 100 This value is passed in the HTTP parameter merchantTransactionId when a transaction occurs. |
cardId Card |
Card ID Required: no Validation: Existing UUID belog to the customer not expired at StartingDate By default last sutomer card |
quantity Number |
Quantity Required: no Validation: Greater or equal to 1 by Default 1 |
startingDate LocalDate |
Starting date Required: no Validation: Today or later By default today |
additionalData[*] String |
Merchant data Required: no Validation: Key {45} Value {256} |
3ds[enrollmentId] UUID |
Enrollment ID Required: no Validation: Existing UUID belong to the customer If the merchant used Centralpay's 3DS enrollment system |
3ds[paRes] String |
PaRes Required: No Validation: [A-Za-z0-9+\/]{0,10000}={0,2} If empty, is considered as missing |
3ds[xid] String |
XID Required: No Validation: .{0,20} If empty, is considered as missing |
3ds[cavv] String |
CAVV Required: No Validation: [A-Za-z0-9+\/]{0,45}={0,2} If empty, is considered as missing |
3ds[eci] String |
ECI Required: No Validation: [0-9]{2} If empty, is considered as missing |
3ds[status] Enum ThreeDSstatus |
Statut Required: No Validation: Y | A | N | U If empty, is considered as missing |
curl https://test-api.centralpay.net/v2/rest/subscription \
-u 'doctest:4I9HJRTd' \
-d subscriptionModelId=6fd1580d-944d-4a94-936d-d47aa56fff59 \
-d customerId=d3522f3d-c826-4801-9b09-b08ccc72bc77 \
-d endUserIp=245.100.1.15
{
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"creationDate": "2020-08-17T14:08:23.761657+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": null,
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-09-16",
"cancellationDate": null,
"merchantSubscriptionId": null,
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "ACTIVE",
"cancelAtPeriodEnd": null,
"lastInvoice": {
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"creationDate": "2020-08-17T14:08:24.189603+02:00",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "c03301d3-3d5d-4bb4-994a-7b8d5378ef47",
"creationDate": "2020-08-17T14:08:24.021035+02:00",
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"e007d6e3-fb5f-4d4e-b5d7-d6ba9e9f0aaf"
],
"eventReceivedDate": null,
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
}
curl https://test-api.centralpay.net/v2/rest/subscription/9548a03e-9822-4be2-b10c-4605cf7033b0 \
-u 'doctest:4I9HJRTd' \
-d merchantSubscriptionId=REF_FMI
{
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"creationDate": "2020-08-17T14:08:23.761657+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": null,
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-09-16",
"cancellationDate": null,
"merchantSubscriptionId": "REF_FMI",
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "ACTIVE",
"cancelAtPeriodEnd": null,
"lastInvoice": {
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"creationDate": "2020-08-17T14:08:24.189603+02:00",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "c03301d3-3d5d-4bb4-994a-7b8d5378ef47",
"creationDate": "2020-08-17T14:08:24.021035+02:00",
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"e007d6e3-fb5f-4d4e-b5d7-d6ba9e9f0aaf"
],
"eventReceivedDate": null,
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
}
Update a subscription
This function allows you to update a subscription.
subscriptionId (URL) Subscription |
Subscription ID Required: yes Validation: Existing UUID belongs to the merchant |
merchantSubscriptionId String(36) |
Merchant ID Required: no Validation: Between 0 and 100 Unset with null value |
cardId Card |
Card ID Required: no Validation: Existing UUID belongs to the not expired customer |
quantity Number |
Quantity Required: no Validation: greater than or equal to 1 Required: no is concidered at the next invoice |
additionalData[*] String |
Merchant data Required: no Validation: Key {45} Value {256} Unset with null value |
3ds[enrollmentId] UUID |
Enlistment ID Required: no Validation: Existing UUID belong to the customer Si le marchand est passé via notre MPI, juste pour tracer |
3ds[threeDSServerTransID] UUID |
3-D Secure 2 threeDSServerTransID Required: no |
3ds[paRes] String |
PaRes Required: No Validation: [A-Za-z0-9+\/]{0,10000}={0,2} If empty, is considered as missing |
3ds[xid] String |
XID Required: No Validation: .{0,20} If empty, is considered as missing |
3ds[cavv] String |
CAVV Required: No Validation: [A-Za-z0-9+\/]{0,45}={0,2} If empty, is considered as missing |
3ds[eci] String |
ECI Required: No Validation: [0-9]{2} If empty, is considered as missing |
3ds[status] Enum ThreeDSstatus |
Statut Required: No Validation: Y | A | N | U If empty, is considered as missing |
curl https://test-api.centralpay.net/v2/rest/subscription/9548a03e-9822-4be2-b10c-4605cf7033b0 \
-u 'doctest:4I9HJRTd' \
-d merchantSubscriptionId=REF_FMI
{
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"creationDate": "2020-08-17T14:08:23.761657+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": null,
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-09-16",
"cancellationDate": null,
"merchantSubscriptionId": "REF_FMI",
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "ACTIVE",
"cancelAtPeriodEnd": null,
"lastInvoice": {
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"creationDate": "2020-08-17T14:08:24.189603+02:00",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "c03301d3-3d5d-4bb4-994a-7b8d5378ef47",
"creationDate": "2020-08-17T14:08:24.021035+02:00",
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"e007d6e3-fb5f-4d4e-b5d7-d6ba9e9f0aaf"
],
"eventReceivedDate": null,
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
}
curl -v -X POST https://test-api.centralpay.net/v2/rest/subscription/9548a03e-9822-4be2-b10c-4605cf7033b0/cancel \
-H 'Content-Type:application/x-www-form-urlencoded' \
-H 'Origin: https://example.centralpay.net' \
-u 'doctest:4I9HJRTd'
curl -v -X POST https://test-api.centralpay.net/v2/rest/subscription/9c36005f-4c54-4d57-b17a-75383a3f4656/cancel \
-H 'Content-Type:application/x-www-form-urlencoded' \
-H 'Origin: https://example.centralpay.net' \
-u 'doctest:4I9HJRTd' \
-d atPeriodEnd=true
{
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"creationDate": "2020-08-17T14:08:23.761657+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": "2020-08-17",
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-08-17",
"cancellationDate": "2020-08-17T14:45:52.740403+02:00",
"merchantSubscriptionId": "REF_FMI",
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "CANCELED",
"cancelAtPeriodEnd": false,
"lastInvoice": {
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"creationDate": "2020-08-17T14:08:24.189603+02:00",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "c03301d3-3d5d-4bb4-994a-7b8d5378ef47",
"creationDate": "2020-08-17T14:08:24.021035+02:00",
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"e007d6e3-fb5f-4d4e-b5d7-d6ba9e9f0aaf"
],
"eventReceivedDate": null,
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
}
Cancel a Subscription
This function allows you to cancel a Subscription with the Subscription ID.
subscriptionId (URL) Subscription |
Subscription ID Required: yes Validation: Existing UUID belong to the merchant |
atPeriodEnd Boolean |
Canceled at current period end Required: no Validation: False if subscription has not start (currentPeriodStart = NULL) False by default |
curl -v -X POST https://test-api.centralpay.net/v2/rest/subscription/9548a03e-9822-4be2-b10c-4605cf7033b0/cancel \
-H 'Content-Type:application/x-www-form-urlencoded' \
-H 'Origin: https://example.centralpay.net' \
-u 'doctest:4I9HJRTd'
curl -v -X POST https://test-api.centralpay.net/v2/rest/subscription/9c36005f-4c54-4d57-b17a-75383a3f4656/cancel \
-H 'Content-Type:application/x-www-form-urlencoded' \
-H 'Origin: https://example.centralpay.net' \
-u 'doctest:4I9HJRTd' \
-d atPeriodEnd=true
{
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"creationDate": "2020-08-17T14:08:23.761657+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": "2020-08-17",
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-08-17",
"cancellationDate": "2020-08-17T14:45:52.740403+02:00",
"merchantSubscriptionId": "REF_FMI",
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "CANCELED",
"cancelAtPeriodEnd": false,
"lastInvoice": {
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"creationDate": "2020-08-17T14:08:24.189603+02:00",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "c03301d3-3d5d-4bb4-994a-7b8d5378ef47",
"creationDate": "2020-08-17T14:08:24.021035+02:00",
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"e007d6e3-fb5f-4d4e-b5d7-d6ba9e9f0aaf"
],
"eventReceivedDate": null,
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
}
POST https://test-api.centralpay.net/v2/rest/subscription/<subscriptionId>/reactivate
curl -v -X POST https://test-api.centralpay.net/v2/rest/subscription/9c36005f-4c54-4d57-b17a-75383a3f4656/reactivate \
-H 'Content-Type:application/x-www-form-urlencoded' \
-H 'Origin: https://example.centralpay.net' \
-u 'doctest:4I9HJRTd'
{
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"creationDate": "2020-08-17T14:55:14.178041+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": null,
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-09-16",
"cancellationDate": null,
"merchantSubscriptionId": null,
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "ACTIVE",
"cancelAtPeriodEnd": null,
"lastInvoice": {
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"creationDate": "2020-08-17T14:55:14.566736+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "cb4ae59f-67c3-487a-875d-2d99b134c870",
"creationDate": "2020-08-17T14:55:14.400708+02:00",
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"474b44e4-8819-4a45-884f-b32b26445a0a"
],
"eventReceivedDate": null,
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
}
Reactivate a Subscription
This function allows you to reactivate a Subscription
subscriptionId (URL) Subscription |
Subscription ID Required: yes Validation: Existing UUID, belongs to the merchant |
POST https://test-api.centralpay.net/v2/rest/subscription/<subscriptionId>/reactivate
curl -v -X POST https://test-api.centralpay.net/v2/rest/subscription/9c36005f-4c54-4d57-b17a-75383a3f4656/reactivate \
-H 'Content-Type:application/x-www-form-urlencoded' \
-H 'Origin: https://example.centralpay.net' \
-u 'doctest:4I9HJRTd'
{
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"creationDate": "2020-08-17T14:55:14.178041+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": null,
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-09-16",
"cancellationDate": null,
"merchantSubscriptionId": null,
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "ACTIVE",
"cancelAtPeriodEnd": null,
"lastInvoice": {
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"creationDate": "2020-08-17T14:55:14.566736+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "cb4ae59f-67c3-487a-875d-2d99b134c870",
"creationDate": "2020-08-17T14:55:14.400708+02:00",
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"474b44e4-8819-4a45-884f-b32b26445a0a"
],
"eventReceivedDate": null,
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
}
curl https://test-api.centralpay.net/v2/rest/subscription/9c36005f-4c54-4d57-b17a-75383a3f4656 \
-u 'doctest:4I9HJRTd'
{
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"creationDate": "2020-08-17T14:55:14.178041+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": null,
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-09-16",
"cancellationDate": null,
"merchantSubscriptionId": null,
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "ACTIVE",
"cancelAtPeriodEnd": null,
"lastInvoice": {
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"creationDate": "2020-08-17T14:55:14.566736+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "cb4ae59f-67c3-487a-875d-2d99b134c870",
"creationDate": "2020-08-17T14:55:14.400708+02:00",
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"474b44e4-8819-4a45-884f-b32b26445a0a"
],
"eventReceivedDate": "2020-08-17T15:01:31.639621+02:00",
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
}
Retrieve a Subscription
This function allows you to retrieve a Subscription
subscriptionId (URL) Subscription |
Subscription ID Required: yes Validation: Existing UUID belong to the merchant |
curl https://test-api.centralpay.net/v2/rest/subscription/9c36005f-4c54-4d57-b17a-75383a3f4656 \
-u 'doctest:4I9HJRTd'
{
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"creationDate": "2020-08-17T14:55:14.178041+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": null,
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-09-16",
"cancellationDate": null,
"merchantSubscriptionId": null,
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "ACTIVE",
"cancelAtPeriodEnd": null,
"lastInvoice": {
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"creationDate": "2020-08-17T14:55:14.566736+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "cb4ae59f-67c3-487a-875d-2d99b134c870",
"creationDate": "2020-08-17T14:55:14.400708+02:00",
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"474b44e4-8819-4a45-884f-b32b26445a0a"
],
"eventReceivedDate": "2020-08-17T15:01:31.639621+02:00",
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
}
curl -v https://test-api.centralpay.net/v2/rest/invoice \
-u 'doctest:4I9HJRTd'
{
"list": [
{
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"creationDate": "2020-08-17T14:55:14.178041+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": null,
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-09-16",
"cancellationDate": null,
"merchantSubscriptionId": null,
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "ACTIVE",
"cancelAtPeriodEnd": null,
"lastInvoice": {
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"creationDate": "2020-08-17T14:55:14.566736+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "cb4ae59f-67c3-487a-875d-2d99b134c870",
"creationDate": "2020-08-17T14:55:14.400708+02:00",
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"474b44e4-8819-4a45-884f-b32b26445a0a"
],
"eventReceivedDate": "2020-08-17T15:01:31.639621+02:00",
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
},
{
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"creationDate": "2020-08-17T14:08:23.761657+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": "2020-08-17",
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-08-17",
"cancellationDate": "2020-08-17T14:45:52.740403+02:00",
"merchantSubscriptionId": "REF_FMI",
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "CANCELED",
"cancelAtPeriodEnd": false,
"lastInvoice": {
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"creationDate": "2020-08-17T14:08:24.189603+02:00",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "c03301d3-3d5d-4bb4-994a-7b8d5378ef47",
"creationDate": "2020-08-17T14:08:24.021035+02:00",
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"e007d6e3-fb5f-4d4e-b5d7-d6ba9e9f0aaf"
],
"eventReceivedDate": "2020-08-17T15:01:31.606086+02:00",
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
}
],
"totalCount": 133
}
List Subscriptions
This function allows you to list Subscriptions. All the paramers used to search must be passed in the form of queries parameters.
merchantSubscriptionId String |
Merchant ID Required: no Validation: .{0,100} |
subscriptionModelId SubscriptionModel |
Subscription model ID Required: no Validation: Existing UUDI belong to the merchant |
customerId Customer |
Customer ID Required: no Validation: Existing UUDI belong to the merchant |
status SubscriptionStatus |
Statut Required: no |
after String |
Only returns items created after specified date time Example : 2020-08-31T07:13:22.639Z Required: no |
before String |
Only returns items created before specified date time Example : 2020-08-31T07:13:22.639Z Required: no |
limit String |
Number of items to return Default value : 10 Required: no |
page String |
Page index to get Default value : 1 Required: no |
curl -v https://test-api.centralpay.net/v2/rest/invoice \
-u 'doctest:4I9HJRTd'
{
"list": [
{
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"creationDate": "2020-08-17T14:55:14.178041+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": null,
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-09-16",
"cancellationDate": null,
"merchantSubscriptionId": null,
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "ACTIVE",
"cancelAtPeriodEnd": null,
"lastInvoice": {
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"creationDate": "2020-08-17T14:55:14.566736+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "cb4ae59f-67c3-487a-875d-2d99b134c870",
"creationDate": "2020-08-17T14:55:14.400708+02:00",
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"474b44e4-8819-4a45-884f-b32b26445a0a"
],
"eventReceivedDate": "2020-08-17T15:01:31.639621+02:00",
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
},
{
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"creationDate": "2020-08-17T14:08:23.761657+02:00",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"cardId": "b73905be-9959-4f20-a6fd-01ae2c5da7fe",
"startingDate": "2020-08-17",
"endingDate": "2020-08-17",
"expectedEndingDate": null,
"currentPeriodStart": "2020-08-17",
"currentPeriodEnd": "2020-08-17",
"cancellationDate": "2020-08-17T14:45:52.740403+02:00",
"merchantSubscriptionId": "REF_FMI",
"subscriptionModel": {
"subscriptionModelId": "6fd1580d-944d-4a94-936d-d47aa56fff59",
"creationDate": "2020-08-17T10:32:36.408511+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"merchantSubscriptionModelId": null,
"amount": 2990,
"currency": "EUR",
"name": "cpfmi",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": null,
"additionalData": {}
},
"quantity": 1,
"status": "CANCELED",
"cancelAtPeriodEnd": false,
"lastInvoice": {
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"creationDate": "2020-08-17T14:08:24.189603+02:00",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "c03301d3-3d5d-4bb4-994a-7b8d5378ef47",
"creationDate": "2020-08-17T14:08:24.021035+02:00",
"invoiceId": "3797b1aa-6d70-4520-907c-9114ecd000c8",
"subscriptionId": "9548a03e-9822-4be2-b10c-4605cf7033b0",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"type": "SUBSCRIPTION",
"nextTransactionAttempt": null,
"transactions": [
"e007d6e3-fb5f-4d4e-b5d7-d6ba9e9f0aaf"
],
"eventReceivedDate": "2020-08-17T15:01:31.606086+02:00",
"additionalData": {}
},
"endUserIp": "245.100.1.15",
"endUserLanguage": null,
"redirect": null,
"additionalData": {}
}
],
"totalCount": 133
}
Subscription object
The Json "Subscription" Object
The "Subscription" object response represents a subscription.
subscriptionId String (36) |
Subscription ID Note: UUID Format |
creationDate OffsetDateTime |
Creation date |
merchantSubscriptionId String |
Merchant ID |
subscriptionModel String |
Subscription model |
customerId String (36) |
Customer ID |
endUserIp String |
End user IP |
cardId Enum RefundStatus |
Card ID |
quantity Integer |
Quantity |
startingDate String |
Subscription starting date |
endingDate Object |
Subscription ending date |
currentPeriodStart LocalDate |
Current periode starting date |
currentPeriodEnd LocalDate |
Current periode ending date |
status SubscriptionStatus |
Statut ACTIVE | CANCELED | FAILURE | UNPAID |
cancellationDate OffsetDateTime |
Cancellation date ( action ) |
cancelAtPeriodEnd OffsetDateTime |
Canceled at period end |
lastInvoice Invoice |
Last date of payment |
paymentRequestBreakdownId UUID |
Identifier UUID of the PaymentRequestBreakdown Note: Not empty if the subscription is linked to a Payment Request |
paymentRequestId UUID |
Identifier UUID of the Payment Request Note: Not empty if the subscription is linked to a Payment Request |
additionalData[*] Map |
merchant data |
Invoice Item
Invoice Item
InvoiceItem object
The Json "InvoiceItem" Object
The "InvoiceItem" object response represents a InvoiceItem
invoiceItemId String (36) |
InvoiceItem ID Note: UUID Format |
creationDate OffsetDateTime |
Creation date |
merchantInvoiceItemId String |
Merchant ID |
quantity Integer |
Quantity |
amount Integer |
Unit amount |
totalAmount Integer |
Total amount quantity * amount |
currency String |
Devise favorite format Via Invoice |
description String |
Description |
InvoiceID UUID |
Invoice ID |
subscriptionId UUID |
Subscription ID Via the Invoice or Subscription |
customerId UUID |
Customer ID Via the Invoice or Subscription |
type Enum CreationSource |
Type SUBSCRIPTION | MANUAL |
additionalData[*] Map |
merchant data |
curl -v https://test-api.centralpay.net/v2/rest/invoiceItem \
-u 'doctest:4I9HJRTd' \
-d subscriptionId=9c36005f-4c54-4d57-b17a-75383a3f4656 \
-d amount=4500 \
-d quantity=5
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": null,
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 4500,
"totalAmount": 4500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
Create InvoiceItem
This function allows you to create an InvoiceItem
subscriptionId Subscription |
Subscription ID Required: yes Validation: Existing UUID, belongs to the merchant |
amount Number |
Unit amount Required: yes Validation: >= -9999999 et <= 9999999 In cents |
merchantInvoiceItemId String |
Merchant ID Required: no Validation: .{0,100} |
invoiceId Invoice |
Invoice ID Required: no Validation: UUID Existing,belongs to the merchant |
quantity Number |
Quantity Required: no Validation: Greater or equal to 1 1 By default |
description String |
Description Required: no Validation: .{0,256} |
additionalData[*] String |
Merchant data Required: no Validation: Key : .{45} |
curl -v https://test-api.centralpay.net/v2/rest/invoiceItem \
-u 'doctest:4I9HJRTd' \
-d subscriptionId=9c36005f-4c54-4d57-b17a-75383a3f4656 \
-d amount=4500 \
-d quantity=5
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": null,
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 4500,
"totalAmount": 4500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
curl https://test-api.centralpay.net/v2/rest/invoiceItem/bcd39c36-6c81-4210-8d96-b4338ab97b50 \
-u 'doctest:4I9HJRTd' \
-d quantity=3
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": null,
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
Update an InvoiceItem
This function allows you to update an InvoiceItem
invoiceItemId (URL) InvoiceItem |
InvoiceItem ID Required: yes Validation: Existing UUID belongs to the merchant |
merchantInvoiceItemId String |
Merchant ID Required: no Validation: .{0,100} Unset with null value |
quantity Number |
Quantity Required: no Validation: >=1 Recalculate totalAmount |
amount Number |
Unit amount Required: no Validation: >= -9999999 et <= 9999999 Recalcuate totalAmount |
description String |
Description Required: no Validation: .{0,256} Unset with null value |
additionalData[*] String |
Merchant data Required: no Validation: key : .{45} Unset with null value |
curl https://test-api.centralpay.net/v2/rest/invoiceItem/bcd39c36-6c81-4210-8d96-b4338ab97b50 \
-u 'doctest:4I9HJRTd' \
-d quantity=3
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": null,
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
curl -v -X DELETE https://test-api.centralpay.net/v2/rest/invoiceItem/cd774afd-9109-4667-8199-426390996c10 \
-H 'Content-Type:application/x-www-form-urlencoded' \
-u 'doctest:4I9HJRTd'
{
"invoiceItemId": "cd774afd-9109-4667-8199-426390996c10",
"creationDate": "2020-08-17T17:31:32.444552+02:00",
"invoiceId": null,
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 4500,
"totalAmount": 4500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
Delete an InvoiceItem
This function allows you to delete an InvoiceItem
invoiceItemId (URL) InvoiceItem |
InvoiceItem ID Required: yes Validation: Existing UUID belong to the merchant |
curl -v -X DELETE https://test-api.centralpay.net/v2/rest/invoiceItem/cd774afd-9109-4667-8199-426390996c10 \
-H 'Content-Type:application/x-www-form-urlencoded' \
-u 'doctest:4I9HJRTd'
{
"invoiceItemId": "cd774afd-9109-4667-8199-426390996c10",
"creationDate": "2020-08-17T17:31:32.444552+02:00",
"invoiceId": null,
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 4500,
"totalAmount": 4500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
curl https://test-api.centralpay.net/v2/rest/invoiceItem/bcd39c36-6c81-4210-8d96-b4338ab97b50 \
-u 'doctest:4I9HJRTd'
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": null,
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
Retrieve an InvoiceItem
This function allows to retrieve an InvoiceItem
invoiceItemId (URL) InvoiceItem |
InvoiceItem ID Required: yes Validation: Existing UUID belongs to the merchant |
curl https://test-api.centralpay.net/v2/rest/invoiceItem/bcd39c36-6c81-4210-8d96-b4338ab97b50 \
-u 'doctest:4I9HJRTd'
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": null,
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
curl https://test-api.centralpay.net/v2/rest/invoiceItem \
-u 'doctest:4I9HJRTd'
{
"list": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": null,
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"additionalData": {}
},
{
"invoiceItemId": "cb4ae59f-67c3-487a-875d-2d99b134c870",
"creationDate": "2020-08-17T14:55:14.400708+02:00",
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"additionalData": {}
}
],
"totalCount": 29128
}
List InvoiceItems
This function allows you to list InvoiceItems. All the paramers used to search must be passed in the form of queries parameters.
merchantInvoiceItemId
String |
Merchant ID Required: no Validation: .{0,100} |
subscriptionId
Subscription |
Subscription ID Required: no Validation: Existing UUID belongs to the merchant |
customerId
Customer |
Customer ID Required: no Validation: Existing UUID belongs to the merchant |
type
Enum CreationSource |
Type Required: no |
after String |
Only returns items created after specified date time Example : 2020-08-31T07:13:22.639Z Required: no |
before String |
Only returns items created before specified date time Example : 2020-08-31T07:13:22.639Z Required: no |
limit String |
Number of items to return Default value : 10 Required: no |
page String |
Page index to get Default value : 1 Required: no |
walletId UUID |
ID du wallet Required: no |
mandateId UUID |
ID du mandat Required: no |
curl https://test-api.centralpay.net/v2/rest/invoiceItem \
-u 'doctest:4I9HJRTd'
{
"list": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": null,
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"additionalData": {}
},
{
"invoiceItemId": "cb4ae59f-67c3-487a-875d-2d99b134c870",
"creationDate": "2020-08-17T14:55:14.400708+02:00",
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"additionalData": {}
}
],
"totalCount": 29128
}
Invoice
Invoices are statements of what a customer owes for a billing period. It includes subscriptions, invoice items or any adjustments you'd need to make.
Once an invoice is created, payment is automatically attempted. You can define the time you wish the invoice is started on merchant portal.
Note that the payment, while automatic, does not happen exactly at the time of invoice creation. If you have configured webhooks, the invoice will wait until one hour after the last webhook is successfully sent (or the last webhook times out after failing).
curl https://test-api.centralpay.net/v2/rest/invoice \
-u 'doctest:4I9HJRTd' \
-d subscriptionId=9c36005f-4c54-4d57-b17a-75383a3f4656
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": false,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": null,
"attemptCount": 0,
"paid": false,
"type": "MANUAL",
"nextTransactionAttempt": "2020-08-18T04:00+02:00",
"transactions": [],
"eventReceivedDate": null,
"additionalData": {}
}
Create an Invoice
This function allows you to create an Invoice
subscriptionId Subscription |
Subscription ID Required: yes Validation: Existing UUID, belongs to the merchant |
merchantInvoiceId String |
Merchant ID Required: no Validation: .{0,100} |
description String |
Description Required: no Validation: .{0,256} |
additionalData[*] String |
Merchant ID Required: no Validation: key : .{45} |
curl https://test-api.centralpay.net/v2/rest/invoice \
-u 'doctest:4I9HJRTd' \
-d subscriptionId=9c36005f-4c54-4d57-b17a-75383a3f4656
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": false,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": null,
"attemptCount": 0,
"paid": false,
"type": "MANUAL",
"nextTransactionAttempt": "2020-08-18T04:00+02:00",
"transactions": [],
"eventReceivedDate": null,
"additionalData": {}
}
curl -v https://test-api.centralpay.net/v2/rest/invoice/33787ac4-73b6-4217-894d-9b4ae45da9f5 \
-u 'doctest:4I9HJRTd' \
-d description=Facture_Abonnement_Sport
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": false,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": "Facture_Abonnement_Sport",
"attemptCount": 0,
"paid": false,
"type": "MANUAL",
"nextTransactionAttempt": "2020-08-18T04:00+02:00",
"transactions": [],
"eventReceivedDate": null,
"additionalData": {}
}
Update an Invoice
This function allows you to update an Invoice
invoiceId (URL) Invoice |
Invoice ID Required: yes Validation: Existing UUID belongs to the merchant |
merchantInvoiceId String |
Merchant ID Required: no Validation: .{0,100} Unset with null value |
description String |
Description Required: no Validation: .{0,256} Unset with null value |
additionalData[*] String |
Merchant data Required: no Validation: key : .{45} Unset with null value |
curl -v https://test-api.centralpay.net/v2/rest/invoice/33787ac4-73b6-4217-894d-9b4ae45da9f5 \
-u 'doctest:4I9HJRTd' \
-d description=Facture_Abonnement_Sport
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": false,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": "Facture_Abonnement_Sport",
"attemptCount": 0,
"paid": false,
"type": "MANUAL",
"nextTransactionAttempt": "2020-08-18T04:00+02:00",
"transactions": [],
"eventReceivedDate": null,
"additionalData": {}
}
POST https://test-api.centralpay.net/v2/rest/invoice/<invoiceId>/close
OBJ Json de type Invoice
curl -v -X POST https://test-api.centralpay.net/v2/rest/invoice/33787ac4-73b6-4217-894d-9b4ae45da9f5/close \
-H 'Content-Type:application/x-www-form-urlencoded' \
-u 'doctest:4I9HJRTd'
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": "Facture_Abonnement_Sport",
"attemptCount": 0,
"paid": false,
"type": "MANUAL",
"nextTransactionAttempt": "2020-08-18T04:00+02:00",
"transactions": [],
"eventReceivedDate": "2020-08-17T17:01:30.081438+02:00",
"additionalData": {}
}
Close an Invoice
This function allows you to close an Invoice
invoiceId (URL) Invoice |
Invoice ID Required: yes Validation: Existing UUID belongs to the merchant |
POST https://test-api.centralpay.net/v2/rest/invoice/<invoiceId>/close
OBJ Json de type Invoice
curl -v -X POST https://test-api.centralpay.net/v2/rest/invoice/33787ac4-73b6-4217-894d-9b4ae45da9f5/close \
-H 'Content-Type:application/x-www-form-urlencoded' \
-u 'doctest:4I9HJRTd'
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": "Facture_Abonnement_Sport",
"attemptCount": 0,
"paid": false,
"type": "MANUAL",
"nextTransactionAttempt": "2020-08-18T04:00+02:00",
"transactions": [],
"eventReceivedDate": "2020-08-17T17:01:30.081438+02:00",
"additionalData": {}
}
curl -v -X POST https://test-api.centralpay.net/v2/rest/invoice/33787ac4-73b6-4217-894d-9b4ae45da9f5/reopen \
-H 'Content-Type:application/x-www-form-urlencoded' \
-u 'doctest:4I9HJRTd'
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": false,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": "Facture_Abonnement_Sport",
"attemptCount": 0,
"paid": false,
"type": "MANUAL",
"nextTransactionAttempt": "2020-08-18T04:00+02:00",
"transactions": [],
"eventReceivedDate": "2020-08-17T17:01:30.081438+02:00",
"additionalData": {}
}
Reopen an Invoice
This function allows you to reopen an Invoice
invoiceId (URL) Invoice |
Invoice ID Required: yes Validation: Existing UUID belongs to the merchant |
curl -v -X POST https://test-api.centralpay.net/v2/rest/invoice/33787ac4-73b6-4217-894d-9b4ae45da9f5/reopen \
-H 'Content-Type:application/x-www-form-urlencoded' \
-u 'doctest:4I9HJRTd'
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": false,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": "Facture_Abonnement_Sport",
"attemptCount": 0,
"paid": false,
"type": "MANUAL",
"nextTransactionAttempt": "2020-08-18T04:00+02:00",
"transactions": [],
"eventReceivedDate": "2020-08-17T17:01:30.081438+02:00",
"additionalData": {}
}
curl -v -X POST https://test-api.centralpay.net/v2/rest/invoice/33787ac4-73b6-4217-894d-9b4ae45da9f5/pay \
-H 'Content-Type:application/x-www-form-urlencoded' \
-u 'doctest:4I9HJRTd'
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": "Facture_Abonnement_Sport",
"attemptCount": 0,
"paid": true,
"type": "MANUAL",
"nextTransactionAttempt": null,
"transactions": [
"4fd19e9a-4219-44a7-b829-477bb7c24298"
],
"eventReceivedDate": "2020-08-17T17:01:30.081438+02:00",
"additionalData": {}
}
Pay an Invoice
This function allows you to pay an Invoice
invoiceId (URL) Invoice |
Invoice ID Required: yes Validation: Existing UUID belongs to the merchant |
curl -v -X POST https://test-api.centralpay.net/v2/rest/invoice/33787ac4-73b6-4217-894d-9b4ae45da9f5/pay \
-H 'Content-Type:application/x-www-form-urlencoded' \
-u 'doctest:4I9HJRTd'
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": "Facture_Abonnement_Sport",
"attemptCount": 0,
"paid": true,
"type": "MANUAL",
"nextTransactionAttempt": null,
"transactions": [
"4fd19e9a-4219-44a7-b829-477bb7c24298"
],
"eventReceivedDate": "2020-08-17T17:01:30.081438+02:00",
"additionalData": {}
}
curl -v https://test-api.centralpay.net/v2/rest/invoice/33787ac4-73b6-4217-894d-9b4ae45da9f5 \
-u 'doctest:4I9HJRTd'
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": "Facture_Abonnement_Sport",
"attemptCount": 0,
"paid": true,
"type": "MANUAL",
"nextTransactionAttempt": null,
"transactions": [
"4fd19e9a-4219-44a7-b829-477bb7c24298"
],
"eventReceivedDate": "2020-08-17T17:01:30.081438+02:00",
"additionalData": {}
}
Retrieve an Invoice
This function allows you to retrieve an Invoice
invoiceId (URL) Invoice |
Invoice ID Required: yes Validation: Existing UUID belongs to the merchant |
curl -v https://test-api.centralpay.net/v2/rest/invoice/33787ac4-73b6-4217-894d-9b4ae45da9f5 \
-u 'doctest:4I9HJRTd'
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": "Facture_Abonnement_Sport",
"attemptCount": 0,
"paid": true,
"type": "MANUAL",
"nextTransactionAttempt": null,
"transactions": [
"4fd19e9a-4219-44a7-b829-477bb7c24298"
],
"eventReceivedDate": "2020-08-17T17:01:30.081438+02:00",
"additionalData": {}
}
GET https://test-api.centralpay.net/v2/rest/invoice
List OBJ Json de type invoice
curl -v https://test-api.centralpay.net/v2/rest/invoice \
-u 'doctest:4I9HJRTd'
{
"list": [
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": "Facture_Abonnement_Sport",
"attemptCount": 0,
"paid": true,
"nextTransactionAttempt": null,
"transactions": [
"4fd19e9a-4219-44a7-b829-477bb7c24298"
],
"eventReceivedDate": "2020-08-17T17:01:30.081438+02:00",
"additionalData": {}
},
{
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"creationDate": "2020-08-17T14:55:14.566736+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "cb4ae59f-67c3-487a-875d-2d99b134c870",
"creationDate": "2020-08-17T14:55:14.400708+02:00",
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"nextTransactionAttempt": null,
"transactions": [
"474b44e4-8819-4a45-884f-b32b26445a0a"
],
"eventReceivedDate": "2020-08-17T15:01:31.639621+02:00",
"additionalData": {}
}
],
"totalCount": 29128
}
List Invoices
This function allows you to list Invoices. All the paramers used to search must be passed in the form of queries parameters.
merchantInvoiceId String |
Merchant ID Required: no Validation: .{0,100} |
subscriptionId Subscription |
Subscription ID Required: no Validation: Existing UUID belongs to the merchant |
customerId Customer |
Customer ID Required: no Validation: Existing UUID belongs to the merchant |
paid Boolean |
Paid Required: no |
type Enum CreationSource |
Type Required: no |
after String |
Only returns items created after specified date time Example : 2020-08-31T07:13:22.639Z Required: no |
before String |
Only returns items created before specified date time Example : 2020-08-31T07:13:22.639Z Required: no |
limit String |
Number of items to return Default value : 10 Required: no |
page String |
Page index to get Default value : 1 Required: no |
walletId UUID |
ID du wallet Required: no |
mandateId UUID |
ID du mandat Required: no |
GET https://test-api.centralpay.net/v2/rest/invoice
List OBJ Json de type invoice
curl -v https://test-api.centralpay.net/v2/rest/invoice \
-u 'doctest:4I9HJRTd'
{
"list": [
{
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"creationDate": "2020-08-17T16:40:50.707035+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 13500,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "bcd39c36-6c81-4210-8d96-b4338ab97b50",
"creationDate": "2020-08-17T16:07:07.806274+02:00",
"invoiceId": "33787ac4-73b6-4217-894d-9b4ae45da9f5",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 3,
"amount": 4500,
"totalAmount": 13500,
"currency": "EUR",
"description": null,
"type": "MANUAL",
"additionalData": {}
}
],
"description": "Facture_Abonnement_Sport",
"attemptCount": 0,
"paid": true,
"nextTransactionAttempt": null,
"transactions": [
"4fd19e9a-4219-44a7-b829-477bb7c24298"
],
"eventReceivedDate": "2020-08-17T17:01:30.081438+02:00",
"additionalData": {}
},
{
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"creationDate": "2020-08-17T14:55:14.566736+02:00",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceId": null,
"amount": 2990,
"currency": "EUR",
"closed": true,
"invoiceItems": [
{
"invoiceItemId": "cb4ae59f-67c3-487a-875d-2d99b134c870",
"creationDate": "2020-08-17T14:55:14.400708+02:00",
"invoiceId": "90771a41-9557-4993-9238-b6ccf6e94746",
"subscriptionId": "9c36005f-4c54-4d57-b17a-75383a3f4656",
"customerId": "d3522f3d-c826-4801-9b09-b08ccc72bc77",
"merchantInvoiceItemId": null,
"quantity": 1,
"amount": 2990,
"totalAmount": 2990,
"currency": "EUR",
"description": null,
"type": "SUBSCRIPTION",
"additionalData": {}
}
],
"description": null,
"attemptCount": 1,
"paid": true,
"nextTransactionAttempt": null,
"transactions": [
"474b44e4-8819-4a45-884f-b32b26445a0a"
],
"eventReceivedDate": "2020-08-17T15:01:31.639621+02:00",
"additionalData": {}
}
],
"totalCount": 29128
}
Invoice Object
The Json "Invoice" Object
The « Invoice» object represents the invoice of a transaction.
Note: UUID Format
InvoiceId String (36) |
Invoice ID Note: UUID Format |
|
creationDate OffsetDateTime |
Creation date | |
merchantInvoiceId String |
Merchant ID | |
subscriptionId String (36) |
Subscription ID | |
customerId String (36) |
Customer ID Note: UUID Format |
|
amount Integer |
Total amount Note: Via Subscription |
|
currency String |
Devise Note: Via SubscriptionModel Favorite format |
|
closed Boolean |
Is closed Note: At the creation : if subscription.status = UNPAID alors closed = true else closed = false |
|
invoiceItems List "InvoiceItem" |
Items list Note: At the creation : associate all the pending InvoiceItems and disassociate them from the Subscription |
|
description String |
Description | |
attemptCount Integer |
Number of auto transaction tests Note: 0 when created |
|
nextTransactionAttempt OffsetDateTime |
Date of the next transaction test Note: Use the hour of transaction Invoice (h) in the Merchant configuration. If now <= h : today at hour (h) if not then tomorrow hour (h) |
|
paid Boolean |
Paid Note: False when created |
|
transactions List "UUID" |
List of transactions ID Note: Empty when created |
|
eventReceivedDate OffsetDateTime |
Receipt date of creation event Note: Actual date if the event X is not listen, or filled after the event beginning (not at the creation) |
|
type Enum CreationSource |
Type Note: SUBSCRIPTION | MANUAL |
|
additionalData[*] Map |
Merchant data |
Installment Payment
Scheduled Payments or split payments allows customers to pay for a purchase in several instalments, instead of one single payment.
This is usually done for large amounts, so that the customer doesn't have to spend too much at once for an order.
Centralpay platform will process the first installment immediately or at a specified date (startingDate).
Centralpay can also allow the merchant :
- to charge some additional extra fees (feeAmount) that will be added to the amount.
- to define a deposit (depositAmount) that will be deducted from the amount. It can also start at a specific date (depositStartingDate)
Note: round up are applied to the first payment (not applied if the deposit is used)
In case of acceptation of the first installment by the issuing bank, the platform will process the following installments at the given dates automatically.
You can receive a Webhook notification for each transaction and the Customer an email notification for each successull payment.
Example:
You wish to charge your customer 1 000 € split in 3 months from the 05/07/2021, with a deposit of 200€ on the 28/06/2021 and add a 10 € fees.
Field | Value |
amount | 1 000,00 € |
depositAmount | 200,00 € |
feeAmount | 10,00 € |
intervalUnit | MONTH |
intervalCount |
1 |
iterationCount | 3 |
depositStartingDate | 28/06/2018 |
startingDate | 05/07/2018 |
The result will be :
Date | Amount | Detail |
28/06/2018 | 200,00 € |
Deposit
|
05/07/2018 | 276,68 € |
(amount-depositAmount) - (Round down( amount-depositAmount ) / iterationCount X (iterationCount-1)) + feeAmount = (1000€-200€) - (Round down( 1000€-200€ ) / 3 X (3-1)) + 10€ |
05/08/2018 | 266,66 € |
Round down( (amount-depositAmount)/iterationCount ) = Round down( (1000€-200€)/3 ) |
05/09/2018 | 266,66 € |
Round down( (amount-depositAmount)/iterationCount ) = Round down( (1000€-200€)/3 ) |
POST https://test-api.centralpay.net/v2/rest/installmentPayment
OBJ Json Installment Payment type
curl -v https://test-api.centralpay.net/v2/rest/installmentPayment \
-u 'doctest:4I9HJRTd' \
-d merchantInstallmentPaymentId='MIP_001' \
-d amount=1000 \
-d currency=EUR \
-d customerId=c3034a46-71b8-4d34-8398-90583241b944 \
-d endUserIp='8.8.8.8' \
-d intervalUnit=MONTH \
-d intervalCount=1 \
-d iterationCount=2 \
-d additionalData=[Key1]val1
{
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"creationDate": "2020-08-18T09:48:16.381800+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"cardId": "0874bd00-bfdd-4bcf-a711-8e690ea793bd",
"depositStartingDate": null,
"startingDate": "2020-08-18",
"merchantInstallmentPaymentId": "MIP_001",
"endUserIp": "8.8.8.8",
"endUserLanguage": null,
"amount": 1000,
"depositAmount": 0,
"feeAmount": 0,
"currency": "EUR",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 2,
"status": "ACTIVE",
"installments": [
{
"installmentId": "e218f66c-5e8c-474e-bd0f-657e1d811b02",
"creationDate": "2020-08-18T09:48:16.380799+02:00",
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 1,
"paid": true,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": [
"86b40049-33f4-42d5-b53a-440286e69f0d"
]
},
{
"installmentId": "ac90ac8b-e5bb-4e6a-9cec-89dd7ba9b1d2",
"creationDate": "2020-08-18T09:48:16.381406+02:00",
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 0,
"paid": false,
"type": "INSTALLMENT",
"nextTransactionAttempt": "2020-09-18T04:00+02:00",
"transactions": []
}
],
"additionalData": {
"Key1": "val1"
}
}
Create an Installment Payment
This function allows you to create a installment payment.
currency String (3) |
Currency Required: yes Validation: ISO4217 alpha format or num [A-Z}{3}|[0-9]{3} Existing Authorised (for the contract) |
amount Integer |
Total amount of the payment
Required: yes
Note: In cents |
endUserIp String (39) |
Card holder Ip address
Required: yes |
depositAmount Integer |
Deposit amount of the payment
Required: not
Note: In cents |
feeAmount Integer |
Fee amount of the payment
Required: no
Note: In cents |
customerId UUID (36) |
CentralPay client ID Required: conditional Validation: UUID - Existing - Authorised (for the user) |
cardId UUID (36) |
CentralPay card ID Required: conditional Validation: UUID - Existing - Authorised (for the customer) Note: customerID compulsory |
otp String |
CentralPay card ID Required: conditional Note: use to send the OTH when a customerId is used in a 1-click transaction for example |
cvcValidation String |
CentralPay card ID Required: conditional Note: use to send the CVC when a customerId is used in a 1-click transaction for example |
merchantInstallmentPaymentId String (100) |
Merchant Installment Payment ID Required: no Validation: .{0,100} |
pointOfSaleId UUID (36) |
CentralPay POS ID Required: no Validation: UUID - Existing - Authorised for the user |
contractId UUID (36) |
CentralPay contract ID Required: no Validation: UUID - Existing - Authorised for the PoS |
description String (256) |
Description Required: no Validation: .{0,256} |
intervalUnit | Interval unit
Required: yes
Validation: DAY | WEEK | MONTH | YEAR |
intervalCount Number |
Interval count Required: yes Note: min. value = 1 |
iterationCount Number |
Iteration count Required: yes Note: - Minimal value : if depositAmount > 0 => min. value = 1, if depositAmount = 0 or null => min. value = 2 - Maximal value : if intervalUnt = DAY => max. value = 90, if intervalUnit = WEEK or MONTH => max. value = 12, if intervalUnit = YEAR => max. value = 5 |
depositStartingDate LocalDate |
Deposit starting date Required: no Validation: Today or later By default today |
startingDate LocalDate |
Starting date Required: no Validation: Today or later |
paymentRequestBreakdownId String |
Identification number of the paymentRequestBreakdown
Required: no Validation: UUID, Existing, belongs to the merchant, the paymentRequestStatus is ACTIVE and the status of the paymentRequest is different from PAID |
additionalData String (303) |
Merchant data
Required: no
Note: Number of key/value combinations because can take multiple keys and values. |
endUserLanguage String |
Card holder language
Required: no Validation: Existing, ISO-639-2 (3 characters) or ISO-639-1 (2 characters) |
mandateId uuid |
A valid madate Id, requested if you want to use a SDD as the source of the Installment
Required: conditionnal Validation: Existing, validated and actived mandate |
endToEndIdentification String |
A unique and specific identification created by the merchant, requested if the source is a SDD
Required: conditionnal Validation: unique for each SDD Transaction with the same creditor and debitor. Authorized Characters : Minscules, Capitals, numbers, and special characters : -+?:.,()' |
remittanceInformation String |
Motif of payment (if you use a SDD as a source for your SDD)
Required: conditionnal |
requestedCollectionDate LocalDate |
Date of the deadline of the SDD Transaction used a the source of the Installment
Required: no Validation: Now or later, in the limit of 15 day after today |
3ds[*] | 3-D Secure data Required: no Note: Refer to "3ds" sub-object |
POST https://test-api.centralpay.net/v2/rest/installmentPayment
OBJ Json Installment Payment type
curl -v https://test-api.centralpay.net/v2/rest/installmentPayment \
-u 'doctest:4I9HJRTd' \
-d merchantInstallmentPaymentId='MIP_001' \
-d amount=1000 \
-d currency=EUR \
-d customerId=c3034a46-71b8-4d34-8398-90583241b944 \
-d endUserIp='8.8.8.8' \
-d intervalUnit=MONTH \
-d intervalCount=1 \
-d iterationCount=2 \
-d additionalData=[Key1]val1
{
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"creationDate": "2020-08-18T09:48:16.381800+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"cardId": "0874bd00-bfdd-4bcf-a711-8e690ea793bd",
"depositStartingDate": null,
"startingDate": "2020-08-18",
"merchantInstallmentPaymentId": "MIP_001",
"endUserIp": "8.8.8.8",
"endUserLanguage": null,
"amount": 1000,
"depositAmount": 0,
"feeAmount": 0,
"currency": "EUR",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 2,
"status": "ACTIVE",
"installments": [
{
"installmentId": "e218f66c-5e8c-474e-bd0f-657e1d811b02",
"creationDate": "2020-08-18T09:48:16.380799+02:00",
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 1,
"paid": true,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": [
"86b40049-33f4-42d5-b53a-440286e69f0d"
]
},
{
"installmentId": "ac90ac8b-e5bb-4e6a-9cec-89dd7ba9b1d2",
"creationDate": "2020-08-18T09:48:16.381406+02:00",
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 0,
"paid": false,
"type": "INSTALLMENT",
"nextTransactionAttempt": "2020-09-18T04:00+02:00",
"transactions": []
}
],
"additionalData": {
"Key1": "val1"
}
}
POST https://test-api.centralpay.net/v2/rest/installmentPayment/<installmentPaymentId>
OBJ Json Installment Payment type
curl -v https://test-api.centralpay.net/v2/rest/installmentPayment/b2d0efc8-997a-41fd-9855-650700cf83dd \
-u 'doctest:4I9HJRTd' \
-d description=Description_INSTA_PAY_Updated_1
{
"installmentPaymentId": "b2d0efc8-997a-41fd-9855-650700cf83dd",
"creationDate": "2018-08-17T11:47:18.830+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "7acbd816-4cd2-44df-9d8f-00a151ae6fb1",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"cardId": "0874bd00-bfdd-4bcf-a711-8e690ea793bd",
"depositStartingDate": null,
"startingDate": "2018-08-17",
"merchantInstallmentPaymentId": "MIP_001",
"endUserIp": "8.8.8.8",
"endUserLanguage": null,
"amount": 1000,
"depositAmount": 0,
"feeAmount": 0,
"currency": "EUR",
"description": "Description_INSTA_PAY_Updated_1",
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 2,
"status": "CANCELED",
"installments": [
{
"installmentId": "b5c40462-50fb-4ed1-ac4a-c50245d13985",
"creationDate": "2018-08-17T11:47:18.826+02:00",
"installmentPaymentId": "b2d0efc8-997a-41fd-9855-650700cf83dd",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 1,
"paid": true,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": [
"ef6e6ff0-0d6d-40a5-ae53-fb06618f9fac"
]
},
{
"installmentId": "22cf88aa-2582-46d7-a7dd-30165ab2012c",
"creationDate": "2018-08-17T11:47:18.829+02:00",
"installmentPaymentId": "b2d0efc8-997a-41fd-9855-650700cf83dd",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 0,
"paid": false,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": []
}
],
"additionalData": {
"Key1": "val1"
}
}
Update an Installment Payment
This function allows you to update an installment payment with the installment payment ID
installmentPaymentId (URL) InstallmentPaimentId |
CentralPay ID of the Installment Payment Required: yes Validation: Existing UUID belonging to the merchant |
merchantInstallmentPaymentId String |
Installment Payment merchant ID Required: no Validation: .{0,100} Unset with null value |
cardId cardId |
Installment Payment merchant ID Required: no Validation: Existing UUID belonging to the customer, unexpired Unset with null value |
description String |
Description Required: no Validation: .{0,256} Unset with null value |
additionalData[*] String |
Merchant data Required: no Validation: key : .{45} Unset with null value |
mandateId UUID |
ID du mandat Required: no |
POST https://test-api.centralpay.net/v2/rest/installmentPayment/<installmentPaymentId>
OBJ Json Installment Payment type
curl -v https://test-api.centralpay.net/v2/rest/installmentPayment/b2d0efc8-997a-41fd-9855-650700cf83dd \
-u 'doctest:4I9HJRTd' \
-d description=Description_INSTA_PAY_Updated_1
{
"installmentPaymentId": "b2d0efc8-997a-41fd-9855-650700cf83dd",
"creationDate": "2018-08-17T11:47:18.830+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "7acbd816-4cd2-44df-9d8f-00a151ae6fb1",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"cardId": "0874bd00-bfdd-4bcf-a711-8e690ea793bd",
"depositStartingDate": null,
"startingDate": "2018-08-17",
"merchantInstallmentPaymentId": "MIP_001",
"endUserIp": "8.8.8.8",
"endUserLanguage": null,
"amount": 1000,
"depositAmount": 0,
"feeAmount": 0,
"currency": "EUR",
"description": "Description_INSTA_PAY_Updated_1",
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 2,
"status": "CANCELED",
"installments": [
{
"installmentId": "b5c40462-50fb-4ed1-ac4a-c50245d13985",
"creationDate": "2018-08-17T11:47:18.826+02:00",
"installmentPaymentId": "b2d0efc8-997a-41fd-9855-650700cf83dd",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 1,
"paid": true,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": [
"ef6e6ff0-0d6d-40a5-ae53-fb06618f9fac"
]
},
{
"installmentId": "22cf88aa-2582-46d7-a7dd-30165ab2012c",
"creationDate": "2018-08-17T11:47:18.829+02:00",
"installmentPaymentId": "b2d0efc8-997a-41fd-9855-650700cf83dd",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 0,
"paid": false,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": []
}
],
"additionalData": {
"Key1": "val1"
}
}
POST https://test-api.centralpay.net/v2/rest/installmentPayment/<installmentPaymentId>/cancel
OBJ Json Installment Payment type
curl -v -X POST https://test-api.centralpay.net/v2/rest/installmentPayment/b5066cf9-87bc-434d-9dbf-e61cc6977d39/cancel \
-H 'Content-Type:application/x-www-form-urlencoded' \
-u 'doctest:4I9HJRTd'
{
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"creationDate": "2020-08-18T09:48:16.381800+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"cardId": "0874bd00-bfdd-4bcf-a711-8e690ea793bd",
"depositStartingDate": null,
"startingDate": "2020-08-18",
"merchantInstallmentPaymentId": "MIP_001",
"endUserIp": "8.8.8.8",
"endUserLanguage": null,
"amount": 1000,
"depositAmount": 0,
"feeAmount": 0,
"currency": "EUR",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 2,
"status": "CANCELED",
"installments": [
{
"installmentId": "e218f66c-5e8c-474e-bd0f-657e1d811b02",
"creationDate": "2020-08-18T09:48:16.380799+02:00",
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 1,
"paid": true,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": [
"86b40049-33f4-42d5-b53a-440286e69f0d"
]
},
{
"installmentId": "ac90ac8b-e5bb-4e6a-9cec-89dd7ba9b1d2",
"creationDate": "2020-08-18T09:48:16.381406+02:00",
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 0,
"paid": false,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": []
}
],
"additionalData": {
"Key1": "val1"
}
}
Cancel an InstallmentPayment
This function allows you to cancel an installment payment with the installment payment ID
installmentPaymentId (URL) UUID (36) |
CentralPay ID of the Installment Payment
Required: yes Validation: Existing UUID belonging to the merchant |
POST https://test-api.centralpay.net/v2/rest/installmentPayment/<installmentPaymentId>/cancel
OBJ Json Installment Payment type
curl -v -X POST https://test-api.centralpay.net/v2/rest/installmentPayment/b5066cf9-87bc-434d-9dbf-e61cc6977d39/cancel \
-H 'Content-Type:application/x-www-form-urlencoded' \
-u 'doctest:4I9HJRTd'
{
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"creationDate": "2020-08-18T09:48:16.381800+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"cardId": "0874bd00-bfdd-4bcf-a711-8e690ea793bd",
"depositStartingDate": null,
"startingDate": "2020-08-18",
"merchantInstallmentPaymentId": "MIP_001",
"endUserIp": "8.8.8.8",
"endUserLanguage": null,
"amount": 1000,
"depositAmount": 0,
"feeAmount": 0,
"currency": "EUR",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 2,
"status": "CANCELED",
"installments": [
{
"installmentId": "e218f66c-5e8c-474e-bd0f-657e1d811b02",
"creationDate": "2020-08-18T09:48:16.380799+02:00",
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 1,
"paid": true,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": [
"86b40049-33f4-42d5-b53a-440286e69f0d"
]
},
{
"installmentId": "ac90ac8b-e5bb-4e6a-9cec-89dd7ba9b1d2",
"creationDate": "2020-08-18T09:48:16.381406+02:00",
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 0,
"paid": false,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": []
}
],
"additionalData": {
"Key1": "val1"
}
}
GET https://test-api.centralpay.net/v2/rest/installmentPayment/<installmentPaymentId>
OBJ Json Installment Payment type
curl -v https://test-api.centralpay.net/v2/rest/installmentPayment/b3ada231-4062-4d25-98e0-a5b2b426e620 \
-u 'doctest:4I9HJRTd'
{
"installmentPaymentId": "b3ada231-4062-4d25-98e0-a5b2b426e620",
"creationDate": "2022-05-05T10:40:10.990993+02:00",
"pointOfSaleId": "556b5936-e83a-4895-a0d1-4984be45dbb4",
"pointOfSale": {
"uuid": "556b5936-e83a-4895-a0d1-4984be45dbb4",
"name": "POS test 1"
},
"contractId": "7f96d35d-da83-4a70-8205-ed6d62590ab2",
"customerId": "7bb68ee6-1f3b-4f5a-ab28-403d54d2df9e",
"cardId": "1fff094a-5ada-4fbf-9a60-e2f4e895ae0f",
"card": {
"uuid": "1fff094a-5ada-4fbf-9a60-e2f4e895ae0f",
"commercialBrand": "VISA",
"first6": "400000",
"last4": "0002"
},
"paymentRequestBreakdownId": "09d89c87-cf70-43bc-af65-1b6796b829ed",
"paymentRequestId": "ab78c212-07c6-43de-82b8-b137031bca58",
"mandateId": "619e9475-6546-4e16-a8d2-1f635449f267",
"mandate": {
"uuid": "619e9475-6546-4e16-a8d2-1f635449f267",
"DebtorBankAccount": {
"iban": "GB94BARC10201530093459"
}
},
"depositStartingDate": null,
"startingDate": "2022-05-05",
"requestedCollectionDate": null,
"merchantInstallmentPaymentId": null,
"endUserIp": "172.31.132.22",
"endUserLanguage": "eng",
"amount": 100000,
"depositAmount": 0,
"feeAmount": 0,
"currency": "EUR",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 10,
"status": "PAID",
"endToEndIdentification": null,
"remittanceInformation": null,
"installments": [
{
"installmentId": "78e908d8-4fc0-4812-8a28-148e4c8d807d",
"creationDate": "2022-05-05T10:40:10.990934+02:00",
"installmentPaymentId": "b3ada231-4062-4d25-98e0-a5b2b426e620",
"customerId": "7bb68ee6-1f3b-4f5a-ab28-403d54d2df9e",
"mandateId": "619e9475-6546-4e16-a8d2-1f635449f267",
"amount": 10000,
"currency": "EUR",
"attemptCount": 1,
"paid": true,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": [
"5aa6c743-79ae-4efd-9cb9-5a93c1cccae3"
],
"transactionDatas": [
{
"uuid": "5aa6c743-79ae-4efd-9cb9-5a93c1cccae3",
"creationDate": "2023-06-08T09:58:47.463937+02:00"
}
],
"sddTransactions": [
"a7547e62-5416-48e9-a3ce-9fabb06ae1d1",
"00011e6c-137d-4d0d-8079-6e132bb5374f"
],
"sddTransactionDatas": [
{
"uuid": "a7547e62-5416-48e9-a3ce-9fabb06ae1d1",
"creationDate": "2022-12-15T16:07:28.834812+01:00"
},
{
"uuid": "00011e6c-137d-4d0d-8079-6e132bb5374f",
"creationDate": "2022-11-22T11:46:51.486707+01:00"
}
]
}
],
"additionalData": {}
}
Retrieve an Installment Payment
This function allows you to retrieve a installment payment with the installment payment ID.
installmentPaymentId (URL) InstallmentPaimentId |
CentralPay ID of the Installment Payment Required: yes Validation: Existing UUID belonging to the merchant |
GET https://test-api.centralpay.net/v2/rest/installmentPayment/<installmentPaymentId>
OBJ Json Installment Payment type
curl -v https://test-api.centralpay.net/v2/rest/installmentPayment/b3ada231-4062-4d25-98e0-a5b2b426e620 \
-u 'doctest:4I9HJRTd'
{
"installmentPaymentId": "b3ada231-4062-4d25-98e0-a5b2b426e620",
"creationDate": "2022-05-05T10:40:10.990993+02:00",
"pointOfSaleId": "556b5936-e83a-4895-a0d1-4984be45dbb4",
"pointOfSale": {
"uuid": "556b5936-e83a-4895-a0d1-4984be45dbb4",
"name": "POS test 1"
},
"contractId": "7f96d35d-da83-4a70-8205-ed6d62590ab2",
"customerId": "7bb68ee6-1f3b-4f5a-ab28-403d54d2df9e",
"cardId": "1fff094a-5ada-4fbf-9a60-e2f4e895ae0f",
"card": {
"uuid": "1fff094a-5ada-4fbf-9a60-e2f4e895ae0f",
"commercialBrand": "VISA",
"first6": "400000",
"last4": "0002"
},
"paymentRequestBreakdownId": "09d89c87-cf70-43bc-af65-1b6796b829ed",
"paymentRequestId": "ab78c212-07c6-43de-82b8-b137031bca58",
"mandateId": "619e9475-6546-4e16-a8d2-1f635449f267",
"mandate": {
"uuid": "619e9475-6546-4e16-a8d2-1f635449f267",
"DebtorBankAccount": {
"iban": "GB94BARC10201530093459"
}
},
"depositStartingDate": null,
"startingDate": "2022-05-05",
"requestedCollectionDate": null,
"merchantInstallmentPaymentId": null,
"endUserIp": "172.31.132.22",
"endUserLanguage": "eng",
"amount": 100000,
"depositAmount": 0,
"feeAmount": 0,
"currency": "EUR",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 10,
"status": "PAID",
"endToEndIdentification": null,
"remittanceInformation": null,
"installments": [
{
"installmentId": "78e908d8-4fc0-4812-8a28-148e4c8d807d",
"creationDate": "2022-05-05T10:40:10.990934+02:00",
"installmentPaymentId": "b3ada231-4062-4d25-98e0-a5b2b426e620",
"customerId": "7bb68ee6-1f3b-4f5a-ab28-403d54d2df9e",
"mandateId": "619e9475-6546-4e16-a8d2-1f635449f267",
"amount": 10000,
"currency": "EUR",
"attemptCount": 1,
"paid": true,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": [
"5aa6c743-79ae-4efd-9cb9-5a93c1cccae3"
],
"transactionDatas": [
{
"uuid": "5aa6c743-79ae-4efd-9cb9-5a93c1cccae3",
"creationDate": "2023-06-08T09:58:47.463937+02:00"
}
],
"sddTransactions": [
"a7547e62-5416-48e9-a3ce-9fabb06ae1d1",
"00011e6c-137d-4d0d-8079-6e132bb5374f"
],
"sddTransactionDatas": [
{
"uuid": "a7547e62-5416-48e9-a3ce-9fabb06ae1d1",
"creationDate": "2022-12-15T16:07:28.834812+01:00"
},
{
"uuid": "00011e6c-137d-4d0d-8079-6e132bb5374f",
"creationDate": "2022-11-22T11:46:51.486707+01:00"
}
]
}
],
"additionalData": {}
}
GET https://test-api.centralpay.net/v2/rest/installmentPayment
List OBJ Json installment payment type
curl -X GET -v https://test-api.centralpay.net/v2/rest/installmentPayment?status=CANCELED \
-u 'doctest:4I9HJRTd'
{
"list": [
{
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"creationDate": "2020-08-18T09:48:16.381800+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"cardId": "0874bd00-bfdd-4bcf-a711-8e690ea793bd",
"depositStartingDate": null,
"startingDate": "2020-08-18",
"merchantInstallmentPaymentId": "MIP_001",
"endUserIp": "8.8.8.8",
"endUserLanguage": null,
"amount": 1000,
"depositAmount": 0,
"feeAmount": 0,
"currency": "EUR",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 2,
"status": "CANCELED",
"installments": [
{
"installmentId": "e218f66c-5e8c-474e-bd0f-657e1d811b02",
"creationDate": "2020-08-18T09:48:16.380799+02:00",
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 1,
"paid": true,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": [
"86b40049-33f4-42d5-b53a-440286e69f0d"
]
},
{
"installmentId": "ac90ac8b-e5bb-4e6a-9cec-89dd7ba9b1d2",
"creationDate": "2020-08-18T09:48:16.381406+02:00",
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 0,
"paid": false,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": []
}
],
"additionalData": {
"Key1": "val1"
}
},
{
"installmentPaymentId": "b2d0efc8-997a-41fd-9855-650700cf83dd",
"creationDate": "2018-08-17T11:47:18.830+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "7acbd816-4cd2-44df-9d8f-00a151ae6fb1",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"cardId": "0874bd00-bfdd-4bcf-a711-8e690ea793bd",
"depositStartingDate": null,
"startingDate": "2018-08-17",
"merchantInstallmentPaymentId": "MIP_001",
"endUserIp": "8.8.8.8",
"endUserLanguage": null,
"amount": 1000,
"depositAmount": 0,
"feeAmount": 0,
"currency": "EUR",
"description": "Description_INSTA_PAY_Updated_1",
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 2,
"status": "CANCELED",
"installments": [
{
"installmentId": "b5c40462-50fb-4ed1-ac4a-c50245d13985",
"creationDate": "2018-08-17T11:47:18.826+02:00",
"installmentPaymentId": "b2d0efc8-997a-41fd-9855-650700cf83dd",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 1,
"paid": true,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": [
"ef6e6ff0-0d6d-40a5-ae53-fb06618f9fac"
]
},
{
"installmentId": "22cf88aa-2582-46d7-a7dd-30165ab2012c",
"creationDate": "2018-08-17T11:47:18.829+02:00",
"installmentPaymentId": "b2d0efc8-997a-41fd-9855-650700cf83dd",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 0,
"paid": false,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": []
}
],
"additionalData": {
"Key1": "val1"
}
}
],
"totalCount": 2
}
List Installment Payments
This function allows you to search objects from a multi-criteria search.
« Installment Payment » specific parameters. All the paramers used to search must be passed in the form of queries parameters.
merchantInstallmentPaymentId merchantInstallmentPaymentId |
CentralPay ID of the merchant Installment Payment Required: no Validation: .{0,100} |
customerdId UUID (36) |
CentralPay client ID
Required: no
Validation: UUID, existing, belongs to the merchant
|
status Enum InstallmentPaymentStatus |
Installment Payment status Required: no Validation: ACTIVE | PAID | CANCECED | FAILURE | UNPAID |
after String |
Only returns items created after specified date time Example : 2020-08-31T07:13:22.639Z Required: no |
before String |
Only returns items created before specified date time Example : 2020-08-31T07:13:22.639Z Required: no |
limit String |
Number of items to return Default value : 10 Required: no |
page String |
Page index to get Default value : 1 Required: no |
GET https://test-api.centralpay.net/v2/rest/installmentPayment
List OBJ Json installment payment type
curl -X GET -v https://test-api.centralpay.net/v2/rest/installmentPayment?status=CANCELED \
-u 'doctest:4I9HJRTd'
{
"list": [
{
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"creationDate": "2020-08-18T09:48:16.381800+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "71602dd0-2790-4743-877b-e72530d7576d",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"cardId": "0874bd00-bfdd-4bcf-a711-8e690ea793bd",
"depositStartingDate": null,
"startingDate": "2020-08-18",
"merchantInstallmentPaymentId": "MIP_001",
"endUserIp": "8.8.8.8",
"endUserLanguage": null,
"amount": 1000,
"depositAmount": 0,
"feeAmount": 0,
"currency": "EUR",
"description": null,
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 2,
"status": "CANCELED",
"installments": [
{
"installmentId": "e218f66c-5e8c-474e-bd0f-657e1d811b02",
"creationDate": "2020-08-18T09:48:16.380799+02:00",
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 1,
"paid": true,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": [
"86b40049-33f4-42d5-b53a-440286e69f0d"
]
},
{
"installmentId": "ac90ac8b-e5bb-4e6a-9cec-89dd7ba9b1d2",
"creationDate": "2020-08-18T09:48:16.381406+02:00",
"installmentPaymentId": "b5066cf9-87bc-434d-9dbf-e61cc6977d39",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 0,
"paid": false,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": []
}
],
"additionalData": {
"Key1": "val1"
}
},
{
"installmentPaymentId": "b2d0efc8-997a-41fd-9855-650700cf83dd",
"creationDate": "2018-08-17T11:47:18.830+02:00",
"pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
"contractId": "7acbd816-4cd2-44df-9d8f-00a151ae6fb1",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"cardId": "0874bd00-bfdd-4bcf-a711-8e690ea793bd",
"depositStartingDate": null,
"startingDate": "2018-08-17",
"merchantInstallmentPaymentId": "MIP_001",
"endUserIp": "8.8.8.8",
"endUserLanguage": null,
"amount": 1000,
"depositAmount": 0,
"feeAmount": 0,
"currency": "EUR",
"description": "Description_INSTA_PAY_Updated_1",
"intervalUnit": "MONTH",
"intervalCount": 1,
"iterationCount": 2,
"status": "CANCELED",
"installments": [
{
"installmentId": "b5c40462-50fb-4ed1-ac4a-c50245d13985",
"creationDate": "2018-08-17T11:47:18.826+02:00",
"installmentPaymentId": "b2d0efc8-997a-41fd-9855-650700cf83dd",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 1,
"paid": true,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": [
"ef6e6ff0-0d6d-40a5-ae53-fb06618f9fac"
]
},
{
"installmentId": "22cf88aa-2582-46d7-a7dd-30165ab2012c",
"creationDate": "2018-08-17T11:47:18.829+02:00",
"installmentPaymentId": "b2d0efc8-997a-41fd-9855-650700cf83dd",
"customerId": "c3034a46-71b8-4d34-8398-90583241b944",
"amount": 500,
"currency": "EUR",
"attemptCount": 0,
"paid": false,
"type": "INSTALLMENT",
"nextTransactionAttempt": null,
"transactions": []
}
],
"additionalData": {
"Key1": "val1"
}
}
],
"totalCount": 2
}
InstallmentPayment Object
The Json "InstallmentPayment" Object
The "InstallmentPayment" object response represents a Installment Payment.
installmentPaymentId String (36) |
Installment Payment ID Note: UUID Format |
creationDate String |
Creation date Note: ISO 8601 |
merchantInstallmentPaymentId String |
Installment Payment merchant ID |
pointOfSaleId String (36) |
Point of Sale ID Note: UUID Format |
contractId String (36) |
Contract IDNote: UUID Format |
customerId String (36) |
Customer IDNote: UUID Format |
cardId String (36) |
Card IDNote: UUID Format |
endUserIp String |
End user IP |
amount Integer |
Amount Note: in cents |
depositAmount Integer |
Deposit amount Note: in cents |
feeAmount Integer |
Fee amount Note: in cents |
currency String |
CurrencyNote: Favourite format |
description String |
Description |
intervalUnit Enum IntervalUnit |
Interval unitDAY | WEEK | MONTH |
intervalCount Integer |
Interval count |
iterationCount Integer |
Iteration count |
depositStartingDate LocalDate |
Starting date of the deposit |
startingDate LocalDate |
Starting date of the first payment |
status Enum InstallmentPaymentStatus |
StatusACTIVE | PAID | CANCECED | FAILURE | UNPAID |
cancellationDate LocalDate |
Cancelation date |
installments List "installment" |
Installments list |
paymentRequestBreakdownId UUID |
Identifier UUID of the PaymentRequestBreakdown Note: Not empty if the installmentPayment is linked to a Payment Request |
paymentRequestId UUID |
Identifier UUID of the Payment Request Note: Not empty if the installmentPayment is linked to a Payment Request |
additionalData[*] Map |
merchant data |
Installment Object
The Json "Installment" Object
The "Installment" object response represents a Installment.
installmentId String (36) |
Installment ID Note: UUID Format |
creationDate String |
Creation date Note: ISO 8601 |
installmentPaymentId String |
Installment Payment ID |
customerId String (36) |
Customer IDNote: UUID Format |
amount Integer |
Amount Note: in cents |
currency String |
CurrencyNote: Favourite format |
attemptCount Integer |
Attempt count |
nextTransactionAttempt OffsetDateTime |
Next transaction attempt |
paid Boolean |
Paid or not |
transactions List "transaction" |
Transactions list List <UUID> |
type Enum InstallmentType |
Installment typeDEPOSIT | INSTALLMENT |