/* tslint:disable */
/* eslint-disable */
/**
* Lemonway DirectKit API 2.0
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from '../runtime';
import type {
AccountCardsOutput,
AccountMandatsOutput,
CancelMoneyInInput,
CancelMoneyInOutput,
CreateIBANInput,
CreateIBANOutput,
CreatePaymentFormInput,
CreatePaymentFormOutput,
DisableIBANInput,
DisableIBANOutput,
DisablePaymentFormOutput,
GetCardOutput,
GetCompletedPaymentFormOutput,
GetMoneyInBanksOutput,
GetMoneyInChequeDetailsOutput,
GetMoneyInIBANDetailsOutput,
GetMoneyInSddOutput,
GetMoneyInTransDetailsOutput,
MandateGetDocumentOutput,
MoneyIn3DAuthenticateInput,
MoneyIn3DAuthenticateOutput,
MoneyIn3DConfirmInput,
MoneyIn3DConfirmOutput,
MoneyIn3DInitInput,
MoneyIn3DInitOutput,
MoneyInChequeInitInput,
MoneyInChequeInitOutput,
MoneyInCreateInput,
MoneyInIDealConfirmOutput,
MoneyInIDealInitInput,
MoneyInIDealInitOutput,
MoneyInInput,
MoneyInMbwayInitInput,
MoneyInMbwayInitOutput,
MoneyInMobilePayInitInput,
MoneyInMobilePayInitOutput,
MoneyInMultibancoInitInput,
MoneyInMultibancoInitOutput,
MoneyInOutput,
MoneyInPayTrailInitInput,
MoneyInPayTrailInitOutput,
MoneyInPayshopInitInput,
MoneyInPayshopInitOutput,
MoneyInSddInitInput,
MoneyInSddInitOutput,
MoneyInSofortInitInput,
MoneyInSofortInitOutput,
MoneyInSubscriptionInitInput,
MoneyInSubscriptionInitOutput,
MoneyInTransferInitInput,
MoneyInTransferInitOutput,
MoneyInTrustlyInitInput,
MoneyInTrustlyInitOutput,
MoneyInValidateInput,
MoneyInValidateOutput,
MoneyInWebInitInput,
MoneyInWebInitOutput,
MoneyInWithCardIdInput,
MoneyInWithCardIdOutput,
RegisterCardInput,
RegisterCardOutput,
RegisterSddMandateInput,
RegisterSddMandateOutput,
UnregisterCardInput,
UnregisterCardOutput,
UnregisterSddMandateInput,
UnregisterSddMandateOutput,
} from '../models';
import {
AccountCardsOutputFromJSON,
AccountCardsOutputToJSON,
AccountMandatsOutputFromJSON,
AccountMandatsOutputToJSON,
CancelMoneyInInputFromJSON,
CancelMoneyInInputToJSON,
CancelMoneyInOutputFromJSON,
CancelMoneyInOutputToJSON,
CreateIBANInputFromJSON,
CreateIBANInputToJSON,
CreateIBANOutputFromJSON,
CreateIBANOutputToJSON,
CreatePaymentFormInputFromJSON,
CreatePaymentFormInputToJSON,
CreatePaymentFormOutputFromJSON,
CreatePaymentFormOutputToJSON,
DisableIBANInputFromJSON,
DisableIBANInputToJSON,
DisableIBANOutputFromJSON,
DisableIBANOutputToJSON,
DisablePaymentFormOutputFromJSON,
DisablePaymentFormOutputToJSON,
GetCardOutputFromJSON,
GetCardOutputToJSON,
GetCompletedPaymentFormOutputFromJSON,
GetCompletedPaymentFormOutputToJSON,
GetMoneyInBanksOutputFromJSON,
GetMoneyInBanksOutputToJSON,
GetMoneyInChequeDetailsOutputFromJSON,
GetMoneyInChequeDetailsOutputToJSON,
GetMoneyInIBANDetailsOutputFromJSON,
GetMoneyInIBANDetailsOutputToJSON,
GetMoneyInSddOutputFromJSON,
GetMoneyInSddOutputToJSON,
GetMoneyInTransDetailsOutputFromJSON,
GetMoneyInTransDetailsOutputToJSON,
MandateGetDocumentOutputFromJSON,
MandateGetDocumentOutputToJSON,
MoneyIn3DAuthenticateInputFromJSON,
MoneyIn3DAuthenticateInputToJSON,
MoneyIn3DAuthenticateOutputFromJSON,
MoneyIn3DAuthenticateOutputToJSON,
MoneyIn3DConfirmInputFromJSON,
MoneyIn3DConfirmInputToJSON,
MoneyIn3DConfirmOutputFromJSON,
MoneyIn3DConfirmOutputToJSON,
MoneyIn3DInitInputFromJSON,
MoneyIn3DInitInputToJSON,
MoneyIn3DInitOutputFromJSON,
MoneyIn3DInitOutputToJSON,
MoneyInChequeInitInputFromJSON,
MoneyInChequeInitInputToJSON,
MoneyInChequeInitOutputFromJSON,
MoneyInChequeInitOutputToJSON,
MoneyInCreateInputFromJSON,
MoneyInCreateInputToJSON,
MoneyInIDealConfirmOutputFromJSON,
MoneyInIDealConfirmOutputToJSON,
MoneyInIDealInitInputFromJSON,
MoneyInIDealInitInputToJSON,
MoneyInIDealInitOutputFromJSON,
MoneyInIDealInitOutputToJSON,
MoneyInInputFromJSON,
MoneyInInputToJSON,
MoneyInMbwayInitInputFromJSON,
MoneyInMbwayInitInputToJSON,
MoneyInMbwayInitOutputFromJSON,
MoneyInMbwayInitOutputToJSON,
MoneyInMobilePayInitInputFromJSON,
MoneyInMobilePayInitInputToJSON,
MoneyInMobilePayInitOutputFromJSON,
MoneyInMobilePayInitOutputToJSON,
MoneyInMultibancoInitInputFromJSON,
MoneyInMultibancoInitInputToJSON,
MoneyInMultibancoInitOutputFromJSON,
MoneyInMultibancoInitOutputToJSON,
MoneyInOutputFromJSON,
MoneyInOutputToJSON,
MoneyInPayTrailInitInputFromJSON,
MoneyInPayTrailInitInputToJSON,
MoneyInPayTrailInitOutputFromJSON,
MoneyInPayTrailInitOutputToJSON,
MoneyInPayshopInitInputFromJSON,
MoneyInPayshopInitInputToJSON,
MoneyInPayshopInitOutputFromJSON,
MoneyInPayshopInitOutputToJSON,
MoneyInSddInitInputFromJSON,
MoneyInSddInitInputToJSON,
MoneyInSddInitOutputFromJSON,
MoneyInSddInitOutputToJSON,
MoneyInSofortInitInputFromJSON,
MoneyInSofortInitInputToJSON,
MoneyInSofortInitOutputFromJSON,
MoneyInSofortInitOutputToJSON,
MoneyInSubscriptionInitInputFromJSON,
MoneyInSubscriptionInitInputToJSON,
MoneyInSubscriptionInitOutputFromJSON,
MoneyInSubscriptionInitOutputToJSON,
MoneyInTransferInitInputFromJSON,
MoneyInTransferInitInputToJSON,
MoneyInTransferInitOutputFromJSON,
MoneyInTransferInitOutputToJSON,
MoneyInTrustlyInitInputFromJSON,
MoneyInTrustlyInitInputToJSON,
MoneyInTrustlyInitOutputFromJSON,
MoneyInTrustlyInitOutputToJSON,
MoneyInValidateInputFromJSON,
MoneyInValidateInputToJSON,
MoneyInValidateOutputFromJSON,
MoneyInValidateOutputToJSON,
MoneyInWebInitInputFromJSON,
MoneyInWebInitInputToJSON,
MoneyInWebInitOutputFromJSON,
MoneyInWebInitOutputToJSON,
MoneyInWithCardIdInputFromJSON,
MoneyInWithCardIdInputToJSON,
MoneyInWithCardIdOutputFromJSON,
MoneyInWithCardIdOutputToJSON,
RegisterCardInputFromJSON,
RegisterCardInputToJSON,
RegisterCardOutputFromJSON,
RegisterCardOutputToJSON,
RegisterSddMandateInputFromJSON,
RegisterSddMandateInputToJSON,
RegisterSddMandateOutputFromJSON,
RegisterSddMandateOutputToJSON,
UnregisterCardInputFromJSON,
UnregisterCardInputToJSON,
UnregisterCardOutputFromJSON,
UnregisterCardOutputToJSON,
UnregisterSddMandateInputFromJSON,
UnregisterSddMandateInputToJSON,
UnregisterSddMandateOutputFromJSON,
UnregisterSddMandateOutputToJSON,
} from '../models';
export interface MoneyInsBankwireGetRequest {
updateDate: string;
updateEndDate: string;
authorization: string;
pSUIPAddress: string;
page?: number;
limit?: number;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsBankwireIbanCreatePostRequest {
authorization: string;
pSUIPAddress: string;
parameters: CreateIBANInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsBankwireIbanDisablePostRequest {
ibanid: number;
authorization: string;
pSUIPAddress: string;
parameters: DisableIBANInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCancelPutRequest {
transactionid: number;
authorization: string;
pSUIPAddress: string;
parameters: CancelMoneyInInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCardCreatePostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInCreateInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCardDirect3DAuthenticatePostRequest {
transactionid: number;
authorization: string;
pSUIPAddress: string;
parameters: MoneyIn3DAuthenticateInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCardDirect3DConfirmPutRequest {
transactionid: number;
authorization: string;
pSUIPAddress: string;
parameters: MoneyIn3DConfirmInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCardDirectPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCardGetRequest {
cardId: number;
authorization: string;
pSUIPAddress: string;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCardGet0Request {
accountid: string;
authorization: string;
pSUIPAddress: string;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCardPaymentFormPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: CreatePaymentFormInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCardRebillRequest {
cardid: number;
authorization: string;
pSUIPAddress: string;
parameters: MoneyInWithCardIdInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCardRegisterPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: RegisterCardInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCardSubscriptionPostRequest {
cardid: number;
authorization: string;
pSUIPAddress: string;
parameters: MoneyInSubscriptionInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCardUnregisterPutRequest {
cardid: number;
authorization: string;
pSUIPAddress: string;
parameters: UnregisterCardInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsCardWebInitPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInWebInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsChequeGetRequest {
authorization: string;
pSUIPAddress: string;
updateDate?: string;
updateEndDate?: string;
chequeType?: MoneyInsChequeGetChequeTypeEnum;
reference?: string;
page?: number;
limit?: number;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsChequeInitPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInChequeInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsDirect3DInitPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyIn3DInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsGetMoneyInBanksRequest {
authorization: string;
pSUIPAddress: string;
countryCodes?: string;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsIDealConfirmPutRequest {
transactionid: number;
authorization: string;
pSUIPAddress: string;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsIDealInitPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInIDealInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsMandateGetRequest {
accountid: string;
authorization: string;
pSUIPAddress: string;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsMandateGetDocumentRequest {
accountid: string;
mandateid: number;
authorization: string;
pSUIPAddress: string;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsMbwayInitPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInMbwayInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsMobilePayInitPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInMobilePayInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsMoneyInGetRequest {
authorization: string;
pSUIPAddress: string;
transactionId?: number;
transactionComment?: string;
transactionMerchantToken?: string;
startDate?: string;
endDate?: string;
page?: number;
limit?: number;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsMoneyInTransferInitRequest {
authorization: string;
pSUIPAddress: string;
rawInput: MoneyInTransferInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsMultibancoInitPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInMultibancoInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsPayTrailInitPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInPayTrailInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsPaymentFormCompletedGetRequest {
formid: string;
authorization: string;
pSUIPAddress: string;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsPaymentFormDisablePutRequest {
formid: string;
authorization: string;
pSUIPAddress: string;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsPayshopInitPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInPayshopInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsSddGetRequest {
authorization: string;
pSUIPAddress: string;
reference?: string;
updateDate?: string;
updateEndDate?: string;
page?: number;
limit?: number;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsSddInitPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInSddInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsSddMandatePostRequest {
authorization: string;
pSUIPAddress: string;
parameters: RegisterSddMandateInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsSddMandateUnregisterPutRequest {
mandatid: number;
authorization: string;
pSUIPAddress: string;
parameters: UnregisterSddMandateInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsSofortInitPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInSofortInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsTrustlyInitPostRequest {
authorization: string;
pSUIPAddress: string;
parameters: MoneyInTrustlyInitInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
export interface MoneyInsValidatePutRequest {
transactionid: number;
authorization: string;
pSUIPAddress: string;
parameters: MoneyInValidateInput;
pSUAcceptLanguage?: string;
pSUUserAgent?: string;
}
/**
*
*/
export class MoneyInsApi extends runtime.BaseAPI {
/**
* Use GetMoneyInIBANStatus to obtain the list of all Money-In by fund transfer (not by card payment) received by Lemonway, starting from an entry date given in input to this method.
* Search for a Money-In by Fund Transfer
*/
async moneyInsBankwireGetRaw(requestParameters: MoneyInsBankwireGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.updateDate === null || requestParameters.updateDate === undefined) {
throw new runtime.RequiredError('updateDate','Required parameter requestParameters.updateDate was null or undefined when calling moneyInsBankwireGet.');
}
if (requestParameters.updateEndDate === null || requestParameters.updateEndDate === undefined) {
throw new runtime.RequiredError('updateEndDate','Required parameter requestParameters.updateEndDate was null or undefined when calling moneyInsBankwireGet.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsBankwireGet.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsBankwireGet.');
}
const queryParameters: any = {};
if (requestParameters.updateDate !== undefined) {
queryParameters['updateDate'] = requestParameters.updateDate;
}
if (requestParameters.updateEndDate !== undefined) {
queryParameters['updateEndDate'] = requestParameters.updateEndDate;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/bankwire`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => GetMoneyInIBANDetailsOutputFromJSON(jsonValue));
}
/**
* Use GetMoneyInIBANStatus to obtain the list of all Money-In by fund transfer (not by card payment) received by Lemonway, starting from an entry date given in input to this method.
* Search for a Money-In by Fund Transfer
*/
async moneyInsBankwireGet(requestParameters: MoneyInsBankwireGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsBankwireGetRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* This functionality enables you to create dedicated (virtual) IBANs. These IBANs are linked to a dedicated payment account and give the possibility to you to receive wire transfers directly to these accounts. The payment schema must be validated prior with Lemonway. This method should be called once you are certain a payment will be received. We advise against associating an IBAN to a payment account preventively. Please contact your account manager to have this function activated.
* Create Dedicated Virtual IBANs
*/
async moneyInsBankwireIbanCreatePostRaw(requestParameters: MoneyInsBankwireIbanCreatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsBankwireIbanCreatePost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsBankwireIbanCreatePost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsBankwireIbanCreatePost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/bankwire/iban/create`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateIBANInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => CreateIBANOutputFromJSON(jsonValue));
}
/**
* This functionality enables you to create dedicated (virtual) IBANs. These IBANs are linked to a dedicated payment account and give the possibility to you to receive wire transfers directly to these accounts. The payment schema must be validated prior with Lemonway. This method should be called once you are certain a payment will be received. We advise against associating an IBAN to a payment account preventively. Please contact your account manager to have this function activated.
* Create Dedicated Virtual IBANs
*/
async moneyInsBankwireIbanCreatePost(requestParameters: MoneyInsBankwireIbanCreatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsBankwireIbanCreatePostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* This functionality enables you to disable dedicated IBANs.
* Disable a Dedicated Virtual IBAN
*/
async moneyInsBankwireIbanDisablePostRaw(requestParameters: MoneyInsBankwireIbanDisablePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.ibanid === null || requestParameters.ibanid === undefined) {
throw new runtime.RequiredError('ibanid','Required parameter requestParameters.ibanid was null or undefined when calling moneyInsBankwireIbanDisablePost.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsBankwireIbanDisablePost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsBankwireIbanDisablePost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsBankwireIbanDisablePost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/bankwire/iban/{ibanid}/disable`.replace(`{${"ibanid"}}`, encodeURIComponent(String(requestParameters.ibanid))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: DisableIBANInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => DisableIBANOutputFromJSON(jsonValue));
}
/**
* This functionality enables you to disable dedicated IBANs.
* Disable a Dedicated Virtual IBAN
*/
async moneyInsBankwireIbanDisablePost(requestParameters: MoneyInsBankwireIbanDisablePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsBankwireIbanDisablePostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* With the PUT /moneyins/{transactionid}/cancel method, you can cancel a pre-authorization / SEPA Direct Debit (SDD) request.
* Cancel a Money-In
*/
async moneyInsCancelPutRaw(requestParameters: MoneyInsCancelPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.transactionid === null || requestParameters.transactionid === undefined) {
throw new runtime.RequiredError('transactionid','Required parameter requestParameters.transactionid was null or undefined when calling moneyInsCancelPut.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCancelPut.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCancelPut.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsCancelPut.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/{transactionid}/cancel`.replace(`{${"transactionid"}}`, encodeURIComponent(String(requestParameters.transactionid))),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: CancelMoneyInInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => CancelMoneyInOutputFromJSON(jsonValue));
}
/**
* With the PUT /moneyins/{transactionid}/cancel method, you can cancel a pre-authorization / SEPA Direct Debit (SDD) request.
* Cancel a Money-In
*/
async moneyInsCancelPut(requestParameters: MoneyInsCancelPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCancelPutRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Credit an account with Money-In with card without PSP process This functionality is available depending on your contract
* Credit an Account with Money-In with Card without PSP process
*/
async moneyInsCardCreatePostRaw(requestParameters: MoneyInsCardCreatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCardCreatePost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCardCreatePost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsCardCreatePost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/card/create`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInCreateInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInOutputFromJSON(jsonValue));
}
/**
* Credit an account with Money-In with card without PSP process This functionality is available depending on your contract
* Credit an Account with Money-In with Card without PSP process
*/
async moneyInsCardCreatePost(requestParameters: MoneyInsCardCreatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCardCreatePostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* After initializing a 3-D Secure transaction with POST /moneyins/card/direct/3dinit, you can choose not to debit the card, and only check if the user has successfully authenticated.
This is not a payment.
You can not use both POST /moneyins/card/direct/{transactionid}/3dauthenticate and PUT /moneyins/card/direct/{transactionid}/3dconfirm - If you only want to check if the user was correctly authenticated use POST /moneyins/card/direct/{transactionid}/3dauthenticate) - If you want to receive the payment using 3-DS use PUT /moneyins/card/direct/{transactionid}/3dconfirm
A typical use-case: you want to allow your user to save a card for rebills (RegisterCard), but first, you want to make sure that the card belongs to the user and that the user can authenticate successfully.
* Check Money-In 3D-Secure Status (PCI-DSS compliant only)
*/
async moneyInsCardDirect3DAuthenticatePostRaw(requestParameters: MoneyInsCardDirect3DAuthenticatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.transactionid === null || requestParameters.transactionid === undefined) {
throw new runtime.RequiredError('transactionid','Required parameter requestParameters.transactionid was null or undefined when calling moneyInsCardDirect3DAuthenticatePost.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCardDirect3DAuthenticatePost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCardDirect3DAuthenticatePost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsCardDirect3DAuthenticatePost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/card/direct/{transactionid}/3dauthenticate`.replace(`{${"transactionid"}}`, encodeURIComponent(String(requestParameters.transactionid))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyIn3DAuthenticateInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyIn3DAuthenticateOutputFromJSON(jsonValue));
}
/**
* After initializing a 3-D Secure transaction with POST /moneyins/card/direct/3dinit, you can choose not to debit the card, and only check if the user has successfully authenticated.
This is not a payment.
You can not use both POST /moneyins/card/direct/{transactionid}/3dauthenticate and PUT /moneyins/card/direct/{transactionid}/3dconfirm - If you only want to check if the user was correctly authenticated use POST /moneyins/card/direct/{transactionid}/3dauthenticate) - If you want to receive the payment using 3-DS use PUT /moneyins/card/direct/{transactionid}/3dconfirm
A typical use-case: you want to allow your user to save a card for rebills (RegisterCard), but first, you want to make sure that the card belongs to the user and that the user can authenticate successfully.
* Check Money-In 3D-Secure Status (PCI-DSS compliant only)
*/
async moneyInsCardDirect3DAuthenticatePost(requestParameters: MoneyInsCardDirect3DAuthenticatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCardDirect3DAuthenticatePostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* This method finalizes the credit of a wallet by card after 3D Secure authentication of the client:
1. After initiating a Direct Payment using POST /moneyins/card/direct/3dinit, you receive an Authentication URL and a Transaction Id. If you want to register a card for future payments set **registerCard=true** 2. With the Authentication URL, you are able to redirect the end-user to the ACS (Bank Authentication Server) Page 3. After 3D Secure Authentication, you will be called back on the ReturnURL 4. You need to then call POST /moneyins/card/direct/{transactionid}/3dauthenticate to verify the authentication process was done. 5. If the authentication was done then call PUT /moneyins/card/direct/{transactionid}/3dconfirm specifying the return Transaction ID to finalize the payment.
For Subscriptions with equal recurring amounts: for the initial subscription payment, use the POST /moneyins/card/direct/3dinit and then POST /moneyins/card/direct/{transactionid}/3dauthenticate and PUT /moneyins/card/direct/{transactionid}/3dconfirm Ensure that you set: registerCard=true Use POST /moneyins/card/{cardid}/rebill for all subsequent payments.
* Finalize a Direct Payment (PCI-DSS compliant only)
*/
async moneyInsCardDirect3DConfirmPutRaw(requestParameters: MoneyInsCardDirect3DConfirmPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.transactionid === null || requestParameters.transactionid === undefined) {
throw new runtime.RequiredError('transactionid','Required parameter requestParameters.transactionid was null or undefined when calling moneyInsCardDirect3DConfirmPut.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCardDirect3DConfirmPut.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCardDirect3DConfirmPut.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsCardDirect3DConfirmPut.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/card/direct/{transactionid}/3dconfirm`.replace(`{${"transactionid"}}`, encodeURIComponent(String(requestParameters.transactionid))),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: MoneyIn3DConfirmInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyIn3DConfirmOutputFromJSON(jsonValue));
}
/**
* This method finalizes the credit of a wallet by card after 3D Secure authentication of the client:
1. After initiating a Direct Payment using POST /moneyins/card/direct/3dinit, you receive an Authentication URL and a Transaction Id. If you want to register a card for future payments set **registerCard=true** 2. With the Authentication URL, you are able to redirect the end-user to the ACS (Bank Authentication Server) Page 3. After 3D Secure Authentication, you will be called back on the ReturnURL 4. You need to then call POST /moneyins/card/direct/{transactionid}/3dauthenticate to verify the authentication process was done. 5. If the authentication was done then call PUT /moneyins/card/direct/{transactionid}/3dconfirm specifying the return Transaction ID to finalize the payment.
For Subscriptions with equal recurring amounts: for the initial subscription payment, use the POST /moneyins/card/direct/3dinit and then POST /moneyins/card/direct/{transactionid}/3dauthenticate and PUT /moneyins/card/direct/{transactionid}/3dconfirm Ensure that you set: registerCard=true Use POST /moneyins/card/{cardid}/rebill for all subsequent payments.
* Finalize a Direct Payment (PCI-DSS compliant only)
*/
async moneyInsCardDirect3DConfirmPut(requestParameters: MoneyInsCardDirect3DConfirmPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCardDirect3DConfirmPutRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* If your system is not PCI-DSS do not to save any card data on your system. This method enables you to credit an account with a non 3-D Secure card payment. Should only be used on mobile devices. For internet payments use 3-D Secure.
This method allows our system to credit a wallet and debit a card in real time. Your server has to send us the wallet ID to credit, all card data, the amount, and a comment.
Note: Lemonway does not recommend you use the MoneyIn method from January 2021. You should now use POST /moneyins/card/direct/3dini and PUT /moneyins/card/direct/{transactionid}/3dconfirm only.
* (Deprecated) Credit an Account with a non 3-D Secure Card Payment (PCI-DSS compliant only)
*/
async moneyInsCardDirectPostRaw(requestParameters: MoneyInsCardDirectPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCardDirectPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCardDirectPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsCardDirectPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/card/direct`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInOutputFromJSON(jsonValue));
}
/**
* If your system is not PCI-DSS do not to save any card data on your system. This method enables you to credit an account with a non 3-D Secure card payment. Should only be used on mobile devices. For internet payments use 3-D Secure.
This method allows our system to credit a wallet and debit a card in real time. Your server has to send us the wallet ID to credit, all card data, the amount, and a comment.
Note: Lemonway does not recommend you use the MoneyIn method from January 2021. You should now use POST /moneyins/card/direct/3dini and PUT /moneyins/card/direct/{transactionid}/3dconfirm only.
* (Deprecated) Credit an Account with a non 3-D Secure Card Payment (PCI-DSS compliant only)
*/
async moneyInsCardDirectPost(requestParameters: MoneyInsCardDirectPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCardDirectPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* This method lets you retrieve card information
* Get Card Information
*/
async moneyInsCardGetRaw(requestParameters: MoneyInsCardGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.cardId === null || requestParameters.cardId === undefined) {
throw new runtime.RequiredError('cardId','Required parameter requestParameters.cardId was null or undefined when calling moneyInsCardGet.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCardGet.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCardGet.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/card/{cardId}`.replace(`{${"cardId"}}`, encodeURIComponent(String(requestParameters.cardId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => GetCardOutputFromJSON(jsonValue));
}
/**
* This method lets you retrieve card information
* Get Card Information
*/
async moneyInsCardGet(requestParameters: MoneyInsCardGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCardGetRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get the Card Associated to a Payment Account
*/
async moneyInsCardGet_1Raw(requestParameters: MoneyInsCardGet0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.accountid === null || requestParameters.accountid === undefined) {
throw new runtime.RequiredError('accountid','Required parameter requestParameters.accountid was null or undefined when calling moneyInsCardGet_1.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCardGet_1.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCardGet_1.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/{accountid}/card`.replace(`{${"accountid"}}`, encodeURIComponent(String(requestParameters.accountid))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => AccountCardsOutputFromJSON(jsonValue));
}
/**
* Get the Card Associated to a Payment Account
*/
async moneyInsCardGet_1(requestParameters: MoneyInsCardGet0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCardGet_1Raw(requestParameters, initOverrides);
return await response.value();
}
/**
* This feature enables you to create a payment form for a payer. - The form is accessible to public, anyone can pay with a link to the payment form
- Payment forms are generated and managed by Lemonway
- They support only payment by credit card (only for Atosv1, Atosv2 & PAYXPERT)
- Deferred payment is not yet supported
* Create Payment Form
*/
async moneyInsCardPaymentFormPostRaw(requestParameters: MoneyInsCardPaymentFormPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCardPaymentFormPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCardPaymentFormPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsCardPaymentFormPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/card/paymentform`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreatePaymentFormInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => CreatePaymentFormOutputFromJSON(jsonValue));
}
/**
* This feature enables you to create a payment form for a payer. - The form is accessible to public, anyone can pay with a link to the payment form
- Payment forms are generated and managed by Lemonway
- They support only payment by credit card (only for Atosv1, Atosv2 & PAYXPERT)
- Deferred payment is not yet supported
* Create Payment Form
*/
async moneyInsCardPaymentFormPost(requestParameters: MoneyInsCardPaymentFormPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCardPaymentFormPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Important: Due to PSD2 requirements for strong authentication, rebilling with a registered card for amounts that change on each transaction is no longer available. In the short-term, for completely new transactions, we kindly ask you to use POST /moneyins/card/webinit and ask your clients to re-enter their card details in the payment page.
Use this method to ask to credit a payment account with a card linked to the payment account:
1. The payment account ID to credit
2. The card ID
3. The amount to credit
4. A comment explaining the rebill
It is important that you clarify why the card was rebilled for security and fraud reasons. Consider the following questions: Is it a monthly payment for a service?, if so, which service? What is name of the purchase website?, what was ordered?, and what email was used? Ensure that you add all information regarding the rebill in the provided comment field.
Important: We may request further information to answer complains directly coming to our Customer Service from your customers, or from Banks,Police,Visa/Mastercard, or from the financial regulator.
Recurring Payments
Initiate a first transaction
a. If you are using the PSP Payment Page, you need to have initiated a Web Payment using POST /moneyins/card/webinit with registerCard=true. The amount of the first transaction has to be higher than the recurring payments.
b. If you are using the Direct Mode (PCI-DSS complient only), you need to have registered a Card using POST /moneyins/card/register.
Recurring payments
You need to call POST /moneyins/card/{cardid}/rebill each time you want to make a recurring payment, precising the Card Id returned from step 1.
Payment Upon Delivery (Web PSP Payment only)
a. The day of the purchase: you need to have initiated a Web Payment using POST /moneyins/card/webinit with registerCard=true. You also need to indicate in captureDelayedDays, a number between 1 and 6 days. The amount of the first transaction has to be the same than the one captured later.
b. The day of the service or product delivery: you need to call POST /moneyins/card/{cardid}/rebill precising the Card Id returned from step 1.
* Charge a Registered Card
*/
async moneyInsCardRebillRaw(requestParameters: MoneyInsCardRebillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.cardid === null || requestParameters.cardid === undefined) {
throw new runtime.RequiredError('cardid','Required parameter requestParameters.cardid was null or undefined when calling moneyInsCardRebill.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCardRebill.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCardRebill.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsCardRebill.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/card/{cardid}/rebill`.replace(`{${"cardid"}}`, encodeURIComponent(String(requestParameters.cardid))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInWithCardIdInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInWithCardIdOutputFromJSON(jsonValue));
}
/**
* Important: Due to PSD2 requirements for strong authentication, rebilling with a registered card for amounts that change on each transaction is no longer available. In the short-term, for completely new transactions, we kindly ask you to use POST /moneyins/card/webinit and ask your clients to re-enter their card details in the payment page.
Use this method to ask to credit a payment account with a card linked to the payment account:
1. The payment account ID to credit
2. The card ID
3. The amount to credit
4. A comment explaining the rebill
It is important that you clarify why the card was rebilled for security and fraud reasons. Consider the following questions: Is it a monthly payment for a service?, if so, which service? What is name of the purchase website?, what was ordered?, and what email was used? Ensure that you add all information regarding the rebill in the provided comment field.
Important: We may request further information to answer complains directly coming to our Customer Service from your customers, or from Banks,Police,Visa/Mastercard, or from the financial regulator.
Recurring Payments
Initiate a first transaction
a. If you are using the PSP Payment Page, you need to have initiated a Web Payment using POST /moneyins/card/webinit with registerCard=true. The amount of the first transaction has to be higher than the recurring payments.
b. If you are using the Direct Mode (PCI-DSS complient only), you need to have registered a Card using POST /moneyins/card/register.
Recurring payments
You need to call POST /moneyins/card/{cardid}/rebill each time you want to make a recurring payment, precising the Card Id returned from step 1.
Payment Upon Delivery (Web PSP Payment only)
a. The day of the purchase: you need to have initiated a Web Payment using POST /moneyins/card/webinit with registerCard=true. You also need to indicate in captureDelayedDays, a number between 1 and 6 days. The amount of the first transaction has to be the same than the one captured later.
b. The day of the service or product delivery: you need to call POST /moneyins/card/{cardid}/rebill precising the Card Id returned from step 1.
* Charge a Registered Card
*/
async moneyInsCardRebill(requestParameters: MoneyInsCardRebillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCardRebillRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Register a card and associate it with a Payment Account. The end-user does not have to re-enter their card details for future payments.
Important: Ensure your website login is secured to avoid any security breach that may causes unauthorized access (for example, phishing).
Note: Lemonway does not recommend you use the MoneyIn method from January 2021. You should now use POST /moneyins/card/direct/3dini and PUT /moneyins/card/direct/{transactionid}/3dconfirm only.
* (Deprecated) Register a Card for Direct Payments (PCI-DSS compliant only)
*/
async moneyInsCardRegisterPostRaw(requestParameters: MoneyInsCardRegisterPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCardRegisterPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCardRegisterPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsCardRegisterPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/card/register`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: RegisterCardInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => RegisterCardOutputFromJSON(jsonValue));
}
/**
* Register a card and associate it with a Payment Account. The end-user does not have to re-enter their card details for future payments.
Important: Ensure your website login is secured to avoid any security breach that may causes unauthorized access (for example, phishing).
Note: Lemonway does not recommend you use the MoneyIn method from January 2021. You should now use POST /moneyins/card/direct/3dini and PUT /moneyins/card/direct/{transactionid}/3dconfirm only.
* (Deprecated) Register a Card for Direct Payments (PCI-DSS compliant only)
*/
async moneyInsCardRegisterPost(requestParameters: MoneyInsCardRegisterPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCardRegisterPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Use the following steps to ensure a recurring payment can be setup:
1. Initiate a first transaction a. If you are using the PSP Payment Page, you need to have initiated a Web Payment using POST /moneyins/card/webinit with registerCard=true. b. If you are using the Direct Mode (PCI-DSS authorization required), you need to have registered a Card using POST /moneyins/card/register 2. You then need to initiate POST /moneyins/card/{cardid}/subscription specifying the Card Id returned from the first transaction, and the Subscription Id (a unique reference you indicate for this subscription).You will also need to precise the number of Recurring Payments you want us to initiate in count. The TotalAmount corresponds to the amount of each recurring payment. By default, the payment will be processed 15th of the month. 3. We will create scheduled transactions in the backoffice/dashboard (status 14) 4. On each payment execution date, Lemonway will debit the card and change the pending transaction status to success, and then notify you.
* Initiate Monthly Recurring Payments
*/
async moneyInsCardSubscriptionPostRaw(requestParameters: MoneyInsCardSubscriptionPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.cardid === null || requestParameters.cardid === undefined) {
throw new runtime.RequiredError('cardid','Required parameter requestParameters.cardid was null or undefined when calling moneyInsCardSubscriptionPost.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCardSubscriptionPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCardSubscriptionPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsCardSubscriptionPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/card/{cardid}/subscription`.replace(`{${"cardid"}}`, encodeURIComponent(String(requestParameters.cardid))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInSubscriptionInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInSubscriptionInitOutputFromJSON(jsonValue));
}
/**
* Use the following steps to ensure a recurring payment can be setup:
1. Initiate a first transaction a. If you are using the PSP Payment Page, you need to have initiated a Web Payment using POST /moneyins/card/webinit with registerCard=true. b. If you are using the Direct Mode (PCI-DSS authorization required), you need to have registered a Card using POST /moneyins/card/register 2. You then need to initiate POST /moneyins/card/{cardid}/subscription specifying the Card Id returned from the first transaction, and the Subscription Id (a unique reference you indicate for this subscription).You will also need to precise the number of Recurring Payments you want us to initiate in count. The TotalAmount corresponds to the amount of each recurring payment. By default, the payment will be processed 15th of the month. 3. We will create scheduled transactions in the backoffice/dashboard (status 14) 4. On each payment execution date, Lemonway will debit the card and change the pending transaction status to success, and then notify you.
* Initiate Monthly Recurring Payments
*/
async moneyInsCardSubscriptionPost(requestParameters: MoneyInsCardSubscriptionPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCardSubscriptionPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* This method lets you unregister (break the link) between a card and a payment account.
* Unregister a Card Token
*/
async moneyInsCardUnregisterPutRaw(requestParameters: MoneyInsCardUnregisterPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.cardid === null || requestParameters.cardid === undefined) {
throw new runtime.RequiredError('cardid','Required parameter requestParameters.cardid was null or undefined when calling moneyInsCardUnregisterPut.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCardUnregisterPut.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCardUnregisterPut.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsCardUnregisterPut.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/card/{cardid}/unregister`.replace(`{${"cardid"}}`, encodeURIComponent(String(requestParameters.cardid))),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: UnregisterCardInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => UnregisterCardOutputFromJSON(jsonValue));
}
/**
* This method lets you unregister (break the link) between a card and a payment account.
* Unregister a Card Token
*/
async moneyInsCardUnregisterPut(requestParameters: MoneyInsCardUnregisterPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCardUnregisterPutRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* **Payment with a New Card** 1. By calling **POST /moneyins/card/webinit**, you receive a MoneyInToken. If you want to register a card for future payments set **registerCard=true** and you will also receive a cardId 2. With this token, you are able to redirect the end-user on the PSP payment page. You have to combine the Token and the Lemonway Webkit URL to get the Payment Page URL. You can find the Webkit URL in the onboarding email. For example: https://sandbox-webkit.lemonway.fr/YOUR_COMPANY/dev/ 3. After submitting the payment, the end-user will be redirected to: - returnUrl in case of success - cancelUrl in case of cancellation - errorUrl in case of error These 3 URLs must be public accessible so your end-user, and our WebKit server could send requests to them. --- **Payment with a Registered Card (Web)** To use this type of payment you have to make at least one transaction and set **registerCard=true**. On this first transaction, we will return a **cardId** that is associated with the client card. Ensure that you save this **cardId** to use for future payment. **Note:** To ensure that the client’s card has been registered, call the following method before you initiative payments on a registered card: **GetCard** Payments on a registered card use the following process: 1. You call MoneyInWebInit ensuring that you include the **cardId** in the body of the request. Refer to **steps 2 and 3** as stated above. --- **Subscription Payments** A prerequisite to setting up a subscription is that you have previously made a payment with a card and registered the card By calling **POST /moneyins/card/webinit** **Note:** When you create a recurring payment ensure that the recurringAvgAmount is higher than totalAmount. If a lower amount is used for recurringAvgAmount you will receive a directkit error message: 368: recurringAvgAmount stating that the amount should be greater than the transaction amount. **Note:** Initial transaction for a subscription can be for a predetermined or an undetermined length of time. After you have registered a card refer to **POST /moneyins/card/{cardid}/rebill** to begin setting up a subscription or payment by delivery system. **Important:** To ensure the likelyhood of frictionless payments you must setup payments of equal recurring amounts. --- **Deferred Payments** If you want to create a deferred Web payment, in the request please indicate within captureDelayedDays, a number between 1 and 6 days to have a guaranteed payment. To validate the pre-authorization and capture funds, you need to call **PUT /moneyins/{transactionid}/validate** before 6 days. If the capture is a success, then the original transaction status switches to Success. Available on Mercanet v2, Payzen and Monetico
* Initiate a Web Payment
*/
async moneyInsCardWebInitPostRaw(requestParameters: MoneyInsCardWebInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsCardWebInitPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsCardWebInitPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsCardWebInitPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/card/webinit`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInWebInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInWebInitOutputFromJSON(jsonValue));
}
/**
* **Payment with a New Card** 1. By calling **POST /moneyins/card/webinit**, you receive a MoneyInToken. If you want to register a card for future payments set **registerCard=true** and you will also receive a cardId 2. With this token, you are able to redirect the end-user on the PSP payment page. You have to combine the Token and the Lemonway Webkit URL to get the Payment Page URL. You can find the Webkit URL in the onboarding email. For example: https://sandbox-webkit.lemonway.fr/YOUR_COMPANY/dev/ 3. After submitting the payment, the end-user will be redirected to: - returnUrl in case of success - cancelUrl in case of cancellation - errorUrl in case of error These 3 URLs must be public accessible so your end-user, and our WebKit server could send requests to them. --- **Payment with a Registered Card (Web)** To use this type of payment you have to make at least one transaction and set **registerCard=true**. On this first transaction, we will return a **cardId** that is associated with the client card. Ensure that you save this **cardId** to use for future payment. **Note:** To ensure that the client’s card has been registered, call the following method before you initiative payments on a registered card: **GetCard** Payments on a registered card use the following process: 1. You call MoneyInWebInit ensuring that you include the **cardId** in the body of the request. Refer to **steps 2 and 3** as stated above. --- **Subscription Payments** A prerequisite to setting up a subscription is that you have previously made a payment with a card and registered the card By calling **POST /moneyins/card/webinit** **Note:** When you create a recurring payment ensure that the recurringAvgAmount is higher than totalAmount. If a lower amount is used for recurringAvgAmount you will receive a directkit error message: 368: recurringAvgAmount stating that the amount should be greater than the transaction amount. **Note:** Initial transaction for a subscription can be for a predetermined or an undetermined length of time. After you have registered a card refer to **POST /moneyins/card/{cardid}/rebill** to begin setting up a subscription or payment by delivery system. **Important:** To ensure the likelyhood of frictionless payments you must setup payments of equal recurring amounts. --- **Deferred Payments** If you want to create a deferred Web payment, in the request please indicate within captureDelayedDays, a number between 1 and 6 days to have a guaranteed payment. To validate the pre-authorization and capture funds, you need to call **PUT /moneyins/{transactionid}/validate** before 6 days. If the capture is a success, then the original transaction status switches to Success. Available on Mercanet v2, Payzen and Monetico
* Initiate a Web Payment
*/
async moneyInsCardWebInitPost(requestParameters: MoneyInsCardWebInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsCardWebInitPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Use GET /moneyins/cheque to obtain the list of all money-in by cheque (received by Lemonway), starting from an entry date given in input to this method, or by merchant token.
* Search for Cheque Money-In by Date or by Token
*/
async moneyInsChequeGetRaw(requestParameters: MoneyInsChequeGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsChequeGet.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsChequeGet.');
}
const queryParameters: any = {};
if (requestParameters.updateDate !== undefined) {
queryParameters['updateDate'] = requestParameters.updateDate;
}
if (requestParameters.updateEndDate !== undefined) {
queryParameters['updateEndDate'] = requestParameters.updateEndDate;
}
if (requestParameters.chequeType !== undefined) {
queryParameters['chequeType'] = requestParameters.chequeType;
}
if (requestParameters.reference !== undefined) {
queryParameters['reference'] = requestParameters.reference;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/cheque`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => GetMoneyInChequeDetailsOutputFromJSON(jsonValue));
}
/**
* Use GET /moneyins/cheque to obtain the list of all money-in by cheque (received by Lemonway), starting from an entry date given in input to this method, or by merchant token.
* Search for Cheque Money-In by Date or by Token
*/
async moneyInsChequeGet(requestParameters: MoneyInsChequeGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsChequeGetRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* The following rules apply: If you want to pre-enter the cheques in our system, use the POST /moneyins/cheque/init method
The cheque must be made out to Lemonway
On the back of the cheque, please enter a code to facilitate reconciliation. It will be of the following form: XXXXX-YYYYYYYYYY
- \"XXXXX: code identifying you as indicated in your production configuration form
- -: a separation dash:
- YYYYYYYYY : external identifier of your user\'s payment account
The holder of the cheque must be identical to that of the payment account to be credited
* Register a Cheque
*/
async moneyInsChequeInitPostRaw(requestParameters: MoneyInsChequeInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsChequeInitPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsChequeInitPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsChequeInitPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/cheque/init`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInChequeInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInChequeInitOutputFromJSON(jsonValue));
}
/**
* The following rules apply: If you want to pre-enter the cheques in our system, use the POST /moneyins/cheque/init method
The cheque must be made out to Lemonway
On the back of the cheque, please enter a code to facilitate reconciliation. It will be of the following form: XXXXX-YYYYYYYYYY
- \"XXXXX: code identifying you as indicated in your production configuration form
- -: a separation dash:
- YYYYYYYYY : external identifier of your user\'s payment account
The holder of the cheque must be identical to that of the payment account to be credited
* Register a Cheque
*/
async moneyInsChequeInitPost(requestParameters: MoneyInsChequeInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsChequeInitPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* **Payment with a New Card** This method is more complex that non 3-D Secure payment, but 3-D Secure will ensure that your business is secure. You will need 3 integration points: 1. By calling **POST /moneyins/card/direct/3dinit**, you receive a Authentication URL and a Transaction Id. If you want to register a card for to use card severval times or subscription payments set **registerCard=true.** 2. With the Authentication URL, you are able to redirect the end-user to the ACS (Bank Authentication Server) Page. 3. After 3D Secure Authentication, with the callback ReturnURL. 4. You need to then call **POST /moneyins/card/direct/{transactionid}/3dauthenticate** to verify the authentication process was done. 5. If the authentication was done then, you then call **PUT /moneyins/card/direct/{transactionid}/3dconfirm** specifying the returned Transaction Id to finalize the payment. --- **Payment with a Registered Card** 1. Ensure you have a cardId then call **POST /moneyins/card/direct/3dinit** specifying the cardID parameter (cardId and CVV (optional)). If you want to improve the transaction success rate add the CVV code in the parameters. 2. Refer to **steps 2 - 5** as stated above. **Note:** You require a cardId to make a transaction on a registered card. This id is displayed when you finalized your first payment with the registered card using **PUT /moneyins/card/direct/{transactionid}/3dconfirm** Payments on a registered card use the following process: Call MoneyIn3DInit ensuring that you include the **cardId** in the body of the request. Refer to steps **2 - 5** as stated above. **Note:** To ensure that the client’s card has been registered, call the following method before you initiative payments on a registered card: **GetCard** --- **Subscription Payments** A prerequisite to setting up a subscription is that you have previously made a payment with a card and registered the card using **POST /moneyins/card/direct/3dinit** **Note:** When you create a recurring payment ensure that the **recurringAvgAmount** is higher than totalAmount. If a lower amount is used for **recurringAvgAmount** you will receive a directkit error message 368: recurringAvgAmount should be greater than the transaction amount. **Note:** After you have registered a card refer to **POST /moneyins/card/{cardid}/rebill** to begin setting up a subscription or payment by delivery system. **Important:** To ensure the likelyhood of frictionless payments you must setup payments of equal recurring amounts.
* Initiate a Direct Payment (PCI-DSS compliant only)
*/
async moneyInsDirect3DInitPostRaw(requestParameters: MoneyInsDirect3DInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsDirect3DInitPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsDirect3DInitPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsDirect3DInitPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/card/direct/3dinit`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyIn3DInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyIn3DInitOutputFromJSON(jsonValue));
}
/**
* **Payment with a New Card** This method is more complex that non 3-D Secure payment, but 3-D Secure will ensure that your business is secure. You will need 3 integration points: 1. By calling **POST /moneyins/card/direct/3dinit**, you receive a Authentication URL and a Transaction Id. If you want to register a card for to use card severval times or subscription payments set **registerCard=true.** 2. With the Authentication URL, you are able to redirect the end-user to the ACS (Bank Authentication Server) Page. 3. After 3D Secure Authentication, with the callback ReturnURL. 4. You need to then call **POST /moneyins/card/direct/{transactionid}/3dauthenticate** to verify the authentication process was done. 5. If the authentication was done then, you then call **PUT /moneyins/card/direct/{transactionid}/3dconfirm** specifying the returned Transaction Id to finalize the payment. --- **Payment with a Registered Card** 1. Ensure you have a cardId then call **POST /moneyins/card/direct/3dinit** specifying the cardID parameter (cardId and CVV (optional)). If you want to improve the transaction success rate add the CVV code in the parameters. 2. Refer to **steps 2 - 5** as stated above. **Note:** You require a cardId to make a transaction on a registered card. This id is displayed when you finalized your first payment with the registered card using **PUT /moneyins/card/direct/{transactionid}/3dconfirm** Payments on a registered card use the following process: Call MoneyIn3DInit ensuring that you include the **cardId** in the body of the request. Refer to steps **2 - 5** as stated above. **Note:** To ensure that the client’s card has been registered, call the following method before you initiative payments on a registered card: **GetCard** --- **Subscription Payments** A prerequisite to setting up a subscription is that you have previously made a payment with a card and registered the card using **POST /moneyins/card/direct/3dinit** **Note:** When you create a recurring payment ensure that the **recurringAvgAmount** is higher than totalAmount. If a lower amount is used for **recurringAvgAmount** you will receive a directkit error message 368: recurringAvgAmount should be greater than the transaction amount. **Note:** After you have registered a card refer to **POST /moneyins/card/{cardid}/rebill** to begin setting up a subscription or payment by delivery system. **Important:** To ensure the likelyhood of frictionless payments you must setup payments of equal recurring amounts.
* Initiate a Direct Payment (PCI-DSS compliant only)
*/
async moneyInsDirect3DInitPost(requestParameters: MoneyInsDirect3DInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsDirect3DInitPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Returns the list of supported Banks to make Pay By Bank transfers. This method enables you to design, customize and host a bank selection site, or alternatively a bank\'s bankid can be retrieved from the bank list. id can then be used to send your end-user directly to their bank website.
How does it work?
1. Call the method GET /v2/moneyins/paybybank/transfer/banks. Ensure that you use the bank\'s country code in the Query Parameters to retrieve a list of banks.
Note: If you want a comprehensive list of all supported banks do not specify a country code.
Note: Currently there is not a way to search for a specific bank in a country. Therefore when you create the query FR for example, a list of French banks is displayed in the response. You will be then required to identify the end-user\'s bank.
2. If you have your end-user\'s bankId, and would like to direct them their bank each time they select Pay by Bank on your website:
- Use the method POST v2/moneyins/paybybank/transfer/init using the bankId in the request body. You can then use the redirectURL and id (from the response) to send the end-user directly to their bank without them ever using a bank selection process.
* Get Pay by Bank List
*/
async moneyInsGetMoneyInBanksRaw(requestParameters: MoneyInsGetMoneyInBanksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsGetMoneyInBanks.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsGetMoneyInBanks.');
}
const queryParameters: any = {};
if (requestParameters.countryCodes !== undefined) {
queryParameters['countryCodes'] = requestParameters.countryCodes;
}
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/paybybank/transfer/banks`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => GetMoneyInBanksOutputFromJSON(jsonValue));
}
/**
* Returns the list of supported Banks to make Pay By Bank transfers. This method enables you to design, customize and host a bank selection site, or alternatively a bank\'s bankid can be retrieved from the bank list. id can then be used to send your end-user directly to their bank website.
How does it work?
1. Call the method GET /v2/moneyins/paybybank/transfer/banks. Ensure that you use the bank\'s country code in the Query Parameters to retrieve a list of banks.
Note: If you want a comprehensive list of all supported banks do not specify a country code.
Note: Currently there is not a way to search for a specific bank in a country. Therefore when you create the query FR for example, a list of French banks is displayed in the response. You will be then required to identify the end-user\'s bank.
2. If you have your end-user\'s bankId, and would like to direct them their bank each time they select Pay by Bank on your website:
- Use the method POST v2/moneyins/paybybank/transfer/init using the bankId in the request body. You can then use the redirectURL and id (from the response) to send the end-user directly to their bank without them ever using a bank selection process.
* Get Pay by Bank List
*/
async moneyInsGetMoneyInBanks(requestParameters: MoneyInsGetMoneyInBanksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsGetMoneyInBanksRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* This method finalizes the credit of a payment account by iDeal, after the user has returned to your website.
You can only finalize the operation once.
* Finalization of the iDeal Payment
*/
async moneyInsIDealConfirmPutRaw(requestParameters: MoneyInsIDealConfirmPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.transactionid === null || requestParameters.transactionid === undefined) {
throw new runtime.RequiredError('transactionid','Required parameter requestParameters.transactionid was null or undefined when calling moneyInsIDealConfirmPut.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsIDealConfirmPut.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsIDealConfirmPut.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/ideal/{transactionid}/confirm`.replace(`{${"transactionid"}}`, encodeURIComponent(String(requestParameters.transactionid))),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInIDealConfirmOutputFromJSON(jsonValue));
}
/**
* This method finalizes the credit of a payment account by iDeal, after the user has returned to your website.
You can only finalize the operation once.
* Finalization of the iDeal Payment
*/
async moneyInsIDealConfirmPut(requestParameters: MoneyInsIDealConfirmPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsIDealConfirmPutRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* You will need 3 integration points on your code: - One call to Lemonway DirectKit API to init iDeal payment to credit the payment account
- One redirection from your website to the return URL by IDealInit
- One call to Lemonway DirectKit API to finalize the iDeal payment
* Initialize iDeal Payment
*/
async moneyInsIDealInitPostRaw(requestParameters: MoneyInsIDealInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsIDealInitPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsIDealInitPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsIDealInitPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/ideal/init`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInIDealInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInIDealInitOutputFromJSON(jsonValue));
}
/**
* You will need 3 integration points on your code: - One call to Lemonway DirectKit API to init iDeal payment to credit the payment account
- One redirection from your website to the return URL by IDealInit
- One call to Lemonway DirectKit API to finalize the iDeal payment
* Initialize iDeal Payment
*/
async moneyInsIDealInitPost(requestParameters: MoneyInsIDealInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsIDealInitPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get Mandate Associated to a Payment Account
*/
async moneyInsMandateGetRaw(requestParameters: MoneyInsMandateGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.accountid === null || requestParameters.accountid === undefined) {
throw new runtime.RequiredError('accountid','Required parameter requestParameters.accountid was null or undefined when calling moneyInsMandateGet.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsMandateGet.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsMandateGet.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/{accountid}/mandate`.replace(`{${"accountid"}}`, encodeURIComponent(String(requestParameters.accountid))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => AccountMandatsOutputFromJSON(jsonValue));
}
/**
* Get Mandate Associated to a Payment Account
*/
async moneyInsMandateGet(requestParameters: MoneyInsMandateGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsMandateGetRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* This method will allow you to download a mandate document that is registered to one of your payment accounts.
* Get Mandate Document
*/
async moneyInsMandateGetDocumentRaw(requestParameters: MoneyInsMandateGetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.accountid === null || requestParameters.accountid === undefined) {
throw new runtime.RequiredError('accountid','Required parameter requestParameters.accountid was null or undefined when calling moneyInsMandateGetDocument.');
}
if (requestParameters.mandateid === null || requestParameters.mandateid === undefined) {
throw new runtime.RequiredError('mandateid','Required parameter requestParameters.mandateid was null or undefined when calling moneyInsMandateGetDocument.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsMandateGetDocument.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsMandateGetDocument.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/{accountid}/mandate/{mandateid}/document`.replace(`{${"accountid"}}`, encodeURIComponent(String(requestParameters.accountid))).replace(`{${"mandateid"}}`, encodeURIComponent(String(requestParameters.mandateid))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MandateGetDocumentOutputFromJSON(jsonValue));
}
/**
* This method will allow you to download a mandate document that is registered to one of your payment accounts.
* Get Mandate Document
*/
async moneyInsMandateGetDocument(requestParameters: MoneyInsMandateGetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsMandateGetDocumentRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Payment process: - You call the Lemonway DirectKit API, provide a phone number to initialize the payment
- The payment order is sent to the customer\'s smartphone
- The customer pays with their smartphone
- You will be notified after the payment is settled
* Initialize MB WAY Payment
*/
async moneyInsMbwayInitPostRaw(requestParameters: MoneyInsMbwayInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsMbwayInitPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsMbwayInitPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsMbwayInitPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/mbway/init`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInMbwayInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInMbwayInitOutputFromJSON(jsonValue));
}
/**
* Payment process: - You call the Lemonway DirectKit API, provide a phone number to initialize the payment
- The payment order is sent to the customer\'s smartphone
- The customer pays with their smartphone
- You will be notified after the payment is settled
* Initialize MB WAY Payment
*/
async moneyInsMbwayInitPost(requestParameters: MoneyInsMbwayInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsMbwayInitPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* You will need two integration points on your code: - One call to Lemonway DirectKit API to init MobilePay payment to credit the payment account
- One redirection from your website to the return URL by MobilePay
* Initialize MobilePay Payment
*/
async moneyInsMobilePayInitPostRaw(requestParameters: MoneyInsMobilePayInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsMobilePayInitPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsMobilePayInitPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsMobilePayInitPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/mobilePay/init`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInMobilePayInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInMobilePayInitOutputFromJSON(jsonValue));
}
/**
* You will need two integration points on your code: - One call to Lemonway DirectKit API to init MobilePay payment to credit the payment account
- One redirection from your website to the return URL by MobilePay
* Initialize MobilePay Payment
*/
async moneyInsMobilePayInitPost(requestParameters: MoneyInsMobilePayInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsMobilePayInitPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Retrieves the details of a Payment that has previously been initiated.
* Retrieve Payment Details
*/
async moneyInsMoneyInGetRaw(requestParameters: MoneyInsMoneyInGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsMoneyInGet.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsMoneyInGet.');
}
const queryParameters: any = {};
if (requestParameters.transactionId !== undefined) {
queryParameters['transactionId'] = requestParameters.transactionId;
}
if (requestParameters.transactionComment !== undefined) {
queryParameters['transactionComment'] = requestParameters.transactionComment;
}
if (requestParameters.transactionMerchantToken !== undefined) {
queryParameters['transactionMerchantToken'] = requestParameters.transactionMerchantToken;
}
if (requestParameters.startDate !== undefined) {
queryParameters['startDate'] = requestParameters.startDate;
}
if (requestParameters.endDate !== undefined) {
queryParameters['endDate'] = requestParameters.endDate;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => GetMoneyInTransDetailsOutputFromJSON(jsonValue));
}
/**
* Retrieves the details of a Payment that has previously been initiated.
* Retrieve Payment Details
*/
async moneyInsMoneyInGet(requestParameters: MoneyInsMoneyInGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsMoneyInGetRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* How does it work?
1. Call POST v2/moneyins/paybybank/transfer/init, to receive a redirect URL and the transaction Id.
2. Redirect the end-user to your bank selection page, were they can select their bank from the displayed list.
Note: If you specify the bankId in the request body, the end-user will be directed to their bank.
For further information on how to obtain bankIds, see: /v2/moneyins/ paybybank/transfer/banks 3. Once the end-user selects their bank they are redirected to the bank webpage to enter their credentials. Note: If you have previously specified the bankId the end-user only needs to enter their bank credentials at this stage.
4. After successfully entering their credentials, the end-user will go through Strong Customer Authentication (SCA) to confirm their identity (SCA examples include: face recognition or mobile Bank App software). Some bank ask to SCA before entering credentials.
5. Once successfully authenticated the end-user only needs to verify and validate the amount, comments and so forth on the bank website. 6. After submitting the payment, the end-user will be redirected to: - returnUrl in case of success
- cancelUrl in case of cancellation
- errorUrl in case of error.
These 3 URLs must be publicly accessible for the end-user. It must also be accessible to our WebKit server to send requests to the end-user.
* Initiate Pay by Bank
*/
async moneyInsMoneyInTransferInitRaw(requestParameters: MoneyInsMoneyInTransferInitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsMoneyInTransferInit.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsMoneyInTransferInit.');
}
if (requestParameters.rawInput === null || requestParameters.rawInput === undefined) {
throw new runtime.RequiredError('rawInput','Required parameter requestParameters.rawInput was null or undefined when calling moneyInsMoneyInTransferInit.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/paybybank/transfer/init`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInTransferInitInputToJSON(requestParameters.rawInput),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInTransferInitOutputFromJSON(jsonValue));
}
/**
* How does it work?
1. Call POST v2/moneyins/paybybank/transfer/init, to receive a redirect URL and the transaction Id.
2. Redirect the end-user to your bank selection page, were they can select their bank from the displayed list.
Note: If you specify the bankId in the request body, the end-user will be directed to their bank.
For further information on how to obtain bankIds, see: /v2/moneyins/ paybybank/transfer/banks 3. Once the end-user selects their bank they are redirected to the bank webpage to enter their credentials. Note: If you have previously specified the bankId the end-user only needs to enter their bank credentials at this stage.
4. After successfully entering their credentials, the end-user will go through Strong Customer Authentication (SCA) to confirm their identity (SCA examples include: face recognition or mobile Bank App software). Some bank ask to SCA before entering credentials.
5. Once successfully authenticated the end-user only needs to verify and validate the amount, comments and so forth on the bank website. 6. After submitting the payment, the end-user will be redirected to: - returnUrl in case of success
- cancelUrl in case of cancellation
- errorUrl in case of error.
These 3 URLs must be publicly accessible for the end-user. It must also be accessible to our WebKit server to send requests to the end-user.
* Initiate Pay by Bank
*/
async moneyInsMoneyInTransferInit(requestParameters: MoneyInsMoneyInTransferInitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsMoneyInTransferInitRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Payment process: - You call the Lemonway DirectKit API to initialize the credit transaction of a payment account and get a payment reference
- You give the payment reference to the final customer
- The customer uses the reference to pay on an ATM
- The will be notified after the payment is settled
* Initialize Multibanco Payment
*/
async moneyInsMultibancoInitPostRaw(requestParameters: MoneyInsMultibancoInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsMultibancoInitPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsMultibancoInitPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsMultibancoInitPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/multibanco/init`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInMultibancoInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInMultibancoInitOutputFromJSON(jsonValue));
}
/**
* Payment process: - You call the Lemonway DirectKit API to initialize the credit transaction of a payment account and get a payment reference
- You give the payment reference to the final customer
- The customer uses the reference to pay on an ATM
- The will be notified after the payment is settled
* Initialize Multibanco Payment
*/
async moneyInsMultibancoInitPost(requestParameters: MoneyInsMultibancoInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsMultibancoInitPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* You will need 2 integration points on your code: - One call to Lemonway DirectKit API to init PayTrail payment to credit the payment account
- One redirection from your website to the return URL by PayTrail
* Initialize PayTrail Payment
*/
async moneyInsPayTrailInitPostRaw(requestParameters: MoneyInsPayTrailInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsPayTrailInitPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsPayTrailInitPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsPayTrailInitPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/paytrail/init`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInPayTrailInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInPayTrailInitOutputFromJSON(jsonValue));
}
/**
* You will need 2 integration points on your code: - One call to Lemonway DirectKit API to init PayTrail payment to credit the payment account
- One redirection from your website to the return URL by PayTrail
* Initialize PayTrail Payment
*/
async moneyInsPayTrailInitPost(requestParameters: MoneyInsPayTrailInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsPayTrailInitPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* This method lets you to retreive the status of a completed (or filled) payment form
Scenario - Using the POST /moneyins/card/paymentform method, you have generated a re-usable Payment Form (with the form Id is for example 579c7def4bb0411da294d9b57c2c1323)
- Some clients filled the form and make payment.
- Each time a client completes the form and click on the Accept and Pay button, Lemonway will store the completed form and generate a new id for it, for example 7e98be392a5e45f6bc357a9ab8c623d2
- The initial status of the completed form is pending. When client finish the payment process, it will switch to PAID. It could also switch to CANCEL or ERROR.
- In this example, the completed form 7e98.. was created from the parent form 579c..The form 579c.. is reusable, which means it can be completed several time by different clients, so it could have many completed version.This function allows you to retreive the status of a the filled form via its id (7e98..).
* Get Details of a Completed Payment Form
*/
async moneyInsPaymentFormCompletedGetRaw(requestParameters: MoneyInsPaymentFormCompletedGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.formid === null || requestParameters.formid === undefined) {
throw new runtime.RequiredError('formid','Required parameter requestParameters.formid was null or undefined when calling moneyInsPaymentFormCompletedGet.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsPaymentFormCompletedGet.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsPaymentFormCompletedGet.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/paymentform/{formid}/completed`.replace(`{${"formid"}}`, encodeURIComponent(String(requestParameters.formid))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => GetCompletedPaymentFormOutputFromJSON(jsonValue));
}
/**
* This method lets you to retreive the status of a completed (or filled) payment form
Scenario - Using the POST /moneyins/card/paymentform method, you have generated a re-usable Payment Form (with the form Id is for example 579c7def4bb0411da294d9b57c2c1323)
- Some clients filled the form and make payment.
- Each time a client completes the form and click on the Accept and Pay button, Lemonway will store the completed form and generate a new id for it, for example 7e98be392a5e45f6bc357a9ab8c623d2
- The initial status of the completed form is pending. When client finish the payment process, it will switch to PAID. It could also switch to CANCEL or ERROR.
- In this example, the completed form 7e98.. was created from the parent form 579c..The form 579c.. is reusable, which means it can be completed several time by different clients, so it could have many completed version.This function allows you to retreive the status of a the filled form via its id (7e98..).
* Get Details of a Completed Payment Form
*/
async moneyInsPaymentFormCompletedGet(requestParameters: MoneyInsPaymentFormCompletedGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsPaymentFormCompletedGetRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Disable a payment form created by CreatePaymentForm
* Disable a Payment Form
*/
async moneyInsPaymentFormDisablePutRaw(requestParameters: MoneyInsPaymentFormDisablePutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.formid === null || requestParameters.formid === undefined) {
throw new runtime.RequiredError('formid','Required parameter requestParameters.formid was null or undefined when calling moneyInsPaymentFormDisablePut.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsPaymentFormDisablePut.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsPaymentFormDisablePut.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/paymentform/{formid}/disable`.replace(`{${"formid"}}`, encodeURIComponent(String(requestParameters.formid))),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => DisablePaymentFormOutputFromJSON(jsonValue));
}
/**
* Disable a payment form created by CreatePaymentForm
* Disable a Payment Form
*/
async moneyInsPaymentFormDisablePut(requestParameters: MoneyInsPaymentFormDisablePutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsPaymentFormDisablePutRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Payment process - Your system will call the Lemonway DirectKit API to initialize the credit transaction of a payment account and get a payment reference
- Your system gives the payment reference to the final customer
- The customer uses the reference to pay in a shop
- Your system will be notified after the payment is settled
* Initialize Payshop Payment
*/
async moneyInsPayshopInitPostRaw(requestParameters: MoneyInsPayshopInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsPayshopInitPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsPayshopInitPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsPayshopInitPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/payshop/init`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInPayshopInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInPayshopInitOutputFromJSON(jsonValue));
}
/**
* Payment process - Your system will call the Lemonway DirectKit API to initialize the credit transaction of a payment account and get a payment reference
- Your system gives the payment reference to the final customer
- The customer uses the reference to pay in a shop
- Your system will be notified after the payment is settled
* Initialize Payshop Payment
*/
async moneyInsPayshopInitPost(requestParameters: MoneyInsPayshopInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsPayshopInitPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Returns the list of Money-In by SDD which status has changed since the input date.
* List of Money-In by SEPA Direct Debit (SDD)
*/
async moneyInsSddGetRaw(requestParameters: MoneyInsSddGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsSddGet.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsSddGet.');
}
const queryParameters: any = {};
if (requestParameters.reference !== undefined) {
queryParameters['reference'] = requestParameters.reference;
}
if (requestParameters.updateDate !== undefined) {
queryParameters['updateDate'] = requestParameters.updateDate;
}
if (requestParameters.updateEndDate !== undefined) {
queryParameters['updateEndDate'] = requestParameters.updateEndDate;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/sdd`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => GetMoneyInSddOutputFromJSON(jsonValue));
}
/**
* Returns the list of Money-In by SDD which status has changed since the input date.
* List of Money-In by SEPA Direct Debit (SDD)
*/
async moneyInsSddGet(requestParameters: MoneyInsSddGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsSddGetRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* SEPA Direct Debit requests are sent to our bank every working day at 10:30am (CET).
Prequisites:
1. You allow your client to fill in a mandate, and pre-register it with Lemonway, by calling POST /moneyins/sdd/mandate
2. Follow the SignDocumentInit process in order to electronically sign the mandate
Request the direct debit:
1. You call POST /moneyins/sdd/init to ask for a debit
2. Lemonway sends the request to the bank every working day at 10:30am, Paris time (CET).
3. Once the request is sent to the bank, the actual debit on the client\'s bank account will happen about 1 working days later. If you indicate a date, the debit will happen on the given date.
4. When Lemonway receives the payment, the SDD payment will be validated and the client payment account will be credited
5. You can call GET /moneyins/sdd once a day in order to know which payments have been validated.You can also use our notification functionality.
* Request a SEPA Direct Debit (SDD)
*/
async moneyInsSddInitPostRaw(requestParameters: MoneyInsSddInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsSddInitPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsSddInitPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsSddInitPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/sdd/init`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInSddInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInSddInitOutputFromJSON(jsonValue));
}
/**
* SEPA Direct Debit requests are sent to our bank every working day at 10:30am (CET).
Prequisites:
1. You allow your client to fill in a mandate, and pre-register it with Lemonway, by calling POST /moneyins/sdd/mandate
2. Follow the SignDocumentInit process in order to electronically sign the mandate
Request the direct debit:
1. You call POST /moneyins/sdd/init to ask for a debit
2. Lemonway sends the request to the bank every working day at 10:30am, Paris time (CET).
3. Once the request is sent to the bank, the actual debit on the client\'s bank account will happen about 1 working days later. If you indicate a date, the debit will happen on the given date.
4. When Lemonway receives the payment, the SDD payment will be validated and the client payment account will be credited
5. You can call GET /moneyins/sdd once a day in order to know which payments have been validated.You can also use our notification functionality.
* Request a SEPA Direct Debit (SDD)
*/
async moneyInsSddInitPost(requestParameters: MoneyInsSddInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsSddInitPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* This method allows you to pre-register a mandate.
- If you register a mandate with electronic signature, the mandate will be pending. You need to use [SignDocumentInit](https://apidoc.lemonway.com/#operation/Accounts_DocumentsSignInitPost) call to sign the mandate. The status will change accordingly.
- If you register a mandate with opt-in signature, the mandate will be automatically validated. Please refer to the Support Team for this option.
* Register a SDD Mandate
*/
async moneyInsSddMandatePostRaw(requestParameters: MoneyInsSddMandatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsSddMandatePost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsSddMandatePost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsSddMandatePost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/sdd/mandate`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: RegisterSddMandateInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => RegisterSddMandateOutputFromJSON(jsonValue));
}
/**
* This method allows you to pre-register a mandate.
- If you register a mandate with electronic signature, the mandate will be pending. You need to use [SignDocumentInit](https://apidoc.lemonway.com/#operation/Accounts_DocumentsSignInitPost) call to sign the mandate. The status will change accordingly.
- If you register a mandate with opt-in signature, the mandate will be automatically validated. Please refer to the Support Team for this option.
* Register a SDD Mandate
*/
async moneyInsSddMandatePost(requestParameters: MoneyInsSddMandatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsSddMandatePostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* This allows you to deactivate a mandate
* Deactivate a Mandate
*/
async moneyInsSddMandateUnregisterPutRaw(requestParameters: MoneyInsSddMandateUnregisterPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.mandatid === null || requestParameters.mandatid === undefined) {
throw new runtime.RequiredError('mandatid','Required parameter requestParameters.mandatid was null or undefined when calling moneyInsSddMandateUnregisterPut.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsSddMandateUnregisterPut.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsSddMandateUnregisterPut.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsSddMandateUnregisterPut.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/sdd/mandate/{mandatid}/unregister`.replace(`{${"mandatid"}}`, encodeURIComponent(String(requestParameters.mandatid))),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: UnregisterSddMandateInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => UnregisterSddMandateOutputFromJSON(jsonValue));
}
/**
* This allows you to deactivate a mandate
* Deactivate a Mandate
*/
async moneyInsSddMandateUnregisterPut(requestParameters: MoneyInsSddMandateUnregisterPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsSddMandateUnregisterPutRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* You will need 2 integration points on your code: - One call to Lemonway DirectKit API to init Sofort payment to credit the payment account
- One redirection from your website to the return URL by Sofort
* Initialize Sofort Payment
*/
async moneyInsSofortInitPostRaw(requestParameters: MoneyInsSofortInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsSofortInitPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsSofortInitPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsSofortInitPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/sofort/init`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInSofortInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInSofortInitOutputFromJSON(jsonValue));
}
/**
* You will need 2 integration points on your code: - One call to Lemonway DirectKit API to init Sofort payment to credit the payment account
- One redirection from your website to the return URL by Sofort
* Initialize Sofort Payment
*/
async moneyInsSofortInitPost(requestParameters: MoneyInsSofortInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsSofortInitPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Trustly is a Swedish payment method used in 29 European countries. With Trustly you can buy and pay from your bank account.
* Initialize Trustly Payment
*/
async moneyInsTrustlyInitPostRaw(requestParameters: MoneyInsTrustlyInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsTrustlyInitPost.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsTrustlyInitPost.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsTrustlyInitPost.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/trustly/init`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MoneyInTrustlyInitInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInTrustlyInitOutputFromJSON(jsonValue));
}
/**
* Trustly is a Swedish payment method used in 29 European countries. With Trustly you can buy and pay from your bank account.
* Initialize Trustly Payment
*/
async moneyInsTrustlyInitPost(requestParameters: MoneyInsTrustlyInitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsTrustlyInitPostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* This method is only used in deferred payment. Pre-authroriztion validation can only be done once. 1. After initiating a pre-authorized Web Payment using POST /moneyins/card/webinit, you received a Transaction Id from Lemonway. 2. Depending on the number you specified as captureDelayedDays, funds are blocked between 1 to 6 days maximum. 3. To validate the pre-authorization, you need to call PUT /moneyins/{transactionid}/validate. If the capture is a success, then the original transaction status switches to Success.
* Capture a Deferred Payment
*/
async moneyInsValidatePutRaw(requestParameters: MoneyInsValidatePutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.transactionid === null || requestParameters.transactionid === undefined) {
throw new runtime.RequiredError('transactionid','Required parameter requestParameters.transactionid was null or undefined when calling moneyInsValidatePut.');
}
if (requestParameters.authorization === null || requestParameters.authorization === undefined) {
throw new runtime.RequiredError('authorization','Required parameter requestParameters.authorization was null or undefined when calling moneyInsValidatePut.');
}
if (requestParameters.pSUIPAddress === null || requestParameters.pSUIPAddress === undefined) {
throw new runtime.RequiredError('pSUIPAddress','Required parameter requestParameters.pSUIPAddress was null or undefined when calling moneyInsValidatePut.');
}
if (requestParameters.parameters === null || requestParameters.parameters === undefined) {
throw new runtime.RequiredError('parameters','Required parameter requestParameters.parameters was null or undefined when calling moneyInsValidatePut.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (requestParameters.authorization !== undefined && requestParameters.authorization !== null) {
headerParameters['Authorization'] = String(requestParameters.authorization);
}
if (requestParameters.pSUAcceptLanguage !== undefined && requestParameters.pSUAcceptLanguage !== null) {
headerParameters['PSU-Accept-Language'] = String(requestParameters.pSUAcceptLanguage);
}
if (requestParameters.pSUIPAddress !== undefined && requestParameters.pSUIPAddress !== null) {
headerParameters['PSU-IP-Address'] = String(requestParameters.pSUIPAddress);
}
if (requestParameters.pSUUserAgent !== undefined && requestParameters.pSUUserAgent !== null) {
headerParameters['PSU-User-Agent'] = String(requestParameters.pSUUserAgent);
}
const response = await this.request({
path: `/v2/moneyins/{transactionid}/validate`.replace(`{${"transactionid"}}`, encodeURIComponent(String(requestParameters.transactionid))),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: MoneyInValidateInputToJSON(requestParameters.parameters),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => MoneyInValidateOutputFromJSON(jsonValue));
}
/**
* This method is only used in deferred payment. Pre-authroriztion validation can only be done once. 1. After initiating a pre-authorized Web Payment using POST /moneyins/card/webinit, you received a Transaction Id from Lemonway. 2. Depending on the number you specified as captureDelayedDays, funds are blocked between 1 to 6 days maximum. 3. To validate the pre-authorization, you need to call PUT /moneyins/{transactionid}/validate. If the capture is a success, then the original transaction status switches to Success.
* Capture a Deferred Payment
*/
async moneyInsValidatePut(requestParameters: MoneyInsValidatePutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
const response = await this.moneyInsValidatePutRaw(requestParameters, initOverrides);
return await response.value();
}
}
/**
* @export
*/
export const MoneyInsChequeGetChequeTypeEnum = {
NUMBER_15: 15,
NUMBER_23: 23
} as const;
export type MoneyInsChequeGetChequeTypeEnum = typeof MoneyInsChequeGetChequeTypeEnum[keyof typeof MoneyInsChequeGetChequeTypeEnum];