From f08ec2ed3605cce57be26a966d8622853911a9fd Mon Sep 17 00:00:00 2001 From: Sandrine Da Silva Date: Mon, 16 Dec 2024 16:13:53 +0100 Subject: [PATCH] Add payment method column --- .../components/MerchantProfilePaymentArea.tsx | 2 +- .../MerchantProfilePaymentDetail.tsx | 2 +- .../MerchantProfilePaymentLinkNew.tsx | 4 +- .../components/MerchantProfilePaymentList.tsx | 26 +- clients/banking/src/graphql/partner.gql | 14 +- clients/banking/src/locales/de.json | 7 +- clients/banking/src/locales/en.json | 6 +- clients/banking/src/locales/es.json | 7 +- clients/banking/src/locales/fi.json | 7 +- clients/banking/src/locales/fr.json | 7 +- clients/banking/src/locales/it.json | 7 +- clients/banking/src/locales/nl.json | 7 +- clients/banking/src/locales/pt.json | 7 +- .../dist/partner-admin-schema-config.json | 4 + scripts/graphql/dist/partner-admin-schema.gql | 401 +++++++++--- .../graphql/dist/partner-schema-config.json | 6 + scripts/graphql/dist/partner-schema.gql | 575 ++++++++++++++--- .../dist/unauthenticated-schema-config.json | 14 +- .../graphql/dist/unauthenticated-schema.gql | 595 +++++++++++------- 19 files changed, 1279 insertions(+), 419 deletions(-) diff --git a/clients/banking/src/components/MerchantProfilePaymentArea.tsx b/clients/banking/src/components/MerchantProfilePaymentArea.tsx index 0343988f4..3856405ca 100644 --- a/clients/banking/src/components/MerchantProfilePaymentArea.tsx +++ b/clients/banking/src/components/MerchantProfilePaymentArea.tsx @@ -413,7 +413,7 @@ export const MerchantProfilePaymentArea = ({ params, large }: Props) => { items={payments?.edges.map(item => item.node) ?? []} render={(item, large) => ( diff --git a/clients/banking/src/components/MerchantProfilePaymentDetail.tsx b/clients/banking/src/components/MerchantProfilePaymentDetail.tsx index 75acd8f21..31dbb53e0 100644 --- a/clients/banking/src/components/MerchantProfilePaymentDetail.tsx +++ b/clients/banking/src/components/MerchantProfilePaymentDetail.tsx @@ -244,7 +244,7 @@ const MerchantProfilePaymentDetailView = ({ render={() => isNotNullish(payment.threeDS) ? ( - {payment.threeDS.statusInfo} + {payment.threeDS.statusInfo.status} ) : ( UNKNOWN_VALUE diff --git a/clients/banking/src/components/MerchantProfilePaymentLinkNew.tsx b/clients/banking/src/components/MerchantProfilePaymentLinkNew.tsx index f78c49d04..1679222ba 100644 --- a/clients/banking/src/components/MerchantProfilePaymentLinkNew.tsx +++ b/clients/banking/src/components/MerchantProfilePaymentLinkNew.tsx @@ -145,9 +145,9 @@ const formatPaymentMethodsName = (paymentMethodType: MerchantPaymentMethodType) return match(paymentMethodType) .with("Card", () => t("merchantProfile.paymentLink.paymentMethod.card")) .with(P.union("SepaDirectDebitB2b", "SepaDirectDebitCore"), () => - t("merchantProfile.paymentLink.paymentMethod.SepaDirectDebit"), + t("merchantProfile.paymentLink.paymentMethod.sepaDirectDebit"), ) - .with("Check", () => t("merchantProfile.paymentLink.paymentMethod.checks")) + .with("Check", () => t("merchantProfile.paymentLink.paymentMethod.check")) .with(P.union("InternalDirectDebitB2b", "InternalDirectDebitStandard"), () => t("merchantProfile.paymentLink.paymentMethod.internalDirectDebit"), ) diff --git a/clients/banking/src/components/MerchantProfilePaymentList.tsx b/clients/banking/src/components/MerchantProfilePaymentList.tsx index fb38f635e..5078d73a7 100644 --- a/clients/banking/src/components/MerchantProfilePaymentList.tsx +++ b/clients/banking/src/components/MerchantProfilePaymentList.tsx @@ -97,6 +97,28 @@ const columns: ColumnConfig[] = [ ), }, + { + id: "paymentMethod", + width: 200, + title: t("merchantProfile.payments.paymentMethod"), + renderTitle: ({ title }) => , + renderCell: ({ item: { paymentMethod } }) => ( + + + {match(paymentMethod.type) + .with("Card", () => t("merchantProfile.paymentLink.paymentMethod.card")) + .with("Check", () => t("merchantProfile.paymentLink.paymentMethod.check")) + .with("InternalDirectDebitB2b", "InternalDirectDebitStandard", () => + t("merchantProfile.paymentLink.paymentMethod.internalDirectDebit"), + ) + .with("SepaDirectDebitB2b", "SepaDirectDebitCore", () => + t("merchantProfile.paymentLink.paymentMethod.sepaDirectDebit"), + ) + .exhaustive()} + + + ), + }, { id: "externalReference", width: 200, @@ -156,7 +178,7 @@ const columns: ColumnConfig[] = [ ), }, { - width: 48, + width: 40, id: "actions", title: "", renderTitle: () => null, @@ -207,7 +229,7 @@ const smallColumns: ColumnConfig[] = [ ), }, { - width: 48, + width: 40, id: "actions", title: "", renderTitle: () => null, diff --git a/clients/banking/src/graphql/partner.gql b/clients/banking/src/graphql/partner.gql index b8fd7375c..1cd007028 100644 --- a/clients/banking/src/graphql/partner.gql +++ b/clients/banking/src/graphql/partner.gql @@ -2274,8 +2274,13 @@ fragment MerchantPayment on MerchantPayment { currency value } - paymentMethodId - merchantProfileId + paymentMethod { + id + type + } + merchantProfile { + id + } balance { totalAuthorized { currency @@ -2302,8 +2307,9 @@ fragment MerchantPayment on MerchantPayment { value } } - paymentLinkId - id + paymentLink { + id + } reference threeDS { requested diff --git a/clients/banking/src/locales/de.json b/clients/banking/src/locales/de.json index 3962197b8..31e7cfdbf 100644 --- a/clients/banking/src/locales/de.json +++ b/clients/banking/src/locales/de.json @@ -613,10 +613,10 @@ "merchantProfile.paymentLink.new.redirections": "Weiterleitungen", "merchantProfile.paymentLink.new.reference": "Referenz", "merchantProfile.paymentLink.noResults": "Keine Zahlungslinks", - "merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "SEPA-Lastschrift", - "merchantProfile.paymentLink.paymentMethod.card": "Karten", - "merchantProfile.paymentLink.paymentMethod.checks": "Schecks", + "merchantProfile.paymentLink.paymentMethod.card": "Karte", + "merchantProfile.paymentLink.paymentMethod.check": "Scheck", "merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Interne Lastschrift", + "merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "SEPA-Lastschrift", "merchantProfile.paymentLink.status.active": "Aktiv", "merchantProfile.paymentLink.status.completed": "Abgeschlossen", "merchantProfile.paymentLink.status.expired": "Abgelaufen", @@ -649,6 +649,7 @@ "merchantProfile.payments.filter.status.rejected": "Abgelehnt", "merchantProfile.payments.list.actions": "Aktionen", "merchantProfile.payments.list.amount": "Betrag", + "merchantProfile.payments.list.noResults": "Keine Zahlungen", "merchantProfile.payments.newPayment.button": "Zahlung erstellen", "merchantProfile.payments.newPayment.subtitle": "Sie sind bereit, Ihre erste Zahlung zu erstellen", "merchantProfile.payments.newPayment.title": "Sie sind bereit zu starten!", diff --git a/clients/banking/src/locales/en.json b/clients/banking/src/locales/en.json index ef1ac1588..6dbff0be0 100644 --- a/clients/banking/src/locales/en.json +++ b/clients/banking/src/locales/en.json @@ -657,9 +657,9 @@ "merchantProfile.paymentLink.new.redirections": "Redirections", "merchantProfile.paymentLink.new.reference": "Reference", "merchantProfile.paymentLink.noResults": "No payment links", - "merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "SEPA Direct Debit", - "merchantProfile.paymentLink.paymentMethod.card": "Cards", - "merchantProfile.paymentLink.paymentMethod.checks": "Checks", + "merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "SEPA Direct Debit", + "merchantProfile.paymentLink.paymentMethod.card": "Card", + "merchantProfile.paymentLink.paymentMethod.check": "Check", "merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Internal Direct Debit", "merchantProfile.paymentLink.status.active": "Active", "merchantProfile.paymentLink.status.completed": "Completed", diff --git a/clients/banking/src/locales/es.json b/clients/banking/src/locales/es.json index d070ee397..720716cc6 100644 --- a/clients/banking/src/locales/es.json +++ b/clients/banking/src/locales/es.json @@ -613,10 +613,10 @@ "merchantProfile.paymentLink.new.redirections": "Redirecciones", "merchantProfile.paymentLink.new.reference": "Referencia", "merchantProfile.paymentLink.noResults": "No hay enlaces de pago", - "merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "Domiciliación bancaria SEPA", - "merchantProfile.paymentLink.paymentMethod.card": "Tarjetas", - "merchantProfile.paymentLink.paymentMethod.checks": "Cheques", + "merchantProfile.paymentLink.paymentMethod.card": "Tarjeta", + "merchantProfile.paymentLink.paymentMethod.check": "Cheque", "merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Domiciliación bancaria interna", + "merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "Domiciliación bancaria SEPA", "merchantProfile.paymentLink.status.active": "Activo", "merchantProfile.paymentLink.status.completed": "Completado", "merchantProfile.paymentLink.status.expired": "Caducada", @@ -649,6 +649,7 @@ "merchantProfile.payments.filter.status.rejected": "Rechazado", "merchantProfile.payments.list.actions": "Acciones", "merchantProfile.payments.list.amount": "Monto", + "merchantProfile.payments.list.noResults": "Sin pagos", "merchantProfile.payments.newPayment.button": "Crear un pago", "merchantProfile.payments.newPayment.subtitle": "Estás listo para crear tu primer pago", "merchantProfile.payments.newPayment.title": "¡Estás listo para empezar!", diff --git a/clients/banking/src/locales/fi.json b/clients/banking/src/locales/fi.json index 1ac2f196f..a6d2ad134 100644 --- a/clients/banking/src/locales/fi.json +++ b/clients/banking/src/locales/fi.json @@ -613,10 +613,10 @@ "merchantProfile.paymentLink.new.redirections": "Uudelleenohjaukset", "merchantProfile.paymentLink.new.reference": "Viite", "merchantProfile.paymentLink.noResults": "Ei maksulinkkejä", - "merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "Sepan suoraveloitus", - "merchantProfile.paymentLink.paymentMethod.card": "Kortit", - "merchantProfile.paymentLink.paymentMethod.checks": "Tarkistukset", + "merchantProfile.paymentLink.paymentMethod.card": "Kortti", + "merchantProfile.paymentLink.paymentMethod.check": "Shekki", "merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Sisäinen suoraveloitus", + "merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "SEPA-suoraveloitus", "merchantProfile.paymentLink.status.active": "Aktiivinen", "merchantProfile.paymentLink.status.completed": "Valmis", "merchantProfile.paymentLink.status.expired": "Vanhentunut", @@ -649,6 +649,7 @@ "merchantProfile.payments.filter.status.rejected": "Hylätty", "merchantProfile.payments.list.actions": "Toiminnot", "merchantProfile.payments.list.amount": "Summa", + "merchantProfile.payments.list.noResults": "Ei maksuja", "merchantProfile.payments.newPayment.button": "Luo maksu", "merchantProfile.payments.newPayment.subtitle": "Olet valmis luomaan ensimmäisen maksusi", "merchantProfile.payments.newPayment.title": "Olet valmis aloittamaan!", diff --git a/clients/banking/src/locales/fr.json b/clients/banking/src/locales/fr.json index 0e398929b..33263bf1e 100644 --- a/clients/banking/src/locales/fr.json +++ b/clients/banking/src/locales/fr.json @@ -613,10 +613,10 @@ "merchantProfile.paymentLink.new.redirections": "Redirections", "merchantProfile.paymentLink.new.reference": "Référence", "merchantProfile.paymentLink.noResults": "Aucun lien de paiement", - "merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "Prélèvement SEPA", - "merchantProfile.paymentLink.paymentMethod.card": "Cartes", - "merchantProfile.paymentLink.paymentMethod.checks": "Chèques", + "merchantProfile.paymentLink.paymentMethod.card": "Carte", + "merchantProfile.paymentLink.paymentMethod.check": "Chèque", "merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Prélèvement interne", + "merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "Prélèvement SEPA", "merchantProfile.paymentLink.status.active": "Actif", "merchantProfile.paymentLink.status.completed": "Terminé", "merchantProfile.paymentLink.status.expired": "Expiré", @@ -649,6 +649,7 @@ "merchantProfile.payments.filter.status.rejected": "Rejeté", "merchantProfile.payments.list.actions": "Actions", "merchantProfile.payments.list.amount": "Montant", + "merchantProfile.payments.list.noResults": "Aucun paiement", "merchantProfile.payments.newPayment.button": "Créer un paiement", "merchantProfile.payments.newPayment.subtitle": "Vous êtes prêt à créer votre premier paiement", "merchantProfile.payments.newPayment.title": "Vous êtes prêt à commencer !", diff --git a/clients/banking/src/locales/it.json b/clients/banking/src/locales/it.json index 2bcd5dd68..c49cfb977 100644 --- a/clients/banking/src/locales/it.json +++ b/clients/banking/src/locales/it.json @@ -613,10 +613,10 @@ "merchantProfile.paymentLink.new.redirections": "Reindirizzamenti", "merchantProfile.paymentLink.new.reference": "Riferimento", "merchantProfile.paymentLink.noResults": "Nessun link di pagamento", - "merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "Addebito diretto SEPA", - "merchantProfile.paymentLink.paymentMethod.card": "Carte", - "merchantProfile.paymentLink.paymentMethod.checks": "Assegni", + "merchantProfile.paymentLink.paymentMethod.card": "Carta", + "merchantProfile.paymentLink.paymentMethod.check": "Assegno", "merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Addebito diretto interno", + "merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "Addebito diretto SEPA", "merchantProfile.paymentLink.status.active": "Attivo", "merchantProfile.paymentLink.status.completed": "Completato", "merchantProfile.paymentLink.status.expired": "Scaduta", @@ -649,6 +649,7 @@ "merchantProfile.payments.filter.status.rejected": "Rifiutato", "merchantProfile.payments.list.actions": "Azioni", "merchantProfile.payments.list.amount": "Importo", + "merchantProfile.payments.list.noResults": "Nessun pagamento", "merchantProfile.payments.newPayment.button": "Crea un pagamento", "merchantProfile.payments.newPayment.subtitle": "Sei pronto per creare il tuo primo pagamento", "merchantProfile.payments.newPayment.title": "Sei pronto per iniziare!", diff --git a/clients/banking/src/locales/nl.json b/clients/banking/src/locales/nl.json index b98dbf650..1f0d489b2 100644 --- a/clients/banking/src/locales/nl.json +++ b/clients/banking/src/locales/nl.json @@ -613,10 +613,10 @@ "merchantProfile.paymentLink.new.redirections": "Omleidingen", "merchantProfile.paymentLink.new.reference": "Referentie", "merchantProfile.paymentLink.noResults": "Geen betalingslinks", - "merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "SEPA Directe Debet", - "merchantProfile.paymentLink.paymentMethod.card": "Kaarten", - "merchantProfile.paymentLink.paymentMethod.checks": "Cheques", + "merchantProfile.paymentLink.paymentMethod.card": "Kaart", + "merchantProfile.paymentLink.paymentMethod.check": "Cheque", "merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Interne Directe Debet", + "merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "SEPA Automatische Incasso", "merchantProfile.paymentLink.status.active": "Actief", "merchantProfile.paymentLink.status.completed": "Voltooid", "merchantProfile.paymentLink.status.expired": "Verlopen", @@ -649,6 +649,7 @@ "merchantProfile.payments.filter.status.rejected": "Afgewezen", "merchantProfile.payments.list.actions": "Acties", "merchantProfile.payments.list.amount": "Bedrag", + "merchantProfile.payments.list.noResults": "Geen betalingen", "merchantProfile.payments.newPayment.button": "Betaling maken", "merchantProfile.payments.newPayment.subtitle": "Je bent klaar om je eerste betaling te maken", "merchantProfile.payments.newPayment.title": "Je bent er klaar voor om te beginnen!", diff --git a/clients/banking/src/locales/pt.json b/clients/banking/src/locales/pt.json index 04da70bc6..e082ffc5f 100644 --- a/clients/banking/src/locales/pt.json +++ b/clients/banking/src/locales/pt.json @@ -613,10 +613,10 @@ "merchantProfile.paymentLink.new.redirections": "Redirecionamentos", "merchantProfile.paymentLink.new.reference": "Referência", "merchantProfile.paymentLink.noResults": "Sem links de pagamento", - "merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "Débito Direto SEPA", - "merchantProfile.paymentLink.paymentMethod.card": "Cartões", - "merchantProfile.paymentLink.paymentMethod.checks": "Cheques", + "merchantProfile.paymentLink.paymentMethod.card": "Cartão", + "merchantProfile.paymentLink.paymentMethod.check": "Cheque", "merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Débito Direto Interno", + "merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "Débito Direto SEPA", "merchantProfile.paymentLink.status.active": "Ativo", "merchantProfile.paymentLink.status.completed": "Concluído", "merchantProfile.paymentLink.status.expired": "Expirado", @@ -649,6 +649,7 @@ "merchantProfile.payments.filter.status.rejected": "Rejeitado", "merchantProfile.payments.list.actions": "Ações", "merchantProfile.payments.list.amount": "Montante", + "merchantProfile.payments.list.noResults": "Sem pagamentos", "merchantProfile.payments.newPayment.button": "Criar um pagamento", "merchantProfile.payments.newPayment.subtitle": "Está pronto para criar o seu primeiro pagamento", "merchantProfile.payments.newPayment.title": "Está pronto para começar!", diff --git a/scripts/graphql/dist/partner-admin-schema-config.json b/scripts/graphql/dist/partner-admin-schema-config.json index 2583280b7..51b7c159d 100644 --- a/scripts/graphql/dist/partner-admin-schema-config.json +++ b/scripts/graphql/dist/partner-admin-schema-config.json @@ -227,6 +227,10 @@ "ReportDocumentFile", "ResidencePermitDocumentFile" ], + "ThreeDsStatusInfo": [ + "FailedThreeDs", + "SuccessfulThreeDs" + ], "FundingLimitSettingsChangeRequestStatusInfo": [ "FundingLimitSettingsChangeRequestApprovedStatusInfo", "FundingLimitSettingsChangeRequestPendingStatusInfo", diff --git a/scripts/graphql/dist/partner-admin-schema.gql b/scripts/graphql/dist/partner-admin-schema.gql index 1a58bad41..53c501601 100644 --- a/scripts/graphql/dist/partner-admin-schema.gql +++ b/scripts/graphql/dist/partner-admin-schema.gql @@ -1805,6 +1805,80 @@ enum CardAuthorizationType { DataRequest } +type CardMerchantPayment { + """unique identifier of a merchant payment""" + id: ID! + + """status information""" + statusInfo: MerchantPaymentStatusInfo! + + """amount""" + amount: Amount! + + """unique identifier of the payment mandate associated to the payment""" + paymentMandateId: ID! @deprecated(reason: "Use paymentMandate.id instead") + + """payment link associated to the merchant payment""" + paymentMandate: PaymentMandate! + + """unique identifier of the payment link associated to the payment""" + paymentLinkId: ID @deprecated(reason: "Use paymentLink.id instead") + + """payment link associated to the merchant payment""" + paymentLink: MerchantPaymentLink + + """unique identifier of the merchant profile associated to the payment""" + merchantProfileId: ID! @deprecated(reason: "Use merchantProfile.id instead") + + """merchant profile associated to the merchant payment""" + merchantProfile: MerchantProfile! + + """unique identifier of the payment method associated to the payment""" + paymentMethodId: ID! @deprecated(reason: "Use paymentMethod.id instead") + + """payment method associated to the merchant payment""" + paymentMethod: MerchantPaymentMethod! + balance: MerchantBalance! + + """Label""" + label: String + reference: String + + """ + an arbitrary identifier that was defined by you when you created this payment + """ + externalReference: String + + """The billing address associated to the payment""" + billingAddress: Address + threeDS: ThreeDS @deprecated(reason: "Use threeDs instead") + threeDs: ThreeDS + + """Created date""" + createdAt: DateTime! + + """Updated date""" + updatedAt: DateTime! + + """Authorized date""" + authorizedAt: DateTime + + """Canceled date""" + canceledAt: DateTime + + """Captured date""" + capturedAt: DateTime + + """Rejected date""" + rejectedAt: DateTime + + """Refunded date""" + refundedAt: DateTime + + """Disputed date""" + disputedAt: DateTime +} + """COMING SOON""" type CardMerchantPaymentMethod implements MerchantPaymentMethod { """ @@ -1894,12 +1968,6 @@ enum CardPaymentMandateType { Deferred } -"""Location where the card should be printed from""" -enum CardPrintingHub { - France - Spain -} - scalar CardToken enum CardTransactionCategory { @@ -2328,6 +2396,9 @@ enum ConsentPurpose { """when returning a transaction for international credit transfer""" ReturnTransactionForInternationalCreditTransfer + + """when initiating the creation of a credit limit.""" + RequestCreditLimit } type ConsentResponse { @@ -2634,6 +2705,9 @@ enum DetailedConsentPurpose { """when returning a transaction for international credit transfer""" ReturnTransactionForInternationalCreditTransfer + """When requesting for a credit limit""" + RequestCreditLimit + """ if the consent originates from a oauth2 flow, the purpose should be determined from its scopes """ @@ -2792,6 +2866,15 @@ enum DocumentReasonCode { """The signature is not handwritten or electronically certified""" HandwrittenOrCertifiedElectronicSignatureRequired + + """Document refused for compliance reasons""" + ComplianceReason + + """Bank name in articles of association document is invalid""" + InvalidDepositBankName + + """Missing the register extract of the company providing accommodation""" + MissingCompanyProviderRegisterExtract } """The type of the document""" @@ -3000,10 +3083,15 @@ type FacePhotoDocument { type: DocumentType! } -type FailedThreeDs { +type FailedThreeDs implements ThreeDsStatusInfo { status: ThreeDsStatus! - reason: String! - code: String! + reasonCode: FailedThreeDsReason! +} + +enum FailedThreeDsReason { + AuthenticationFailed + AuthenticationExpired + Other } interface Field { @@ -3013,7 +3101,14 @@ interface Field { } enum FieldValidationError { + """When the associated field's value is missing""" Missing + + """ + When the associated field's value is invalid + @comingSoon + """ + Invalid } enum FNCIResult { @@ -4449,16 +4544,28 @@ type MerchantPayment { amount: Amount! """unique identifier of the payment mandate associated to the payment""" - paymentMandateId: ID! + paymentMandateId: ID! @deprecated(reason: "Use paymentMandate.id instead") + + """payment link associated to the merchant payment""" + paymentMandate: PaymentMandate! """unique identifier of the payment link associated to the payment""" - paymentLinkId: ID + paymentLinkId: ID @deprecated(reason: "Use paymentLink.id instead") + + """payment link associated to the merchant payment""" + paymentLink: MerchantPaymentLink """unique identifier of the merchant profile associated to the payment""" - merchantProfileId: ID! + merchantProfileId: ID! @deprecated(reason: "Use merchantProfile.id instead") + + """merchant profile associated to the merchant payment""" + merchantProfile: MerchantProfile! """unique identifier of the payment method associated to the payment""" - paymentMethodId: ID! + paymentMethodId: ID! @deprecated(reason: "Use paymentMethod.id instead") + + """payment method associated to the merchant payment""" + paymentMethod: MerchantPaymentMethod! balance: MerchantBalance! """Label""" @@ -4511,6 +4618,9 @@ type MerchantPaymentCaptured implements MerchantPaymentStatusInfo { status: MerchantPaymentStatus! } +""" +Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) +""" type MerchantPaymentConnection implements Connection { """Information about the current, the previous and the next page""" pageInfo: PageInfo! @@ -4522,6 +4632,7 @@ type MerchantPaymentConnection implements Connection { totalCount: Int! } +"""Implements the Relay Edge interface""" type MerchantPaymentEdge implements Edge { node: MerchantPayment! @@ -4529,23 +4640,36 @@ type MerchantPaymentEdge implements Edge { cursor: String! } +"""Filters that can be applied when listing merchant payments""" input MerchantPaymentFiltersInput { - """To filter on some Merchant Payment Link Status (all if empty)""" - status: [MerchantPaymentStatus!] + """Filter by amount (amount is greater than a given amount)""" + amountGreaterThan: AmountValue - """To filter on some Merchant Payment Method Type (all if empty)""" - paymentMethod: [MerchantPaymentMethodType!] + """Filter by amount (amount is less than a given amount)""" + amountSmallerThan: AmountValue - """To filter after a createdAt value""" + """Filter by createdAt (created after a given date)""" isAfterCreatedAt: DateTime - """To filter before a createdAt value""" + """Filter by createdAt (created before a given date)""" isBeforeCreatedAt: DateTime - """To filter on some text occurrences (words or ids)""" + """Filter by Method Type""" + paymentMethod: [MerchantPaymentMethodType!] + + """Filter by status""" + status: [MerchantPaymentStatus!] + + """ + Search string to look for + + Search will be performed in following fields: + - Label + - Reference + - External Reference + - Amount + """ search: String - amountSmallerThan: AmountValue - amountGreaterThan: AmountValue } """Merchant Payment status initiated""" @@ -4642,6 +4766,9 @@ type MerchantPaymentLink { createdAt: DateTime! } +""" +Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) +""" type MerchantPaymentLinkConnection implements Connection { """Information about the current, the previous and the next page""" pageInfo: PageInfo! @@ -4653,6 +4780,7 @@ type MerchantPaymentLinkConnection implements Connection { totalCount: Int! } +"""Implements the Relay Edge interface""" type MerchantPaymentLinkEdge implements Edge { node: MerchantPaymentLink! @@ -4660,36 +4788,44 @@ type MerchantPaymentLinkEdge implements Edge { cursor: String! } +"""Filters that can be applied when listing merchant payment links""" input MerchantPaymentLinkFiltersInput { - """To filter on some Merchant Payment Link Status (all if empty)""" - status: [MerchantPaymentLinkStatus!] + """Filter by amount (amount is greater than a given amount)""" + amountGreaterThan: AmountValue + + """Filter by amount (amount is less than a given amount)""" + amountSmallerThan: AmountValue - """To filter after a createdAt value""" + """Filter by createdAt (created after a given date)""" isAfterCreatedAt: DateTime - """To filter before a createdAt value""" + """Filter by createdAt (created before a given date)""" isBeforeCreatedAt: DateTime - """To filter on some text occurrences (words or ids)""" - search: String - - """ - To filter payment links having an amount smaller than the given criteria - """ - amountSmallerThan: AmountValue + """Filter by status""" + status: [MerchantPaymentLinkStatus!] """ - To filter payment links having an amount greater than the given criteria + Search string to look for + + Search will be performed in following fields: + - Label + - Reference + - Amount """ - amountGreaterThan: AmountValue + search: String } +""" +Field we can use when ordering that can be applied when listing merchant payment links +""" enum MerchantPaymentLinkOrderByFieldInput { createdAt label url } +"""Order that can be applied when listing merchant payment links""" input MerchantPaymentLinkOrderByInput { field: MerchantPaymentLinkOrderByFieldInput direction: OrderByDirection @@ -4790,6 +4926,9 @@ type MerchantPaymentMethodWrongStatusRejection implements Rejection { message: String! } +""" +Field we can use when ordering that can be applied when listing merchant payments +""" enum MerchantPaymentOrderByFieldInput { label createdAt @@ -4798,6 +4937,7 @@ enum MerchantPaymentOrderByFieldInput { amount } +"""Order that can be applied when listing merchant payments""" input MerchantPaymentOrderByInput { field: MerchantPaymentOrderByFieldInput direction: OrderByDirection @@ -4809,7 +4949,36 @@ type MerchantPaymentRejected implements MerchantPaymentStatusInfo { status: MerchantPaymentStatus! """rejected reason""" - reason: String! + reason: String! @deprecated(reason: "Use rejectedReasonCode instead") + + """rejected reason""" + rejectedReasonCode: MerchantPaymentRejectedReason! +} + +enum MerchantPaymentRejectedReason { + AmountInvalid + CardDetailsInvalid + CardExpired + InvalidPinAttemptsExceeded + RejectedByCardIssuer + SoftDecline3dsExpiration + SoftDecline3dsFailure + SoftDecline3dsNotSupported + SoftDecline3dsRequired + SoftDeclineCardAmountLimitsExceeded + SoftDeclineCardDetailsInvalid + SoftDeclineCardExpired + SoftDeclineCardNotActivated + SoftDeclineCardNotSupported + SoftDeclineCvcCheckFailed + SoftDeclineCvcInvalid + SoftDeclineInsufficientFunds + SoftDeclineRefundTimeLimitExceeded + SoftDeclineRejectedByCardIssuer + SoftDeclineSwanTechnicalErrorOccurred + SoftDeclineTransactionAmountIncorrect + SwanRefused + SwanTechnicalErrorOccurred } """Merchant Payment status""" @@ -4879,8 +5048,48 @@ type MerchantProfile { """updated date""" updatedAt: DateTime! - merchantPaymentLinks(first: Int! = 50, after: String, orderBy: MerchantPaymentLinkOrderByInput, filters: MerchantPaymentLinkFiltersInput): MerchantPaymentLinkConnection - merchantPayments(first: Int! = 50, after: String, orderBy: MerchantPaymentOrderByInput, filters: MerchantPaymentFiltersInput): MerchantPaymentConnection + + """ + Returns a list of merchant payment links + + Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) + """ + merchantPaymentLinks( + """the number of elements to load (maximum: 100)""" + first: Int! = 50 + + """ + the index (a unique reference in string form) from which you will load the following elements + """ + after: String + + """an order you can apply to your list of connections""" + orderBy: MerchantPaymentLinkOrderByInput + + """a filtering table you can apply to your list of connections""" + filters: MerchantPaymentLinkFiltersInput + ): MerchantPaymentLinkConnection + + """ + Returns a list of merchant payments + + Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) + """ + merchantPayments( + """the number of elements to load (maximum: 100)""" + first: Int! = 50 + + """ + the index (a unique reference in string form) from which you will load the following elements + """ + after: String + + """an order you can apply to your list of connections""" + orderBy: MerchantPaymentOrderByInput + + """a filtering table you can apply to your list of connections""" + filters: MerchantPaymentFiltersInput + ): MerchantPaymentConnection } """Merchant Profile Statuses""" @@ -5012,21 +5221,6 @@ enum MonthlyPaymentVolume { } type Mutation { - """Mutation to simulate a manual provisioning""" - simulateManualProvisioning(input: DigitalizationInput!): SimulationResponse! - - """ - Mutation to give decision on digitalization. - If more than one InApp digitalization process are ongoing, only the latest one will be acted upon - """ - simulateInAppProvisioningCompletion(input: InAPpDigitalizationInput!): SimulationResponse! - - """ - Mutation to simulate the reception of a physical card. - Requires a physical card in a valid state for reception. - """ - physicalCardReception(input: PhysicalCardReceptionInput!): PhysicalCardReceptionPayload! - """ Mutation to promote an account holder to the role of project owner. Requires the account holder identifier to be promoted to Project Owner. @@ -5034,15 +5228,6 @@ type Mutation { """ promoteAccountHolderToProjectOwner(input: PromoteAccountHolderToProjectOwnerInput!): PromoteAccountHolderToProjectOwnerPayload! requestSupportingDocuments(input: RequestSupportingDocumentsInput!): RequestSupportingDocumentsPayload! - - """ - Mutation to simulate delivery of a physical card. - Requires a physical card in a valid state for delivery. - """ - simulatePhysicalCardDelivery(input: SimulatePhysicalCardDeliveryInput!): SimulationResponse! - - """Simulate physical card renewal process.""" - simulatePhysicalCardRenewalProcess(input: SimulatePhysicalCardRenewalProcessInput!): SimulatePhysicalCardRenewalProcessPayload! updateSupportingDocumentCollectionStatus(input: UpdateSupportingDocumentCollectionStatusInput!): UpdateSupportingDocumentCollectionStatusPayload! updateSupportingDocumentStatus(input: UpdateSupportingDocumentStatusInput!): UpdateSupportingDocumentStatusPayload! updateAccountHolder(input: UpdateAccountHolderInput!): UpdateAccountHolderPayload! @@ -5073,6 +5258,30 @@ type Mutation { """Mutation to simulate an update of capital deposit document status.""" simulateCapitalDepositDocumentStatus(input: SimulateCapitalDepositDocumentStatusInput!): SimulateCapitalDepositDocumentStatusPayload! + """Mutation to simulate a manual provisioning""" + simulateManualProvisioning(input: DigitalizationInput!): SimulationResponse! + + """ + Mutation to give decision on digitalization. + If more than one InApp digitalization process are ongoing, only the latest one will be acted upon + """ + simulateInAppProvisioningCompletion(input: InAPpDigitalizationInput!): SimulationResponse! + + """ + Mutation to simulate the reception of a physical card. + Requires a physical card in a valid state for reception. + """ + physicalCardReception(input: PhysicalCardReceptionInput!): PhysicalCardReceptionPayload! + + """ + Mutation to simulate delivery of a physical card. + Requires a physical card in a valid state for delivery. + """ + simulatePhysicalCardDelivery(input: SimulatePhysicalCardDeliveryInput!): SimulationResponse! + + """Simulate physical card renewal process.""" + simulatePhysicalCardRenewalProcess(input: SimulatePhysicalCardRenewalProcessInput!): SimulatePhysicalCardRenewalProcessPayload! + """Create a sandbox identification""" createSandboxIdentification(input: CreateSandboxIdentificationInput!): CreateSandboxIdentificationPayload! @@ -6216,7 +6425,7 @@ type PhysicalCardCustomOptions { """Additional line embossed on the card.""" additionalPrintedLine: String - """Custom Card Holder Name""" + """Custom cardholder name""" customCardHolderName: String } @@ -7057,12 +7266,6 @@ type SandboxUser { """ nationalityCCA3: CCA3 - """ - Indicates wether the user has verified his/her identity or not - @deprecated Use the equivalent identificationLevels.expert field instead - """ - idVerified: Boolean @deprecated(reason: "Use the equivalent `identificationLevels.expert` field instead") - """ Saves you considerable time during the development phase, by automatically allowing consent, @@ -7786,8 +7989,11 @@ type SimulateCardTransactionEnrichmentSuccessPayload { } input SimulateIncomingCardAuthorizationAuthorization { + """ + Set this to "Authorized" to simulate a successful payment, and to "Rejected" to simulate a failed payment. You can't authorize a payment successfully with a failed 3DS. However, the authorization can be rejected even if 3DS succeed. + """ status: SimulateIncomingCardAuthorizationStatus! - rejectionReason: String + rejectedReasonCode: MerchantPaymentRejectedReason } enum SimulateIncomingCardAuthorizationCardCategory { @@ -7796,9 +8002,24 @@ enum SimulateIncomingCardAuthorizationCardCategory { } input SimulateIncomingCardAuthorizationCardDetails { + """ + The scheme of the card used for the payment, eg, Visa, Mastercard or CartesBancaires. + """ scheme: SimulateIncomingCardAuthorizationCardScheme! + + """ + The category of the card used for the payment, eg, Commercial or Consumer. + """ category: SimulateIncomingCardAuthorizationCardCategory! + + """ + The type of the card used for the payment, eg, Credit, Debit, Prepaid, Charge or DeferredDebit. + """ type: SimulateIncomingCardAuthorizationCardType! + + """ + The 3-letters code indicating the country of the card used for the payment. + """ country: String! } @@ -7819,8 +8040,20 @@ enum SimulateIncomingCardAuthorizationCardType { input SimulateIncomingCardAuthorizationInput { """ID of the related payment link""" paymentLinkId: ID! + + """ + The status of the authorization returned by the issuing bank. Use this to simulate the success or failure of a payment. This can't be set to "Authorized" if 3DS status is set to "Failed". However, the authorization can be rejected even if 3DS succeed. + """ authorization: SimulateIncomingCardAuthorizationAuthorization! + + """ + The status of the payer authentication returned by the issuing bank. Use this to simulate the success or failure of the 3DS authentication. This can't be set to "Failed" if the Authorization status is set to "Authorized". + """ threeDS: SimulateIncomingCardAuthorizationThreeDS! + + """ + The details of the card used for the payment. Use this to simulate using a specific card for the payment. + """ cardDetails: SimulateIncomingCardAuthorizationCardDetails! } @@ -7841,9 +8074,12 @@ type SimulateIncomingCardAuthorizationSuccessPayload { input SimulateIncomingCardAuthorizationThreeDS { status: SimulateIncomingCardAuthorizationThreeDSStatus! - rejectionReason: String + rejectedReasonCode: SimulationFailedThreeDSReason } +""" +Set this to "Successful" to simulate a successful authentication, and to "Failed" to simulate a failed authentication. You can't authorize a payment successfully with a failed 3DS. However, the authorization can be rejected even if 3DS succeed. +""" enum SimulateIncomingCardAuthorizationThreeDSStatus { Successful Failed @@ -8366,6 +8602,9 @@ input SimulateOutgoingCardCreditInput { """Card type""" cardType: SimulationCardType + """Origin Transaction ID""" + originTransactionId: String + """Original amount""" originalAmount: AmountInput @@ -8741,6 +8980,11 @@ enum SimulationCardType { Virtual } +enum SimulationFailedThreeDSReason { + AuthenticationFailed + AuthenticationExpired +} + """ A rejection returned when the simulation couldn't be performed because of a functional error """ @@ -8837,7 +9081,7 @@ type StartedIdentificationLevelStatusInfo { status: SwanIdentificationStatus! } -type SuccessfulThreeDs { +type SuccessfulThreeDs implements ThreeDsStatusInfo { status: ThreeDsStatus! } @@ -8902,6 +9146,9 @@ type SupportingDocumentCollection { supportingDocumentCollectionUrl: String! type: SupportingDocumentCollectionType! transaction: SupportingDocumentTransaction! + + """Verification renewal id""" + verificationRenewalId: String } """Supporting document collection with Approved status""" @@ -9886,6 +10133,7 @@ type UpdateSupportingDocumentCollectionStatusSuccessPayload { input UpdateSupportingDocumentStatusInput { supportingDocumentId: ID! status: SupportingDocumentStatus! + reasonCode: SupportingDocumentReasonCode } union UpdateSupportingDocumentStatusPayload = UpdateSupportingDocumentStatusSuccessPayload | ForbiddenRejection | InternalErrorRejection | SupportingDocumentCollectionNotFoundRejection | SupportingDocumentCollectionStatusDoesNotAllowUpdateRejection | SupportingDocumentNotFoundRejection | SupportingDocumentStatusDoesNotAllowUpdateRejection | ValidationRejection @@ -9962,12 +10210,6 @@ type User { """birth city""" birthCity: String - """ - `true` if Swan has verified the user's identity - @deprecated Use the equivalent identificationLevels.expert field instead - """ - idVerified: Boolean! @deprecated(reason: "Use the equivalent `identificationLevels.expert` field instead") - """the methods used to authenticate this user""" authenticators: [Authenticator!] @@ -10063,6 +10305,9 @@ type ValidationError { """Constraints that are not matched on the Onboarding property""" errors: [FieldValidationError!] + + """Human readable message explaining the errors""" + details: String } type ValidationFieldError { diff --git a/scripts/graphql/dist/partner-schema-config.json b/scripts/graphql/dist/partner-schema-config.json index 3c7fea29c..f02715a1b 100644 --- a/scripts/graphql/dist/partner-schema-config.json +++ b/scripts/graphql/dist/partner-schema-config.json @@ -192,6 +192,7 @@ "TransactionConnection", "TrustedBeneficiaryConnection", "UserConnection", + "VerificationRenewalsConnection", "VirtualIBANEntryConnection", "WebhookEventLogsConnection", "WebhookSubscriptionsConnection" @@ -225,6 +226,7 @@ "TransactionEdge", "TrustedBeneficiaryEdge", "UserEdge", + "VerificationRenewalsEdge", "VirtualIBANEntryEdge", "WebhookEventLogsEdge", "WebhookSubscriptionsEdge" @@ -381,6 +383,10 @@ "ExportFailedStatusInfo", "ExportRunningStatusInfo" ], + "ThreeDsStatusInfo": [ + "FailedThreeDs", + "SuccessfulThreeDs" + ], "FeeCreditor": [ "FeeInCreditor", "FeeOutCreditor" diff --git a/scripts/graphql/dist/partner-schema.gql b/scripts/graphql/dist/partner-schema.gql index 2d7021168..86a6b4678 100644 --- a/scripts/graphql/dist/partner-schema.gql +++ b/scripts/graphql/dist/partner-schema.gql @@ -1764,6 +1764,49 @@ type AddExternalAccountSuccessPayload { externalAccount: ExternalAccount! } +input AddExternalIdentificationIdentityDocumentInput { + type: IdentityDocumentType! + number: String + mrz: String + issueDate: String + expiryDate: String + issuingCountry: CCA3 + firstName: String! + allFirstNames: [String!]! + lastName: String! + birthLastName: String + gender: Gender! + birthDate: String! + birthCity: String + birthCountry: CCA3 + nationality: CCA3! +} + +input AddExternalIdentificationInput { + userId: String! + externalId: String! + identityDocument: AddExternalIdentificationIdentityDocumentInput! +} + +union AddExternalIdentificationPayload = AddExternalIdentificationSuccessPayload | UserNotFoundRejection | ValidationRejection | ForbiddenRejection + +type AddExternalIdentificationSuccessPayload { + id: ID! + userId: String! + externalId: String! + + """ + Status could be `Valid` or `Invalid`. + `Invalid` status is caused by a mismatch between the user information given to `addExternalIdentification` mutation + and user information given during the onboarding by the user him-self + """ + status: SwanIdentificationStatus! + identityDocumentId: ID + facePhotoDocumentId: ID + createdAt: DateTime! + updatedAt: DateTime! +} + """Inputs to add a new request for funding limit settings change""" input AddFundingLimitSettingsChangeRequestInput { """Requested amount settings for the instant funding limit""" @@ -2185,6 +2228,27 @@ type AddTrustedInternationalBeneficiarySuccessPayload { trustedBeneficiary: TrustedInternationalBeneficiary! } +"""Input to add a SEPA trusted beneficiaries""" +input AddTrustedSepaBeneficiariesInput { + """List of SEPA trusted beneficiaries""" + sepaBeneficiaries: [TrustedSepaBeneficiaryInput!]! + + """Account ID of the account on which the beneficiaries will be created""" + accountId: ID! + + """When the consent flow is finished the user is redirected to this URL""" + consentRedirectUrl: String! +} + +"""Add sepa trusted beneficiaries payload""" +union AddTrustedSepaBeneficiariesPayload = AddTrustedSepaBeneficiariesSuccessPayload | AccountNotFoundRejection | ValidationRejection | ForbiddenRejection + +"""Add SEPA trusted beneficiaries success payload""" +type AddTrustedSepaBeneficiariesSuccessPayload { + """The created trusted sepa beneficiaries""" + trustedBeneficiaries: [TrustedSepaBeneficiary!]! +} + """Input to add a SEPA trusted beneficiary""" input AddTrustedSepaBeneficiaryInput { """Account ID of the account on which the beneficiary will be created""" @@ -3079,27 +3143,6 @@ type Card { """Unique identifier of a card""" id: ID! - """ - Digital Cards linked to this card - - Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) - """ - digitalCards( - """the number of elements to load (maximum: 100)""" - first: Int! = 50 - - """ - the index (a unique reference in string form) from which you will load the following elements - """ - after: String - - """an order you can apply to your list of connections""" - orderBy: DigitalCardOrderByInput - - """a filtering table you can apply to your list of connections""" - filters: DigitalCardFiltersInput - ): DigitalCardConnection! - """ List of transactions of a card. @@ -3189,6 +3232,18 @@ type Card { """Issuing Country""" issuingCountry: CCA3! + """Digital Cards linked to this card""" + digitalCards( + first: Int! = 50 + after: String + + """When the list of elements needs to be ordered""" + orderBy: DigitalCardOrderByInput + + """When the list of elements needs to be filtered""" + filters: DigitalCardFiltersInput + ): DigitalCardConnection! + """Periodic Spending""" spending: Spending } @@ -3394,32 +3449,40 @@ type CardEnabledStatusInfo implements CardStatusInfo { """Filters that can be applied when listing cards""" input CardFiltersInput { """ - The status of the card. + Filter by status - @deprecated(reason: "use `statuses` instead") + @deprecated(reason: "use filter `statuses` instead") """ status: CardStatus - """Statuses of the card.""" + """Filter by status""" statuses: [CardStatus!] """ - Type of card + Filter by type - @deprecated(reason: "use `types` instead") + @deprecated(reason: "use filter `types` instead") """ type: CardType - """Types of card""" + """Filter by type""" types: [CardType!] - """String searched""" + """ + Search string to look for + + Search will be performed in following fields: + - Embossed line + - Card masked number + - Name + - ID + """ search: String """ - Account identifier + Filter by accountId - This filter is only available for User Access Token, for the moment + Only available for User Access Token, for the moment """ accountId: String } @@ -3444,6 +3507,80 @@ type CardInMerchant { union CardMerchant = CardInMerchant | CardOutMerchant +type CardMerchantPayment { + """unique identifier of a merchant payment""" + id: ID! + + """status information""" + statusInfo: MerchantPaymentStatusInfo! + + """amount""" + amount: Amount! + + """unique identifier of the payment mandate associated to the payment""" + paymentMandateId: ID! @deprecated(reason: "Use paymentMandate.id instead") + + """payment link associated to the merchant payment""" + paymentMandate: PaymentMandate! + + """unique identifier of the payment link associated to the payment""" + paymentLinkId: ID @deprecated(reason: "Use paymentLink.id instead") + + """payment link associated to the merchant payment""" + paymentLink: MerchantPaymentLink + + """unique identifier of the merchant profile associated to the payment""" + merchantProfileId: ID! @deprecated(reason: "Use merchantProfile.id instead") + + """merchant profile associated to the merchant payment""" + merchantProfile: MerchantProfile! + + """unique identifier of the payment method associated to the payment""" + paymentMethodId: ID! @deprecated(reason: "Use paymentMethod.id instead") + + """payment method associated to the merchant payment""" + paymentMethod: MerchantPaymentMethod! + balance: MerchantBalance! + + """Label""" + label: String + reference: String + + """ + an arbitrary identifier that was defined by you when you created this payment + """ + externalReference: String + + """The billing address associated to the payment""" + billingAddress: Address + threeDS: ThreeDS @deprecated(reason: "Use threeDs instead") + threeDs: ThreeDS + + """Created date""" + createdAt: DateTime! + + """Updated date""" + updatedAt: DateTime! + + """Authorized date""" + authorizedAt: DateTime + + """Canceled date""" + canceledAt: DateTime + + """Captured date""" + capturedAt: DateTime + + """Rejected date""" + rejectedAt: DateTime + + """Refunded date""" + refundedAt: DateTime + + """Disputed date""" + disputedAt: DateTime +} + """COMING SOON""" type CardMerchantPaymentMethod implements MerchantPaymentMethod { """ @@ -4688,6 +4825,9 @@ enum ConsentPurpose { """when returning a transaction for international credit transfer""" ReturnTransactionForInternationalCreditTransfer + + """when initiating the creation of a credit limit.""" + RequestCreditLimit } """ @@ -5475,6 +5615,15 @@ enum DocumentReasonCode { """The signature is not handwritten or electronically certified""" HandwrittenOrCertifiedElectronicSignatureRequired + + """Document refused for compliance reasons""" + ComplianceReason + + """Bank name in articles of association document is invalid""" + InvalidDepositBankName + + """Missing the register extract of the company providing accommodation""" + MissingCompanyProviderRegisterExtract } """The type of the document""" @@ -5580,7 +5729,7 @@ input EnableReceivedDirectDebitMandateInput { } """Union type return by the enableReceivedDirectDebitMandate mutation""" -union EnableReceivedDirectDebitMandatePayload = EnableReceivedDirectDebitMandateSuccessPayload | ReceivedDirectDebitMandateNotFoundRejection | ReceivedDirectDebitMandateCanceledRejection | ForbiddenRejection +union EnableReceivedDirectDebitMandatePayload = EnableReceivedDirectDebitMandateSuccessPayload | ReceivedDirectDebitMandateNotFoundRejection | ReceivedDirectDebitMandateCanceledRejection | ForbiddenRejection | ValidationRejection """ Return type in case of a successful response of the enableReceivedDirectDebitMandate mutation @@ -6073,10 +6222,15 @@ type FacePhotoDocument { type: DocumentType! } -type FailedThreeDs { +type FailedThreeDs implements ThreeDsStatusInfo { status: ThreeDsStatus! - reason: String! - code: String! + reasonCode: FailedThreeDsReason! +} + +enum FailedThreeDsReason { + AuthenticationFailed + AuthenticationExpired + Other } type FailedTransactionStatementStatusInfo implements TransactionStatementStatusInfo { @@ -6461,7 +6615,14 @@ interface Field { } enum FieldValidationError { + """When the associated field's value is missing""" Missing + + """ + When the associated field's value is invalid + @comingSoon + """ + Invalid } input FinalizeOnboardingInput { @@ -6789,6 +6950,12 @@ type FundingSourceWrongStatusRejection implements Rejection { expectedStatus: FundingSourceStatus! } +enum Gender { + Male + Female + Unknown +} + """Inputs to generate an account""" input GenerateAccountStatementInput { """Unique identifier of an account""" @@ -9828,16 +9995,28 @@ type MerchantPayment { amount: Amount! """unique identifier of the payment mandate associated to the payment""" - paymentMandateId: ID! + paymentMandateId: ID! @deprecated(reason: "Use paymentMandate.id instead") + + """payment link associated to the merchant payment""" + paymentMandate: PaymentMandate! """unique identifier of the payment link associated to the payment""" - paymentLinkId: ID + paymentLinkId: ID @deprecated(reason: "Use paymentLink.id instead") + + """payment link associated to the merchant payment""" + paymentLink: MerchantPaymentLink """unique identifier of the merchant profile associated to the payment""" - merchantProfileId: ID! + merchantProfileId: ID! @deprecated(reason: "Use merchantProfile.id instead") + + """merchant profile associated to the merchant payment""" + merchantProfile: MerchantProfile! """unique identifier of the payment method associated to the payment""" - paymentMethodId: ID! + paymentMethodId: ID! @deprecated(reason: "Use paymentMethod.id instead") + + """payment method associated to the merchant payment""" + paymentMethod: MerchantPaymentMethod! balance: MerchantBalance! """Label""" @@ -9890,6 +10069,9 @@ type MerchantPaymentCaptured implements MerchantPaymentStatusInfo { status: MerchantPaymentStatus! } +""" +Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) +""" type MerchantPaymentConnection implements Connection { """Information about the current, the previous and the next page""" pageInfo: PageInfo! @@ -9901,6 +10083,7 @@ type MerchantPaymentConnection implements Connection { totalCount: Int! } +"""Implements the Relay Edge interface""" type MerchantPaymentEdge implements Edge { node: MerchantPayment! @@ -9908,23 +10091,36 @@ type MerchantPaymentEdge implements Edge { cursor: String! } +"""Filters that can be applied when listing merchant payments""" input MerchantPaymentFiltersInput { - """To filter on some Merchant Payment Link Status (all if empty)""" - status: [MerchantPaymentStatus!] + """Filter by amount (amount is greater than a given amount)""" + amountGreaterThan: AmountValue - """To filter on some Merchant Payment Method Type (all if empty)""" - paymentMethod: [MerchantPaymentMethodType!] + """Filter by amount (amount is less than a given amount)""" + amountSmallerThan: AmountValue - """To filter after a createdAt value""" + """Filter by createdAt (created after a given date)""" isAfterCreatedAt: DateTime - """To filter before a createdAt value""" + """Filter by createdAt (created before a given date)""" isBeforeCreatedAt: DateTime - """To filter on some text occurrences (words or ids)""" + """Filter by Method Type""" + paymentMethod: [MerchantPaymentMethodType!] + + """Filter by status""" + status: [MerchantPaymentStatus!] + + """ + Search string to look for + + Search will be performed in following fields: + - Label + - Reference + - External Reference + - Amount + """ search: String - amountSmallerThan: AmountValue - amountGreaterThan: AmountValue } """Merchant Payment status initiated""" @@ -10021,6 +10217,9 @@ type MerchantPaymentLink { createdAt: DateTime! } +""" +Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) +""" type MerchantPaymentLinkConnection implements Connection { """Information about the current, the previous and the next page""" pageInfo: PageInfo! @@ -10032,6 +10231,7 @@ type MerchantPaymentLinkConnection implements Connection { totalCount: Int! } +"""Implements the Relay Edge interface""" type MerchantPaymentLinkEdge implements Edge { node: MerchantPaymentLink! @@ -10039,36 +10239,44 @@ type MerchantPaymentLinkEdge implements Edge { cursor: String! } +"""Filters that can be applied when listing merchant payment links""" input MerchantPaymentLinkFiltersInput { - """To filter on some Merchant Payment Link Status (all if empty)""" - status: [MerchantPaymentLinkStatus!] + """Filter by amount (amount is greater than a given amount)""" + amountGreaterThan: AmountValue - """To filter after a createdAt value""" + """Filter by amount (amount is less than a given amount)""" + amountSmallerThan: AmountValue + + """Filter by createdAt (created after a given date)""" isAfterCreatedAt: DateTime - """To filter before a createdAt value""" + """Filter by createdAt (created before a given date)""" isBeforeCreatedAt: DateTime - """To filter on some text occurrences (words or ids)""" - search: String - - """ - To filter payment links having an amount smaller than the given criteria - """ - amountSmallerThan: AmountValue + """Filter by status""" + status: [MerchantPaymentLinkStatus!] """ - To filter payment links having an amount greater than the given criteria + Search string to look for + + Search will be performed in following fields: + - Label + - Reference + - Amount """ - amountGreaterThan: AmountValue + search: String } +""" +Field we can use when ordering that can be applied when listing merchant payment links +""" enum MerchantPaymentLinkOrderByFieldInput { createdAt label url } +"""Order that can be applied when listing merchant payment links""" input MerchantPaymentLinkOrderByInput { field: MerchantPaymentLinkOrderByFieldInput direction: OrderByDirection @@ -10167,6 +10375,9 @@ type MerchantPaymentMethodWrongStatusRejection implements Rejection { message: String! } +""" +Field we can use when ordering that can be applied when listing merchant payments +""" enum MerchantPaymentOrderByFieldInput { label createdAt @@ -10175,6 +10386,7 @@ enum MerchantPaymentOrderByFieldInput { amount } +"""Order that can be applied when listing merchant payments""" input MerchantPaymentOrderByInput { field: MerchantPaymentOrderByFieldInput direction: OrderByDirection @@ -10186,7 +10398,36 @@ type MerchantPaymentRejected implements MerchantPaymentStatusInfo { status: MerchantPaymentStatus! """rejected reason""" - reason: String! + reason: String! @deprecated(reason: "Use rejectedReasonCode instead") + + """rejected reason""" + rejectedReasonCode: MerchantPaymentRejectedReason! +} + +enum MerchantPaymentRejectedReason { + AmountInvalid + CardDetailsInvalid + CardExpired + InvalidPinAttemptsExceeded + RejectedByCardIssuer + SoftDecline3dsExpiration + SoftDecline3dsFailure + SoftDecline3dsNotSupported + SoftDecline3dsRequired + SoftDeclineCardAmountLimitsExceeded + SoftDeclineCardDetailsInvalid + SoftDeclineCardExpired + SoftDeclineCardNotActivated + SoftDeclineCardNotSupported + SoftDeclineCvcCheckFailed + SoftDeclineCvcInvalid + SoftDeclineInsufficientFunds + SoftDeclineRefundTimeLimitExceeded + SoftDeclineRejectedByCardIssuer + SoftDeclineSwanTechnicalErrorOccurred + SoftDeclineTransactionAmountIncorrect + SwanRefused + SwanTechnicalErrorOccurred } """Merchant Payment status""" @@ -10256,8 +10497,48 @@ type MerchantProfile { """updated date""" updatedAt: DateTime! - merchantPaymentLinks(first: Int! = 50, after: String, orderBy: MerchantPaymentLinkOrderByInput, filters: MerchantPaymentLinkFiltersInput): MerchantPaymentLinkConnection - merchantPayments(first: Int! = 50, after: String, orderBy: MerchantPaymentOrderByInput, filters: MerchantPaymentFiltersInput): MerchantPaymentConnection + + """ + Returns a list of merchant payment links + + Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) + """ + merchantPaymentLinks( + """the number of elements to load (maximum: 100)""" + first: Int! = 50 + + """ + the index (a unique reference in string form) from which you will load the following elements + """ + after: String + + """an order you can apply to your list of connections""" + orderBy: MerchantPaymentLinkOrderByInput + + """a filtering table you can apply to your list of connections""" + filters: MerchantPaymentLinkFiltersInput + ): MerchantPaymentLinkConnection + + """ + Returns a list of merchant payments + + Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) + """ + merchantPayments( + """the number of elements to load (maximum: 100)""" + first: Int! = 50 + + """ + the index (a unique reference in string form) from which you will load the following elements + """ + after: String + + """an order you can apply to your list of connections""" + orderBy: MerchantPaymentOrderByInput + + """a filtering table you can apply to your list of connections""" + filters: MerchantPaymentFiltersInput + ): MerchantPaymentConnection } type MerchantProfileConnection implements Connection { @@ -10577,6 +10858,7 @@ type Mutation { *The user must have an account membership for this account with the attribute `canManageAccountMembership=true`.* """ suspendAccountMembership(input: SuspendAccountMembershipInput!): SuspendAccountMembershipPayload! + updateAccountHolderRiskInfo(input: UpdateAccountHolderRiskInfoInput!): UpdateAccountHolderRiskInfoPayload! updateAccountHolder(input: UpdateAccountHolderInput!): UpdateAccountHolderPayload! """ @@ -10814,6 +11096,7 @@ type Mutation { """COMING SOON""" acceptConsent(input: AcceptConsentInput!): AcceptConsentPayload + addExternalIdentification(input: AddExternalIdentificationInput!): AddExternalIdentificationPayload! """COMING SOON : Complete User Creation""" completeUserCreation(input: CompleteUserCreationInput!): CompleteUserCreationPayload! @@ -10957,6 +11240,13 @@ type Mutation { """ addTrustedInternationalBeneficiary(input: AddTrustedInternationalBeneficiaryInput!): AddTrustedInternationalBeneficiaryPayload + """ + Add a list of trusted SEPA beneficiaries to an account + + This mutation is restricted to an User access token ([Learn More](https://docs.swan.io/api/authentication)) and ask the user to consent to this request. + """ + addTrustedSepaBeneficiaries(input: AddTrustedSepaBeneficiariesInput!): AddTrustedSepaBeneficiariesPayload + """ Add a trusted SEPA beneficiary to an account @@ -12497,7 +12787,7 @@ type PhysicalCardCustomOptions { """Additional line embossed on the card.""" additionalPrintedLine: String - """Custom Card Holder Name""" + """Custom cardholder name""" customCardHolderName: String } @@ -12783,15 +13073,15 @@ type ProjectCardSettings { """Unique identifier of a project""" id: ID! - """Project name""" - name: String - """Visual Id from the issuing card processor (Monext)""" issuingProcessorVisualId: String """Specific card product for companies""" specificCardProductCodeForCompanies: String + """Project name""" + name: String + """Project's card settings""" cardSettings: [CardSettings!]! @@ -12843,17 +13133,17 @@ type ProjectFundingLimitExceededRejection implements Rejection { """Public information of a `Project`""" type ProjectInfo { + """Unique identifier of the project""" + id: ID! + B2BMembershipIDVerification: Boolean + supportingDocumentSettings: SupportingDocumentSettings + """The card products associated with this project.""" cardProducts: [CardProduct!] """the currently active card settings""" activeCardSettings: CardSettings @deprecated(reason: "Use cardProduct.cardDesigns instead") - """Unique identifier of the project""" - id: ID! - B2BMembershipIDVerification: Boolean - supportingDocumentSettings: SupportingDocumentSettings - """ Your project name displayed in white label interfaces and in the terms and conditions """ @@ -16040,7 +16330,7 @@ type SubscriptionLimitsRejection implements Rejection { subscriptionLimits: [EventTypeHavingReachedSubscriptionLimits]! } -type SuccessfulThreeDs { +type SuccessfulThreeDs implements ThreeDsStatusInfo { status: ThreeDsStatus! } @@ -16105,6 +16395,9 @@ type SupportingDocumentCollection { supportingDocumentCollectionUrl: String! type: SupportingDocumentCollectionType! transaction: SupportingDocumentTransaction! + + """Verification renewal id""" + verificationRenewalId: String relatedInfo: SupportingDocumentCollectionRelatedInfo! } @@ -16270,6 +16563,7 @@ type SupportingDocumentCollectionStatusNotAllowedRejection implements Rejection """Transaction supporting document collection: related to a transaction""" type SupportingDocumentCollectionTransactionRelatedInfo implements SupportingDocumentCollectionRelatedInfo { type: SupportingDocumentCollectionType! + transactionId: String! } enum SupportingDocumentCollectionType { @@ -16856,7 +17150,7 @@ input SuspendReceivedDirectDebitMandateInput { } """Union type returned by the suspendReceivedDirectDebitMandate mutation""" -union SuspendReceivedDirectDebitMandatePayload = SuspendReceivedDirectDebitMandateSuccessPayload | SuspendReceivedDirectDebitMandatedRejection | ReceivedDirectDebitMandateNotFoundRejection | ReceivedDirectDebitMandateCanceledRejection | ForbiddenRejection +union SuspendReceivedDirectDebitMandatePayload = SuspendReceivedDirectDebitMandateSuccessPayload | SuspendReceivedDirectDebitMandatedRejection | ReceivedDirectDebitMandateNotFoundRejection | ReceivedDirectDebitMandateCanceledRejection | ForbiddenRejection | ValidationRejection """ Return type in case of a successful response of the suspendReceivedDirectDebitMandate mutation @@ -17922,6 +18216,22 @@ type TrustedSepaBeneficiary implements TrustedBeneficiary { address: Address } +input TrustedSepaBeneficiaryInput { + """IBAN of the SEPA trusted beneficiary""" + iban: IBAN! + + """Name of the SEPA trusted beneficiary""" + name: String! + + """ + Label of the SEPA trusted beneficiary. If not provided, the name will be used. + """ + label: String + + """Beneficiary address""" + address: AddressInput +} + """Quality of the account holder doing the onboarding""" enum TypeOfRepresentation { """The account holder is the legal representative""" @@ -18146,6 +18456,22 @@ input UpdateAccountHolderInput { union UpdateAccountHolderPayload = UpdateAccountHolderSuccessPayload | AccountHolderNotFoundRejection | ValidationRejection +input UpdateAccountHolderRiskInfoInput { + accountHolderId: ID! + hasAdverseMedia: Boolean! + hasFrozenAssets: Boolean! + isPoliticallyExposed: Boolean! +} + +union UpdateAccountHolderRiskInfoPayload = UpdateAccountHolderRiskInfoSuccessPayload | ForbiddenRejection | AccountHolderNotFoundRejection | ValidationRejection + +type UpdateAccountHolderRiskInfoSuccessPayload { + accountHolderId: ID! + hasAdverseMedia: Boolean! + hasFrozenAssets: Boolean! + isPoliticallyExposed: Boolean! +} + type UpdateAccountHolderSuccessPayload { accountHolder: AccountHolder! } @@ -18495,7 +18821,7 @@ input UpdateReceivedSepaDirectDebitB2bMandateInput { """ Union type returned by the updateReceivedSepaDirectDebitB2bMandate mutation """ -union UpdateReceivedSepaDirectDebitB2bMandatePayload = UpdateReceivedSepaDirectDebitB2bMandateSuccessPayload | ReceivedDirectDebitMandateNotFoundRejection | ForbiddenRejection | ReceivedDirectDebitMandateAlreadyExistRejection | ReceivedDirectDebitMandateNotB2bRejection | AccountNotFoundRejection +union UpdateReceivedSepaDirectDebitB2bMandatePayload = UpdateReceivedSepaDirectDebitB2bMandateSuccessPayload | ReceivedDirectDebitMandateNotFoundRejection | ForbiddenRejection | ReceivedDirectDebitMandateAlreadyExistRejection | ReceivedDirectDebitMandateNotB2bRejection | AccountNotFoundRejection | ValidationRejection """ Return type in case of a successful response of the updateReceivedSepaDirectDebitB2bMandate mutation @@ -18641,12 +18967,6 @@ type User { """birth city""" birthCity: String - """ - `true` if Swan has verified the user's identity - @deprecated Use the equivalent identificationLevels.expert field instead - """ - idVerified: Boolean! @deprecated(reason: "Use the equivalent `identificationLevels.expert` field instead") - """the methods used to authenticate this user""" authenticators: [Authenticator!] @@ -18828,7 +19148,7 @@ type UserNotAllowedToSuspendItsOwnAccountMembershipRejection implements Rejectio message: String! } -"""Rejection returned when the User is not the Card Holder""" +"""Rejection returned when the User is not the cardholder""" type UserNotCardHolderRejection implements Rejection { message: String! } @@ -18877,6 +19197,9 @@ type ValidationError { """Constraints that are not matched on the Onboarding property""" errors: [FieldValidationError!] + + """Human readable message explaining the errors""" + details: String } type ValidationFieldError { @@ -18938,8 +19261,92 @@ enum VerificationFlow { Progressive } -type VerificationRenewal { - verificationRenewalId: ID +"""Verification Renewals""" +type VerificationRenewals { + """Unique identifier of a funding limit settings change request""" + id: ID! + + """Created date""" + createdAt: DateTime! + + """Updated date""" + updatedAt: DateTime! + + """Completed date""" + completedAt: DateTime + + """Refused date""" + refusedAt: DateTime +} + +""" +Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) +""" +type VerificationRenewalsConnection implements Connection { + """Total number of element in the list""" + totalCount: Int! + + """Information about the current, the previous and the next page""" + pageInfo: PageInfo! + + """FundingLimitSettingsChangeRequestEdge list""" + edges: [VerificationRenewalsEdge!]! +} + +"""Implements the Relay Edge interface""" +type VerificationRenewalsEdge implements Edge { + """ + Opaque identifier pointing to this onboarding node in the pagination mechanism + """ + cursor: String! + + """The FundingLimitSettingsChangeRequest""" + node: VerificationRenewals! +} + +""" +Filters that can be applied when listing funding limit settings change requests +""" +input VerificationRenewalsFiltersInput { + """Filter by IDs""" + id: [String!] +} + +""" +Field we can use when ordering that can be applied when listing funding limit settings change requests +""" +enum VerificationRenewalsOrderByFieldInput { + id + createdAt + updatedAt +} + +""" +Order that can be applied when listing funding limit settings change requests +""" +input VerificationRenewalsOrderByInput { + field: VerificationRenewalsOrderByFieldInput + direction: OrderByDirection +} + +enum VerificationRenewalVerificationRequirements { + """Account Holder Details Required""" + AccountHolderDetailsRequired + + """Swan is requesting some tax identifier""" + TaxIdRequired + + """Swan is requesting some clarification on the UBO""" + UboDetailsRequired + + """Legal Representative Details Required""" + LegalRepresentativeDetailsRequired + + """Swan is requesting some Supporting Documents""" + SupportingDocumentsRequired + + """Swan is requesting more information on the account holders""" + Other } """ diff --git a/scripts/graphql/dist/unauthenticated-schema-config.json b/scripts/graphql/dist/unauthenticated-schema-config.json index fa6ea9d65..803006ee5 100644 --- a/scripts/graphql/dist/unauthenticated-schema-config.json +++ b/scripts/graphql/dist/unauthenticated-schema-config.json @@ -17,9 +17,9 @@ "MerchantPaymentConnection", "MerchantPaymentLinkConnection", "OnboardingConnection", - "PaymentMandateConnection", "SupportingDocumentCollectionConnection", "UserConnection", + "VerificationRenewalsConnection", "VirtualIBANEntryConnection" ], "Edge": [ @@ -33,9 +33,9 @@ "MerchantPaymentEdge", "MerchantPaymentLinkEdge", "OnboardingEdge", - "PaymentMandateEdge", "SupportingDocumentCollectionEdge", "UserEdge", + "VerificationRenewalsEdge", "VirtualIBANEntryEdge" ], "AccountHolderStatusInfo": [ @@ -199,6 +199,10 @@ "RejectedMerchantProfileStatusInfo", "SuspendedMerchantProfileStatusInfo" ], + "ThreeDsStatusInfo": [ + "FailedThreeDs", + "SuccessfulThreeDs" + ], "FundingLimitSettingsChangeRequestStatusInfo": [ "FundingLimitSettingsChangeRequestApprovedStatusInfo", "FundingLimitSettingsChangeRequestPendingStatusInfo", @@ -235,12 +239,6 @@ "PaymentInitiated", "PaymentRejected" ], - "PaymentMandateStatusInfo": [ - "PaymentMandateCanceledStatusInfo", - "PaymentMandateConsentPendingStatusInfo", - "PaymentMandateEnabledStatusInfo", - "PaymentMandateRejectedStatusInfo" - ], "PhysicalCardStatusInfo": [ "PhysicalCardActivatedStatusInfo", "PhysicalCardCanceledStatusInfo", diff --git a/scripts/graphql/dist/unauthenticated-schema.gql b/scripts/graphql/dist/unauthenticated-schema.gql index 41070582f..f12d5bb4d 100644 --- a/scripts/graphql/dist/unauthenticated-schema.gql +++ b/scripts/graphql/dist/unauthenticated-schema.gql @@ -1333,27 +1333,6 @@ type Card { """Unique identifier of a card""" id: ID! - """ - Digital Cards linked to this card - - Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) - """ - digitalCards( - """the number of elements to load (maximum: 100)""" - first: Int! = 50 - - """ - the index (a unique reference in string form) from which you will load the following elements - """ - after: String - - """an order you can apply to your list of connections""" - orderBy: DigitalCardOrderByInput - - """a filtering table you can apply to your list of connections""" - filters: DigitalCardFiltersInput - ): DigitalCardConnection! - """Type of a card""" type: CardType! @@ -1419,6 +1398,18 @@ type Card { """Issuing Country""" issuingCountry: CCA3! + + """Digital Cards linked to this card""" + digitalCards( + first: Int! = 50 + after: String + + """When the list of elements needs to be ordered""" + orderBy: DigitalCardOrderByInput + + """When the list of elements needs to be filtered""" + filters: DigitalCardFiltersInput + ): DigitalCardConnection! } """Card Canceled Status Information""" @@ -1538,32 +1529,40 @@ type CardEnabledStatusInfo implements CardStatusInfo { """Filters that can be applied when listing cards""" input CardFiltersInput { """ - The status of the card. + Filter by status - @deprecated(reason: "use `statuses` instead") + @deprecated(reason: "use filter `statuses` instead") """ status: CardStatus - """Statuses of the card.""" + """Filter by status""" statuses: [CardStatus!] """ - Type of card + Filter by type - @deprecated(reason: "use `types` instead") + @deprecated(reason: "use filter `types` instead") """ type: CardType - """Types of card""" + """Filter by type""" types: [CardType!] - """String searched""" + """ + Search string to look for + + Search will be performed in following fields: + - Embossed line + - Card masked number + - Name + - ID + """ search: String """ - Account identifier + Filter by accountId - This filter is only available for User Access Token, for the moment + Only available for User Access Token, for the moment """ accountId: String } @@ -1604,6 +1603,80 @@ input CardInfosInput { requestId: String } +type CardMerchantPayment { + """unique identifier of a merchant payment""" + id: ID! + + """status information""" + statusInfo: MerchantPaymentStatusInfo! + + """amount""" + amount: Amount! + + """unique identifier of the payment mandate associated to the payment""" + paymentMandateId: ID! @deprecated(reason: "Use paymentMandate.id instead") + + """payment link associated to the merchant payment""" + paymentMandate: PaymentMandate! + + """unique identifier of the payment link associated to the payment""" + paymentLinkId: ID @deprecated(reason: "Use paymentLink.id instead") + + """payment link associated to the merchant payment""" + paymentLink: MerchantPaymentLink + + """unique identifier of the merchant profile associated to the payment""" + merchantProfileId: ID! @deprecated(reason: "Use merchantProfile.id instead") + + """merchant profile associated to the merchant payment""" + merchantProfile: MerchantProfile! + + """unique identifier of the payment method associated to the payment""" + paymentMethodId: ID! @deprecated(reason: "Use paymentMethod.id instead") + + """payment method associated to the merchant payment""" + paymentMethod: MerchantPaymentMethod! + balance: MerchantBalance! + + """Label""" + label: String + reference: String + + """ + an arbitrary identifier that was defined by you when you created this payment + """ + externalReference: String + + """The billing address associated to the payment""" + billingAddress: Address + threeDS: ThreeDS @deprecated(reason: "Use threeDs instead") + threeDs: ThreeDS + + """Created date""" + createdAt: DateTime! + + """Updated date""" + updatedAt: DateTime! + + """Authorized date""" + authorizedAt: DateTime + + """Canceled date""" + canceledAt: DateTime + + """Captured date""" + capturedAt: DateTime + + """Rejected date""" + rejectedAt: DateTime + + """Refunded date""" + refundedAt: DateTime + + """Disputed date""" + disputedAt: DateTime +} + """COMING SOON""" type CardMerchantPaymentMethod implements MerchantPaymentMethod { """ @@ -2370,6 +2443,9 @@ enum ConsentPurpose { """when returning a transaction for international credit transfer""" ReturnTransactionForInternationalCreditTransfer + + """when initiating the creation of a credit limit.""" + RequestCreditLimit } """Status of a consent""" @@ -2732,14 +2808,26 @@ type ExternalAccountAlreadyExistsRejection implements Rejection { message: String! } -type FailedThreeDs { +type FailedThreeDs implements ThreeDsStatusInfo { status: ThreeDsStatus! - reason: String! - code: String! + reasonCode: FailedThreeDsReason! +} + +enum FailedThreeDsReason { + AuthenticationFailed + AuthenticationExpired + Other } enum FieldValidationError { + """When the associated field's value is missing""" Missing + + """ + When the associated field's value is invalid + @comingSoon + """ + Invalid } type ForbiddenRejection implements Rejection { @@ -3143,6 +3231,17 @@ type IndividualUltimateBeneficialOwnerTypeOther implements IndividualUltimateBen type: IndividualUltimateBeneficialOwnerTypeEnum! } +enum InitiateMerchantCardPaymentFromPaymentLinkCardScheme { + """Visa Scheme""" + Visa + + """Mastercard Scheme""" + Mastercard + + """Cartes Bancaires Scheme""" + CartesBancaires +} + """InternalDirectDebitB2BMerchantPaymentMethod""" type InternalDirectDebitB2BMerchantPaymentMethod implements MerchantPaymentMethod { """ @@ -3364,16 +3463,28 @@ type MerchantPayment { amount: Amount! """unique identifier of the payment mandate associated to the payment""" - paymentMandateId: ID! + paymentMandateId: ID! @deprecated(reason: "Use paymentMandate.id instead") + + """payment link associated to the merchant payment""" + paymentMandate: PaymentMandate! """unique identifier of the payment link associated to the payment""" - paymentLinkId: ID + paymentLinkId: ID @deprecated(reason: "Use paymentLink.id instead") + + """payment link associated to the merchant payment""" + paymentLink: MerchantPaymentLink """unique identifier of the merchant profile associated to the payment""" - merchantProfileId: ID! + merchantProfileId: ID! @deprecated(reason: "Use merchantProfile.id instead") + + """merchant profile associated to the merchant payment""" + merchantProfile: MerchantProfile! """unique identifier of the payment method associated to the payment""" - paymentMethodId: ID! + paymentMethodId: ID! @deprecated(reason: "Use paymentMethod.id instead") + + """payment method associated to the merchant payment""" + paymentMethod: MerchantPaymentMethod! balance: MerchantBalance! """Label""" @@ -3426,6 +3537,9 @@ type MerchantPaymentCaptured implements MerchantPaymentStatusInfo { status: MerchantPaymentStatus! } +""" +Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) +""" type MerchantPaymentConnection implements Connection { """Information about the current, the previous and the next page""" pageInfo: PageInfo! @@ -3437,6 +3551,7 @@ type MerchantPaymentConnection implements Connection { totalCount: Int! } +"""Implements the Relay Edge interface""" type MerchantPaymentEdge implements Edge { node: MerchantPayment! @@ -3444,23 +3559,36 @@ type MerchantPaymentEdge implements Edge { cursor: String! } +"""Filters that can be applied when listing merchant payments""" input MerchantPaymentFiltersInput { - """To filter on some Merchant Payment Link Status (all if empty)""" - status: [MerchantPaymentStatus!] + """Filter by amount (amount is greater than a given amount)""" + amountGreaterThan: AmountValue - """To filter on some Merchant Payment Method Type (all if empty)""" - paymentMethod: [MerchantPaymentMethodType!] + """Filter by amount (amount is less than a given amount)""" + amountSmallerThan: AmountValue - """To filter after a createdAt value""" + """Filter by createdAt (created after a given date)""" isAfterCreatedAt: DateTime - """To filter before a createdAt value""" + """Filter by createdAt (created before a given date)""" isBeforeCreatedAt: DateTime - """To filter on some text occurrences (words or ids)""" + """Filter by Method Type""" + paymentMethod: [MerchantPaymentMethodType!] + + """Filter by status""" + status: [MerchantPaymentStatus!] + + """ + Search string to look for + + Search will be performed in following fields: + - Label + - Reference + - External Reference + - Amount + """ search: String - amountSmallerThan: AmountValue - amountGreaterThan: AmountValue } """Merchant Payment status initiated""" @@ -3557,6 +3685,9 @@ type MerchantPaymentLink { createdAt: DateTime! } +""" +Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) +""" type MerchantPaymentLinkConnection implements Connection { """Information about the current, the previous and the next page""" pageInfo: PageInfo! @@ -3568,6 +3699,7 @@ type MerchantPaymentLinkConnection implements Connection { totalCount: Int! } +"""Implements the Relay Edge interface""" type MerchantPaymentLinkEdge implements Edge { node: MerchantPaymentLink! @@ -3575,36 +3707,44 @@ type MerchantPaymentLinkEdge implements Edge { cursor: String! } +"""Filters that can be applied when listing merchant payment links""" input MerchantPaymentLinkFiltersInput { - """To filter on some Merchant Payment Link Status (all if empty)""" - status: [MerchantPaymentLinkStatus!] + """Filter by amount (amount is greater than a given amount)""" + amountGreaterThan: AmountValue + + """Filter by amount (amount is less than a given amount)""" + amountSmallerThan: AmountValue - """To filter after a createdAt value""" + """Filter by createdAt (created after a given date)""" isAfterCreatedAt: DateTime - """To filter before a createdAt value""" + """Filter by createdAt (created before a given date)""" isBeforeCreatedAt: DateTime - """To filter on some text occurrences (words or ids)""" - search: String - - """ - To filter payment links having an amount smaller than the given criteria - """ - amountSmallerThan: AmountValue + """Filter by status""" + status: [MerchantPaymentLinkStatus!] """ - To filter payment links having an amount greater than the given criteria + Search string to look for + + Search will be performed in following fields: + - Label + - Reference + - Amount """ - amountGreaterThan: AmountValue + search: String } +""" +Field we can use when ordering that can be applied when listing merchant payment links +""" enum MerchantPaymentLinkOrderByFieldInput { createdAt label url } +"""Order that can be applied when listing merchant payment links""" input MerchantPaymentLinkOrderByInput { field: MerchantPaymentLinkOrderByFieldInput direction: OrderByDirection @@ -3699,6 +3839,9 @@ type MerchantPaymentMethodWrongStatusRejection implements Rejection { message: String! } +""" +Field we can use when ordering that can be applied when listing merchant payments +""" enum MerchantPaymentOrderByFieldInput { label createdAt @@ -3707,6 +3850,7 @@ enum MerchantPaymentOrderByFieldInput { amount } +"""Order that can be applied when listing merchant payments""" input MerchantPaymentOrderByInput { field: MerchantPaymentOrderByFieldInput direction: OrderByDirection @@ -3718,7 +3862,36 @@ type MerchantPaymentRejected implements MerchantPaymentStatusInfo { status: MerchantPaymentStatus! """rejected reason""" - reason: String! + reason: String! @deprecated(reason: "Use rejectedReasonCode instead") + + """rejected reason""" + rejectedReasonCode: MerchantPaymentRejectedReason! +} + +enum MerchantPaymentRejectedReason { + AmountInvalid + CardDetailsInvalid + CardExpired + InvalidPinAttemptsExceeded + RejectedByCardIssuer + SoftDecline3dsExpiration + SoftDecline3dsFailure + SoftDecline3dsNotSupported + SoftDecline3dsRequired + SoftDeclineCardAmountLimitsExceeded + SoftDeclineCardDetailsInvalid + SoftDeclineCardExpired + SoftDeclineCardNotActivated + SoftDeclineCardNotSupported + SoftDeclineCvcCheckFailed + SoftDeclineCvcInvalid + SoftDeclineInsufficientFunds + SoftDeclineRefundTimeLimitExceeded + SoftDeclineRejectedByCardIssuer + SoftDeclineSwanTechnicalErrorOccurred + SoftDeclineTransactionAmountIncorrect + SwanRefused + SwanTechnicalErrorOccurred } """Merchant Payment status""" @@ -3788,8 +3961,48 @@ type MerchantProfile { """updated date""" updatedAt: DateTime! - merchantPaymentLinks(first: Int! = 50, after: String, orderBy: MerchantPaymentLinkOrderByInput, filters: MerchantPaymentLinkFiltersInput): MerchantPaymentLinkConnection - merchantPayments(first: Int! = 50, after: String, orderBy: MerchantPaymentOrderByInput, filters: MerchantPaymentFiltersInput): MerchantPaymentConnection + + """ + Returns a list of merchant payment links + + Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) + """ + merchantPaymentLinks( + """the number of elements to load (maximum: 100)""" + first: Int! = 50 + + """ + the index (a unique reference in string form) from which you will load the following elements + """ + after: String + + """an order you can apply to your list of connections""" + orderBy: MerchantPaymentLinkOrderByInput + + """a filtering table you can apply to your list of connections""" + filters: MerchantPaymentLinkFiltersInput + ): MerchantPaymentLinkConnection + + """ + Returns a list of merchant payments + + Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) + """ + merchantPayments( + """the number of elements to load (maximum: 100)""" + first: Int! = 50 + + """ + the index (a unique reference in string form) from which you will load the following elements + """ + after: String + + """an order you can apply to your list of connections""" + orderBy: MerchantPaymentOrderByInput + + """a filtering table you can apply to your list of connections""" + filters: MerchantPaymentFiltersInput + ): MerchantPaymentConnection } type MerchantProfileNotValidRejection implements Rejection { @@ -4418,11 +4631,6 @@ type PaymentConsentPending implements PaymentStatusInfo { consent: Consent! } -interface PaymentDirectDebitMandate { - """Unique identifier of the Direct Debit Payment Mandate""" - id: ID! -} - """Payment status initiated""" type PaymentInitiated implements PaymentStatusInfo { """status of the payment""" @@ -4445,91 +4653,6 @@ interface PaymentMandate { id: ID! } -enum PaymentMandateCanceledReason { - """When the user requested to cancel the Payment Mandate""" - RequestedByUser - - """When the Payment Mandate is expired""" - MandateExpired -} - -"""Payment Mandate Canceled status information""" -type PaymentMandateCanceledStatusInfo implements PaymentMandateStatusInfo { - """ - Payment Mandate status (always Canceled for type PaymentMandateCanceledStatusInfo). - """ - status: PaymentMandateStatus! - - """Reason behind the Payment Mandate Canceled status""" - reason: PaymentMandateCanceledReason! -} - -""" -Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) -""" -type PaymentMandateConnection implements Connection { - """Total number of elements in the list""" - totalCount: Int! - - """Information about the current, the previous and the next page""" - pageInfo: PageInfo! - - """PaymentMandateEdge list""" - edges: [PaymentMandateEdge!]! -} - -"""Payment Mandate Consent Pending status information""" -type PaymentMandateConsentPendingStatusInfo implements PaymentMandateStatusInfo { - """ - Payment Mandate status (always Enabled for type PaymentMandateEnableedStatusInfo). - """ - status: PaymentMandateStatus! - - """Consent information required to enable the concerned Payment Mandate""" - consent: Consent! -} - -interface PaymentMandateCreditor { - """Creditor UUID""" - id: ID! - - """Creditor name""" - name: String! - - """Creditor address""" - address: Address! -} - -interface PaymentMandateDebtor { - """Debtor name""" - name: String! - - """Debtor e-mail""" - email: String - - """Debtor country""" - country: CCA3! -} - -"""Implements the Relay Edge interface""" -type PaymentMandateEdge implements Edge { - """ - Opaque identifier pointing to this onboarding node in the pagination mechanism - """ - cursor: String! - - """The payment mandate""" - node: PaymentMandate! -} - -"""Payment Mandate Enabled status information""" -type PaymentMandateEnabledStatusInfo implements PaymentMandateStatusInfo { - """ - Payment Mandate status (always Enabled for type PaymentMandateEnabledStatusInfo). - """ - status: PaymentMandateStatus! -} - """ Rejection returned when a payment mandate reference is already for a creditor """ @@ -4537,37 +4660,6 @@ type PaymentMandateReferenceAlreadyUsedRejection implements Rejection { message: String! } -"""Payment Mandate Rejected status information""" -type PaymentMandateRejectedStatusInfo implements PaymentMandateStatusInfo { - """ - Payment Mandate status (always Rejected for type PaymentMandateSuspendedStatusInfo). - """ - status: PaymentMandateStatus! -} - -enum PaymentMandateScheme { - """SEPA Direct Debit Core""" - SepaDirectDebitCore - - """SEPA Direct Debit B2B""" - SepaDirectDebitB2b - - """Internal Direct Debit Standard""" - InternalDirectDebitStandard - - """Internal Direct Debit B2B""" - InternalDirectDebitB2b - - """Card Visa""" - CardVisa - - """Card Mastercard""" - CardMastercard - - """Card Cartes Bancaires""" - CardCartesBancaires -} - """Payment Mandate Sequence""" enum PaymentMandateSequence { """The Payment Mandate can be used for recurrent collections""" @@ -4577,20 +4669,6 @@ enum PaymentMandateSequence { OneOff } -"""Payment Mandate status""" -enum PaymentMandateStatus { - ConsentPending - Enabled - Rejected - Canceled -} - -"""Payment Mandate status information""" -interface PaymentMandateStatusInfo { - """Status of the payment mandate.""" - status: PaymentMandateStatus! -} - """ Rejection returned when a payment method is not compatible for the requested mutation """ @@ -4784,7 +4862,7 @@ type PhysicalCardCustomOptions { """Additional line embossed on the card.""" additionalPrintedLine: String - """Custom Card Holder Name""" + """Custom cardholder name""" customCardHolderName: String } @@ -4971,15 +5049,15 @@ type ProjectCardSettings { """Unique identifier of a project""" id: ID! - """Project name""" - name: String - """Visual Id from the issuing card processor (Monext)""" issuingProcessorVisualId: String """Specific card product for companies""" specificCardProductCodeForCompanies: String + """Project name""" + name: String + """Project's card settings""" cardSettings: [CardSettings!]! @@ -5026,16 +5104,16 @@ type ProjectForbiddenRejection implements Rejection { """Public information of a `Project`""" type ProjectInfo { + """Unique identifier of the project""" + id: ID! + B2BMembershipIDVerification: Boolean + """The card products associated with this project.""" cardProducts: [CardProduct!] """the currently active card settings""" activeCardSettings: CardSettings @deprecated(reason: "Use cardProduct.cardDesigns instead") - """Unique identifier of the project""" - id: ID! - B2BMembershipIDVerification: Boolean - """ Your project name displayed in white label interfaces and in the terms and conditions """ @@ -5509,7 +5587,7 @@ enum SpendingLimitType { Partner } -type SuccessfulThreeDs { +type SuccessfulThreeDs implements ThreeDsStatusInfo { status: ThreeDsStatus! } @@ -5574,6 +5652,9 @@ type SupportingDocumentCollection { supportingDocumentCollectionUrl: String! type: SupportingDocumentCollectionType! transaction: SupportingDocumentTransaction! + + """Verification renewal id""" + verificationRenewalId: String } """Supporting document collection with Approved status""" @@ -6444,6 +6525,9 @@ input UnauthenticatedInitiateMerchantCardPaymentFromPaymentLinkInput { """Payment Link related to the Card Payment Mandate""" paymentLinkId: ID! + + """Preferred scheme to use for this Card Payment""" + preferredScheme: InitiateMerchantCardPaymentFromPaymentLinkCardScheme } union UnauthenticatedInitiateMerchantCardPaymentFromPaymentLinkPayload = UnauthenticatedInitiateMerchantCardPaymentFromPaymentLinkSuccessPayload | ForbiddenRejection | NotFoundRejection | InternalErrorRejection | ValidationRejection | MerchantCardPaymentDeclinedRejection @@ -6772,12 +6856,6 @@ type User { """birth city""" birthCity: String - """ - `true` if Swan has verified the user's identity - @deprecated Use the equivalent identificationLevels.expert field instead - """ - idVerified: Boolean! @deprecated(reason: "Use the equivalent `identificationLevels.expert` field instead") - """the methods used to authenticate this user""" authenticators: [Authenticator!] @@ -6850,7 +6928,7 @@ type UserNotAllowedToSuspendItsOwnAccountMembershipRejection implements Rejectio message: String! } -"""Rejection returned when the User is not the Card Holder""" +"""Rejection returned when the User is not the cardholder""" type UserNotCardHolderRejection implements Rejection { message: String! } @@ -6879,6 +6957,9 @@ type ValidationError { """Constraints that are not matched on the Onboarding property""" errors: [FieldValidationError!] + + """Human readable message explaining the errors""" + details: String } type ValidationFieldError { @@ -6914,8 +6995,92 @@ enum VerificationFlow { Progressive } -type VerificationRenewal { - verificationRenewalId: ID +"""Verification Renewals""" +type VerificationRenewals { + """Unique identifier of a funding limit settings change request""" + id: ID! + + """Created date""" + createdAt: DateTime! + + """Updated date""" + updatedAt: DateTime! + + """Completed date""" + completedAt: DateTime + + """Refused date""" + refusedAt: DateTime +} + +""" +Implements the Relay Connection interface, used to paginate list of element ([Learn More](https://docs.swan.io/api/pagination)) +""" +type VerificationRenewalsConnection implements Connection { + """Total number of element in the list""" + totalCount: Int! + + """Information about the current, the previous and the next page""" + pageInfo: PageInfo! + + """FundingLimitSettingsChangeRequestEdge list""" + edges: [VerificationRenewalsEdge!]! +} + +"""Implements the Relay Edge interface""" +type VerificationRenewalsEdge implements Edge { + """ + Opaque identifier pointing to this onboarding node in the pagination mechanism + """ + cursor: String! + + """The FundingLimitSettingsChangeRequest""" + node: VerificationRenewals! +} + +""" +Filters that can be applied when listing funding limit settings change requests +""" +input VerificationRenewalsFiltersInput { + """Filter by IDs""" + id: [String!] +} + +""" +Field we can use when ordering that can be applied when listing funding limit settings change requests +""" +enum VerificationRenewalsOrderByFieldInput { + id + createdAt + updatedAt +} + +""" +Order that can be applied when listing funding limit settings change requests +""" +input VerificationRenewalsOrderByInput { + field: VerificationRenewalsOrderByFieldInput + direction: OrderByDirection +} + +enum VerificationRenewalVerificationRequirements { + """Account Holder Details Required""" + AccountHolderDetailsRequired + + """Swan is requesting some tax identifier""" + TaxIdRequired + + """Swan is requesting some clarification on the UBO""" + UboDetailsRequired + + """Legal Representative Details Required""" + LegalRepresentativeDetailsRequired + + """Swan is requesting some Supporting Documents""" + SupportingDocumentsRequired + + """Swan is requesting more information on the account holders""" + Other } """