<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$recurringRegistrationId = "recpayinreg_m_01J2EA0TAVQPNY4JGGF1J7RD97";
$response = $api->PayIns->GetRecurringRegistration($recurringRegistrationId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let myRecurringRegistration = {
Id: '192912686',
}
const viewRecurringRegistration = async (recurringRegistrationId) => {
return await mangopay.PayIns.getRecurringPayin(recurringRegistrationId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
viewRecurringRegistration(myRecurringRegistration.Id)
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def viewRecurringRegistration(recurringRegistrationId)
begin
response = MangoPay::PayIn::RecurringPayments::Recurring.fetch(recurringRegistrationId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch recurring registration: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myRecurringRegistration = {
Id: '192912686',
}
viewRecurringRegistration(myRecurringRegistration[:Id])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.RecurringPayment;
public class ViewRecurringPayinRegistration {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
var recurringPayinRegistrationId = "recpayinreg_m_01J28V158ZTMVNRHWVXSWJ7G2F";
RecurringPayment viewRecurringPayinRegistration = mangopay.getPayInApi().getRecurringPayment(recurringPayinRegistrationId);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(viewRecurringPayinRegistration);
System.out.println(prettyJson);
}
}
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import RecurringPayInRegistration
recurring_payin_registration_id = '213857583'
try:
view_recurring_payin_registration = RecurringPayInRegistration.get(recurring_payin_registration_id)
pprint(vars(view_recurring_payin_registration))
except RecurringPayInRegistration.DoesNotExist:
print('The Recurring PayIn Registration {} does not exist.'.format(recurring_payin_registration_id))
using MangoPay.SDK;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var registrationId = "recpayinreg_m_01J30DF65MVCRBB020YGJ82XM9";
var viewRegistration = await api.PayIns.GetRecurringPayInRegistration(registrationId);
string prettyPrint = JsonConvert.SerializeObject(viewRegistration, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "recpayinreg_m_01JJP2KS2A47A0P7S7CEBQPHT9",
"Status": "IN_PROGRESS",
"ResultCode": null,
"ResultMessage": null,
"CurrentState": {
"PayinsLinked": 2,
"CumulatedDebitedAmount": {
"Currency": "EUR",
"Amount": 20000
},
"CumulatedFeesAmount": {
"Currency": "EUR",
"Amount": 1000
},
"LastPayinId": "payin_m_01JJP59QGFVTMF9Y6YP0K3DXR0"
},
"RecurringType": "CUSTOM",
"TotalAmount": null,
"CycleNumber": null,
"AuthorId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CardId": "card_m_UsklnOoXBWyyqhsN",
"CreditedUserId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CreditedWalletId": "wlt_m_01JJ70WZ9JRAZ9GE0DA36Q84NQ",
"Billing": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"Shipping": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"EndDate": null,
"Frequency": "Monthly",
"FixedNextAmount": true,
"FractionedPayment": false,
"FreeCycles": 0,
"FirstTransactionDebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"FirstTransactionFees": {
"Currency": "EUR",
"Amount": 500
},
"NextTransactionDebitedFunds": null,
"NextTransactionFees": null,
"Migration": false,
"PaymentType": "CARD_DIRECT"
}
Recurring card pay-ins
View a Recurring PayIn Registration
GET
/
v2.01
/
{ClientId}
/
recurringpayinregistrations
/
{RecurringPayinRegistrationId}
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$recurringRegistrationId = "recpayinreg_m_01J2EA0TAVQPNY4JGGF1J7RD97";
$response = $api->PayIns->GetRecurringRegistration($recurringRegistrationId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let myRecurringRegistration = {
Id: '192912686',
}
const viewRecurringRegistration = async (recurringRegistrationId) => {
return await mangopay.PayIns.getRecurringPayin(recurringRegistrationId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
viewRecurringRegistration(myRecurringRegistration.Id)
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def viewRecurringRegistration(recurringRegistrationId)
begin
response = MangoPay::PayIn::RecurringPayments::Recurring.fetch(recurringRegistrationId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch recurring registration: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myRecurringRegistration = {
Id: '192912686',
}
viewRecurringRegistration(myRecurringRegistration[:Id])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.RecurringPayment;
public class ViewRecurringPayinRegistration {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
var recurringPayinRegistrationId = "recpayinreg_m_01J28V158ZTMVNRHWVXSWJ7G2F";
RecurringPayment viewRecurringPayinRegistration = mangopay.getPayInApi().getRecurringPayment(recurringPayinRegistrationId);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(viewRecurringPayinRegistration);
System.out.println(prettyJson);
}
}
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import RecurringPayInRegistration
recurring_payin_registration_id = '213857583'
try:
view_recurring_payin_registration = RecurringPayInRegistration.get(recurring_payin_registration_id)
pprint(vars(view_recurring_payin_registration))
except RecurringPayInRegistration.DoesNotExist:
print('The Recurring PayIn Registration {} does not exist.'.format(recurring_payin_registration_id))
using MangoPay.SDK;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var registrationId = "recpayinreg_m_01J30DF65MVCRBB020YGJ82XM9";
var viewRegistration = await api.PayIns.GetRecurringPayInRegistration(registrationId);
string prettyPrint = JsonConvert.SerializeObject(viewRegistration, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "recpayinreg_m_01JJP2KS2A47A0P7S7CEBQPHT9",
"Status": "IN_PROGRESS",
"ResultCode": null,
"ResultMessage": null,
"CurrentState": {
"PayinsLinked": 2,
"CumulatedDebitedAmount": {
"Currency": "EUR",
"Amount": 20000
},
"CumulatedFeesAmount": {
"Currency": "EUR",
"Amount": 1000
},
"LastPayinId": "payin_m_01JJP59QGFVTMF9Y6YP0K3DXR0"
},
"RecurringType": "CUSTOM",
"TotalAmount": null,
"CycleNumber": null,
"AuthorId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CardId": "card_m_UsklnOoXBWyyqhsN",
"CreditedUserId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CreditedWalletId": "wlt_m_01JJ70WZ9JRAZ9GE0DA36Q84NQ",
"Billing": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"Shipping": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"EndDate": null,
"Frequency": "Monthly",
"FixedNextAmount": true,
"FractionedPayment": false,
"FreeCycles": 0,
"FirstTransactionDebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"FirstTransactionFees": {
"Currency": "EUR",
"Amount": 500
},
"NextTransactionDebitedFunds": null,
"NextTransactionFees": null,
"Migration": false,
"PaymentType": "CARD_DIRECT"
}
Query parameters
string
required
The unique identifier of the recurring pay-in registration.
Responses
200
200
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
Returned values:
CREATED, AUTHENTICATION_NEEDED, IN_PROGRESS, ENDEDThe status of the recurring registration:CREATED– The recurring registration was created, but no recurring pay-in has yet been made.AUTHENTICATION_NEEDED– The latest recurring pay-in linked to the registration object was refused. The registration object can still be used, but you need to execute a new customer-initiated transaction (CIT) for the end user to reauthenticate.IN_PROGRESS– The recurring registration object is in use and the subsequent corresponding recurring pay-ins can be made.ENDED– The recurrence ended: the registration can no longer be modified nor reused.
string
The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes.
string
The explanation of the result code.
object
Information about the recurring pay-ins related to the registration object.Note: If the
LastPayinId references a transaction older than 13 months, it may have been archived.Show properties
Show properties
integer
The number of recurring pay-ins already made for the registration object.
object
The sum of the
DebitedFunds amounts of the recurring pay-ins made for the registration.Show properties
Show properties
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the debited funds.
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).object
The sum of the
Fees amounts of the recurring pay-ins made for the registration.Show properties
Show properties
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the fees.
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).string
The unique identifier of the last recurring pay-in made for the registration.
string
Returned values:
CLASSIC_SUBSCRIPTION, FRACTIONED_PAYMENT, CUSTOMThe type of recurrence, which can be one of the following:CLASSIC_SUBSCRIPTION– For fixed-amount subscriptions. TheAmountof each pay-in and the subscription’sEndDateare known, and these values cannot be modified during the recurrence.FRACTIONED_PAYMENT– For payments in 3 or 4 times. TheAmountof each pay-in and the registration’sEndDateare known, and these values cannot be modified during the recurrence.CUSTOM– For recurring registrations where theAmountandEndDateare unknown.
object
The total amount in the registration.This value is automatically calculated based on the
EndDate, FixedNextAmount, and Frequency parameters (if defined).Show properties
Show properties
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the funds.
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).integer
The number of cycles in the registration (and therefore the number of payments).
This value is automatically calculated based on the
This value is automatically calculated based on the
EndDate, FixedNextAmount, and Frequency parameters (if defined).string
The unique identifier of the user at the source of the transaction.
string
The unique identifier of the Card object, obtained during the card registration process.
string
Default value: The unique identifier of the owner of the credited wallet.The unique identifier of the user whose wallet is credited.
string
The unique identifier of the credited wallet.
object
Default value: FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author).Information about the end user billing address. If left empty, the default values will be automatically taken into account.
Show properties
Show properties
string
The first name of the user.
string
Max. length: 100 charactersThe last name of the user.
object
Information about the billing address.
Show properties
Show properties
string
Max. length: 255 charactersThe first line of the address.
string
Max. length: 255 charactersThe second line of the address.
string
Max. length: 255 charactersThe city of the address.
string
Max. length: 255 charactersThe region of the address. This field is optional except if the
Country is US, CA, or MX.string
Max. length: 255 charactersThe postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces.
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
object
Default value: FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author).Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account.
Show properties
Show properties
string
The first name of the user.
string
Max. length: 100 charactersThe last name of the user.
object
Information about the shipping address.
Show properties
Show properties
string
Max. length: 255 charactersThe first line of the address.
string
Max. length: 255 charactersThe second line of the address.
string
Max. length: 255 charactersThe city of the address.
string
Max. length: 255 charactersThe region of the address. This field is optional except if the
Country is US, CA, or MX.string
Max. length: 255 charactersThe postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces.
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
Unix timestamp
The date and time at which the recurring pay-ins will end. This value has no impact on the recurring registration
Caution: If the
Status.Caution: If the
EndDate is left unspecified, please bear in mind that one could be defined by default and be displayed to your end users (not taken into account in the payment recurrence).string
Returned values:
Daily, Weekly, TwiceAMonth, Monthly, Bimonthly, Quarterly, Semiannual, Annual, BiannualThe frequency at which the recurring pay-ins will occur:Daily– 1 transaction per day.Weekly– 1 transaction every 7 days.TwiceAMonth– 2 transactions per month.Monthly– 1 transaction per month.Bimonthly– 1 transaction every 2 months.Quarterly– 1 transaction every 3 months.Semiannual– 1 transaction every 6 months.Annual– 1 transaction per year.Biannual– 1 transaction every 2 years.
boolean
Whether or not the recurring pay-ins’ debited amounts remain the same for all the pay-ins linked to the recurring registration object.
boolean
Whether or not the recurring pay-ins are being made to split a payment in several installments.
integer
The number of initial consecutive pay-ins where there will be no debited funds nor fees.
This value cannot exceed the
Note: When creating a recurring pay-in (CIT or MIT) for a pay-in subject to a free cycle, the
This value cannot exceed the
CycleNumber value (for recurring objects with an EndDate, FixedNextAmount, and Frequency).Note: When creating a recurring pay-in (CIT or MIT) for a pay-in subject to a free cycle, the
DebitedFunds and Fees parameters cannot be sent.object
The amount of the first recurring pay-in.
This value can be different from the
This value can be different from the
NextTransactionDebitedFundsShow properties
Show properties
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the debited funds.
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).object
The fees of the first recurring pay-in.
This amount can be different from the
This amount can be different from the
NextTransactionDebitedFunds.Show properties
Show properties
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the fees.
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).object
The amount of the subsequent recurring pay-ins.
If this field is empty and either
FixedNextAmount or FractionedPayment are true, the subsequent amount will be the same as FirstTransactionDebitedFunds amount.Show properties
Show properties
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the debited funds.
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).object
The fees of the subsequent recurring pay-ins.
Show properties
Show properties
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the fees.
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).boolean
deprecated
Whether or not to attempt the first recurring pay-in as a merchant-initiated transaction (MIT).Caution: Migration is no longer supported. You can only use objects with
Migration set to false. When Mangopay decommissions this parameter (date communicated by email), the false value will be forced on all objects, including existing ones. Before decommissioning, you need to re-create the object; after decommissioning, you can re-authenticate the same object.The need to re-authenticate may be indicated by the Status changing to AUTHENTICATION_NEEDED or by errors on the pay-in request, for example: non-existent card account (008008), soft decline (101305), expired card (101105), or stolen card (008003).string
Returned values:
CARD_DIRECT, PAYPALDefault value: CARD_DIRECTThe type of recurring pay-in registration (which must correspond to the pay-ins requested against it).{
"Id": "recpayinreg_m_01JJP2KS2A47A0P7S7CEBQPHT9",
"Status": "IN_PROGRESS",
"ResultCode": null,
"ResultMessage": null,
"CurrentState": {
"PayinsLinked": 2,
"CumulatedDebitedAmount": {
"Currency": "EUR",
"Amount": 20000
},
"CumulatedFeesAmount": {
"Currency": "EUR",
"Amount": 1000
},
"LastPayinId": "payin_m_01JJP59QGFVTMF9Y6YP0K3DXR0"
},
"RecurringType": "CUSTOM",
"TotalAmount": null,
"CycleNumber": null,
"AuthorId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CardId": "card_m_UsklnOoXBWyyqhsN",
"CreditedUserId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CreditedWalletId": "wlt_m_01JJ70WZ9JRAZ9GE0DA36Q84NQ",
"Billing": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"Shipping": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"EndDate": null,
"Frequency": "Monthly",
"FixedNextAmount": true,
"FractionedPayment": false,
"FreeCycles": 0,
"FirstTransactionDebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"FirstTransactionFees": {
"Currency": "EUR",
"Amount": 500
},
"NextTransactionDebitedFunds": null,
"NextTransactionFees": null,
"Migration": false,
"PaymentType": "CARD_DIRECT"
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$recurringRegistrationId = "recpayinreg_m_01J2EA0TAVQPNY4JGGF1J7RD97";
$response = $api->PayIns->GetRecurringRegistration($recurringRegistrationId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let myRecurringRegistration = {
Id: '192912686',
}
const viewRecurringRegistration = async (recurringRegistrationId) => {
return await mangopay.PayIns.getRecurringPayin(recurringRegistrationId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
viewRecurringRegistration(myRecurringRegistration.Id)
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def viewRecurringRegistration(recurringRegistrationId)
begin
response = MangoPay::PayIn::RecurringPayments::Recurring.fetch(recurringRegistrationId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch recurring registration: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myRecurringRegistration = {
Id: '192912686',
}
viewRecurringRegistration(myRecurringRegistration[:Id])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.RecurringPayment;
public class ViewRecurringPayinRegistration {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
var recurringPayinRegistrationId = "recpayinreg_m_01J28V158ZTMVNRHWVXSWJ7G2F";
RecurringPayment viewRecurringPayinRegistration = mangopay.getPayInApi().getRecurringPayment(recurringPayinRegistrationId);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(viewRecurringPayinRegistration);
System.out.println(prettyJson);
}
}
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import RecurringPayInRegistration
recurring_payin_registration_id = '213857583'
try:
view_recurring_payin_registration = RecurringPayInRegistration.get(recurring_payin_registration_id)
pprint(vars(view_recurring_payin_registration))
except RecurringPayInRegistration.DoesNotExist:
print('The Recurring PayIn Registration {} does not exist.'.format(recurring_payin_registration_id))
using MangoPay.SDK;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var registrationId = "recpayinreg_m_01J30DF65MVCRBB020YGJ82XM9";
var viewRegistration = await api.PayIns.GetRecurringPayInRegistration(registrationId);
string prettyPrint = JsonConvert.SerializeObject(viewRegistration, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?