Postman testing

The following videos walk through how recurring payments work using our Postman collection, to help your integration.

Run in Postman

Initiate and use a new recurring payment

IMAGE ALT TEXT HERE

Video outline

  1. Prerequisites

    • You need to be able to send the 3DS2 mandatory parameters (BrowserInfo & IpAddress)
  2. User registration [0:23]

    • Register a user
    • Register the user’s card
  3. Recurring registration [2:26]

    • Register a recurring payment
    • Response from the registration object [3:21]
  4. Payment processing

    • Execute a pay-in with the end user present (CIT) [3:50]
    • Response from the pay-in object [4:30]
    • Check the status of the recurring pay-in [4:59]
    • Check the status of the registration [5:31]
    • Execute a pay-in in the absence of the end user (MIT) [6:01]
    • Response from the pay-in object [6:28]
    • Check the status of the registration [6:54]

Migrate an existing recurring payment

IMAGE ALT TEXT HERE

  1. Recurring registration

    • Register a recurring payment [0:10]
    • Response from the registration object [0:36]
  2. Payment processing

    • Successful migration [1:05]
    • Execute a pay-in in the absence of the end user (MIT)
      • Response (Status: SUCCESS) [1:31]
    • Check the status of the registration [1:50]
    • Unsuccessful migration [2:20]
    • Execute a pay-in in the absence of the end user (MIT)
      • Response (Status: FAILED) [2:42]
    • Check the status of the registration [3:06]

Cards

To test this functionality in the sandbox, you can use the cards presented here. We recommend using the card simulating a challenge flow.

Mocks

The following mock transaction is available for testing purposes:

Amount ErrorCode ErrorMessage Use case
333.05 101101 Transaction refused by the bank (Do not honor) Pay-in failed

With the amount “33501”, the following codes can be entered in the second line of the billing address to simulate the corresponding errors.

Code (billing, line 2) ErrorMessage Operation ResultCode Explanation
01108 Transaction refused by the bank (card limit reached) 101199 /
01125 The card is inactive 101106 /
01131 Soft decline 101305 To simulate a re-authentication request from a bank (during an MIT)
03022 Secure mode: 3DS authentication has failed 101301 To simulate a failed SCA (during a CIT)

Worked examples

Create a Recurring PayIn Registration

This call shows how to register a recurring payment for a subscription (CLASSIC_SUBSCRIPTION), which contains all information from the beginning. This information therefore cannot be modified during the recurrence. For more information, please see the introduction.

POST /recurringpayinregistrations

{
"AuthorId" : {{USER_ID_BUYER}},
"CardID" : {{cardID}},
"CreditedUserId" : {{USER_ID_BUYER}},
"CreditedWalletId" : {{BUYER_WALLET_ID}},
"FirstTransactionDebitedFunds" : {
    "Currency" : "EUR",
    "Amount" : 6010
    },
"FirstTransactionFees" : {
    "Currency" : "EUR",
    "Amount" : 0
    },
"Billing" : {
    "FirstName": "Recurring",
    "LastName": "Payment",
    "Address": {
        "AddressLine1": "1 Mangopay Street",
        "AddressLine2": "The Loop",
        "City": "Paris",
        "Region": "Ile de France",
        "PostalCode": "75001",
        "Country": "FR"
    }
},
"Shipping" : {
    "FirstName": "Recurring",
    "LastName": "Payment",
    "Address": {
        "AddressLine1": "1 Mangopay Street",
        "AddressLine2": "The Loop",
        "City": "Paris",
        "Region": "Ile de France",
        "PostalCode": "75001",
        "Country": "FR"
    }
},
"EndDate" : 1704013755,
"Frequency" : "MONTHLY",
"FixedNextAmount" : true,
"FractionedPayment" : false,
"NextTransactionDebitedFunds" : {
    "Currency" : "EUR",
    "Amount" : 5525
    },
"NextTransactionFees" : {
    "Currency" : "EUR",
    "Amount" : 0
    }
}

Response

 {
    "Id": "6647993",
    "Status": "CREATED",
    "CurrentState": {
        "PayinsLinked": 0,
        "CumulatedDebitedAmount": {
            "Currency": "EUR",
            "Amount": 0
        },
        "CumulatedFeesAmount": {
            "Currency": "EUR",
            "Amount": 0
        },
        "LastPayinId": null
    },
    "RecurringType": "CLASSIC_SUBSCRIPTION",
    "TotalAmount": {
        "Currency": "EUR",
        "Amount": 166235
    },
    "CycleNumber": 30,
    "AuthorId": "6647989",
    "CardId": "6647992",
    "CreditedUserId": "6647989",
    "CreditedWalletId": "6647990",
    "Billing": {
        "FirstName": "Recurring",
        "LastName": "Payment",
        "Address": {
            "AddressLine1": "1 Mangopay Street",
            "AddressLine2": "The Loop",
            "City": "Paris",
            "Region": "Ile de France",
            "PostalCode": "75001",
            "Country": "FR"
        }
    },
    "Shipping": {
        "FirstName": "Recurring",
        "LastName": "Payment",
        "Address": {
            "AddressLine1": "1 Mangopay Street",
            "AddressLine2": "The Loop",
            "City": "Paris",
            "Region": "Ile de France",
            "PostalCode": "75001",
            "Country": "FR"
        }
    },
    "EndDate": 1704013755,
    "Frequency": "Monthly",
    "FixedNextAmount": true,
    "FractionedPayment": false,
    "FreeCycles": 0,
    "FirstTransactionDebitedFunds": {
        "Currency": "EUR",
        "Amount": 6010
    },
    "FirstTransactionFees": {
        "Currency": "EUR",
        "Amount": 0
    },
    "NextTransactionDebitedFunds": {
        "Currency": "EUR",
        "Amount": 5525
    },
    "NextTransactionFees": {
        "Currency": "EUR",
        "Amount": 0
    },
    "Migration": false
}

Create a Recurring PayIn - CIT

POST /payins/recurring/card/direct

{
"RecurringPayinRegistrationId" : {{RecurringID}},
"StatementDescriptor" : "test",
"Tag" : "CIT test",
"SecureModeReturnURL": "http://www.my-site.com/returnURL",
"IpAddress": "2001:0620:0000:0000:0211:24FF:FE80:C12C",
"BrowserInfo": {
"AcceptHeader": "application/json,text/javascript,*/*;q=0.01<",
"JavaEnabled": true,
"Language": "fr",
"ColorDepth": 32,
"ScreenHeight": 667,
"ScreenWidth": 375,
"TimeZoneOffset": "-120",
"UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
"JavascriptEnabled": true
}
}

Response

{
    "Id": "6647994",
    "Tag": "CIT test",
    "CreationDate": 1626796618,
    "AuthorId": "6647989",
    "CreditedUserId": "6647989",
    "DebitedFunds": {
        "Currency": "EUR",
        "Amount": 6010
    },
    "CreditedFunds": {
        "Currency": "EUR",
        "Amount": 6010
    },
    "Fees": {
        "Currency": "EUR",
        "Amount": 0
    },
    "Status": "CREATED",
    "ResultCode": null,
    "ResultMessage": null,
    "ExecutionDate": null,
    "Type": "PAYIN",
    "Nature": "REGULAR",
    "CreditedWalletId": "6647990",
    "DebitedWalletId": null,
    "PaymentType": "CARD",
    "ExecutionType": "DIRECT",
    "SecureMode": null,
    "CardId": "6647992",
    "SecureModeReturnURL": "http://www.my-site.com/returnURL",
    "SecureModeRedirectURL": "http://www.my-site.com/returnURL",
    "SecureModeNeeded": true,
    "Culture": null,
    "SecurityInfo": {
        "AVSResult": "NO_CHECK"
    },
    "StatementDescriptor": "test",
    "BrowserInfo": {
        "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<",
        "JavaEnabled": true,
        "Language": "fr",
        "ColorDepth": 32,
        "ScreenHeight": 667,
        "ScreenWidth": 375,
        "TimeZoneOffset": -120,
        "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
        "JavascriptEnabled": true
    },
    "IpAddress": "2001:0620:0000:0000:0211:24FF:FE80:C12C",
    "Billing": {
        "FirstName": "Recurring",
        "LastName": "Payment",
        "Address": {
            "AddressLine1": "1 Mangopay Street",
            "AddressLine2": "The Loop",
            "City": "Paris",
            "Region": "Ile de France",
            "PostalCode": "75001",
            "Country": "FR"
        }
    },
    "Shipping": {
        "FirstName": "Recurring",
        "LastName": "Payment",
        "Address": {
            "AddressLine1": "1 Mangopay Street",
            "AddressLine2": "The Loop",
            "City": "Paris",
            "Region": "Ile de France",
            "PostalCode": "75001",
            "Country": "FR"
        }
    },
    "Requested3DSVersion": null,
    "Applied3DSVersion": "V2_1",
    "RecurringPayinRegistrationId": "6647993"
}

Create a Recurring PayIn - MIT

In the body of this call it is not necessary to enter the amount to be debited, as it is already present in the parameter NextTransactionDebitedFunds of the registration object.

POST /payins/recurring/card/direct

{
"RecurringPayinRegistrationId" : {{RecurringID}},
"StatementDescriptor" : "test",
"Tag" : "MIT test"
}

Response

{
    "Id": "6647996",
    "Tag": "MIT test",
    "CreationDate": 1626796997,
    "AuthorId": "6647989",
    "CreditedUserId": "6647989",
    "DebitedFunds": {
        "Currency": "EUR",
        "Amount": 5525
    },
    "CreditedFunds": {
        "Currency": "EUR",
        "Amount": 5525
    },
    "Fees": {
        "Currency": "EUR",
        "Amount": 0
    },
    "Status": "SUCCEEDED",
    "ResultCode": "000000",
    "ResultMessage": "Success",
    "ExecutionDate": 1626796999,
    "Type": "PAYIN",
    "Nature": "REGULAR",
    "CreditedWalletId": "6647990",
    "DebitedWalletId": null,
    "PaymentType": "CARD",
    "ExecutionType": "DIRECT",
    "SecureMode": null,
    "CardId": "6647992",
    "SecureModeReturnURL": null,
    "SecureModeRedirectURL": null,
    "SecureModeNeeded": false,
    "Culture": null,
    "SecurityInfo": {
        "AVSResult": "NO_CHECK"
    },
    "StatementDescriptor": "test",
    "BrowserInfo": null,
    "IpAddress": null,
    "Billing": {
        "FirstName": "Recurring",
        "LastName": "Payment",
        "Address": {
            "AddressLine1": "1 Mangopay Street",
            "AddressLine2": "The Loop",
            "City": "Paris",
            "Region": "Ile de France",
            "PostalCode": "75001",
            "Country": "FR"
        }
    },
    "Shipping": {
        "FirstName": "Recurring",
        "LastName": "Payment",
        "Address": {
            "AddressLine1": "1 Mangopay Street",
            "AddressLine2": "The Loop",
            "City": "Paris",
            "Region": "Ile de France",
            "PostalCode": "75001",
            "Country": "FR"
        }
    },
    "Requested3DSVersion": null,
    "Applied3DSVersion": "V2_1",
    "RecurringPayinRegistrationId": "6647993"
}

View a Recurring PayIn Registration

GET /recurringpayinregistrations/{RecurringPayinRegistrationId}

{
    "Id": "6647993",
    "Status": "IN_PROGRESS",
    "CurrentState": {
        "PayinsLinked": 2,
        "CumulatedDebitedAmount": {
            "Currency": "EUR",
            "Amount": 11535
        },
        "CumulatedFeesAmount": {
            "Currency": "EUR",
            "Amount": 0
        },
        "LastPayinId": "6647996"
    },
    "RecurringType": "CLASSIC_SUBSCRIPTION",
    "TotalAmount": {
        "Currency": "EUR",
        "Amount": 166235
    },
    "CycleNumber": 30,
    "AuthorId": "6647989",
    "CardId": "6647992",
    "CreditedUserId": "6647989",
    "CreditedWalletId": "6647990",
    "Billing": {
        "FirstName": "Recurring",
        "LastName": "Payment",
        "Address": {
            "AddressLine1": "1 Mangopay Street",
            "AddressLine2": "The Loop",
            "City": "Paris",
            "Region": "Ile de France",
            "PostalCode": "75001",
            "Country": "FR"
        }
    },
    "Shipping": {
        "FirstName": "Recurring",
        "LastName": "Payment",
        "Address": {
            "AddressLine1": "1 Mangopay Street",
            "AddressLine2": "The Loop",
            "City": "Paris",
            "Region": "Ile de France",
            "PostalCode": "75001",
            "Country": "FR"
        }
    },
    "EndDate": 1704013755,
    "Frequency": "Monthly",
    "FixedNextAmount": true,
    "FractionedPayment": false,
    "FreeCycles": 0,
    "FirstTransactionDebitedFunds": {
        "Currency": "EUR",
        "Amount": 6010
    },
    "FirstTransactionFees": {
        "Currency": "EUR",
        "Amount": 0
    },
    "NextTransactionDebitedFunds": {
        "Currency": "EUR",
        "Amount": 5525
    },
    "NextTransactionFees": {
        "Currency": "EUR",
        "Amount": 0
    },
    "Migration": false
}

Update a Recurring PayIn Registration

In the body of this call, it is simply necessary to send the elements you wish to modify. The response will show the entire item with the modification requested.

In this example, the card is modified. Therefore, the status of the object changes to AUTHENTICATION_NEEDED as the end user (who cannot change) must authenticate the new card.

To do this, you will have to use the CIT pay-in mid-recurrence. If not already present in the object, the DebitedFunds must be sent with the amount to be debited.

PUT /recurringpayinregistrations/{RecurringPayinRegistrationId}

{
"CardId" :{{NewcardID}}
}

Response

{
    "Id": "6647993",
    "Status": "AUTHENTICATION_NEEDED",
    "CurrentState": {
        "PayinsLinked": 2,
        "CumulatedDebitedAmount": {
            "Currency": "EUR",
            "Amount": 11535
        },
        "CumulatedFeesAmount": {
            "Currency": "EUR",
            "Amount": 0
        },
        "LastPayinId": "6647996"
    },
    "RecurringType": "CLASSIC_SUBSCRIPTION",
    "TotalAmount": {
        "Currency": "EUR",
        "Amount": 166235
    },
    "CycleNumber": 30,
    "AuthorId": "6647989",
    "CardId": "6647998",
    "CreditedUserId": "6647989",
    "CreditedWalletId": "6647990",
    "Billing": {
        "FirstName": "Recurring",
        "LastName": "Payment",
        "Address": {
            "AddressLine1": "1 Mangopay Street",
            "AddressLine2": "The Loop",
            "City": "Paris",
            "Region": "Ile de France",
            "PostalCode": "75001",
            "Country": "FR"
        }
    },
    "Shipping": {
        "FirstName": "Recurring",
        "LastName": "Payment",
        "Address": {
            "AddressLine1": "1 Mangopay Street",
            "AddressLine2": "The Loop",
            "City": "Paris",
            "Region": "Ile de France",
            "PostalCode": "75001",
            "Country": "FR"
        }
    },
    "EndDate": 1704013755,
    "Frequency": "Monthly",
    "FixedNextAmount": true,
    "FractionedPayment": false,
    "FreeCycles": 0,
    "FirstTransactionDebitedFunds": {
        "Currency": "EUR",
        "Amount": 6010
    },
    "FirstTransactionFees": {
        "Currency": "EUR",
        "Amount": 0
    },
    "NextTransactionDebitedFunds": {
        "Currency": "EUR",
        "Amount": 5525
    },
    "NextTransactionFees": {
        "Currency": "EUR",
        "Amount": 0
    },
    "Migration": false
}
Share feedback
Live chat
No agent is free at the moment please send us a request through our contact form