worldline
S'inscrire

Nous lancerons prochainement une phase pilote, limitée aux commerçants utilisant le e-Portal ou les webhooks pour le reporting transactionnel.

Introduction

La solution Batch est idéale pour traiter de grandes quantités de transactions ou des opérations de maintenance en une seule fois. Vous collectez les données de carte de vos clients ou utilisez des jetons existants pour soumettre des transactions à votre rythme.

  • Évolutivité optimisée pour soumettre de grandes quantités de transactions/opérations de maintenance
  • Sécurité accrue en incluant les données directement dans le corps de la requête
  • Validation de données robuste grâce à des vérifications anticipées

Directives d'optimisation du traitement

Comme ce produit est en mode pilote, des limitations s'appliquent.

Les soumissions Batch doivent respecter les limites de taille de l’API : une taille de requête maximale de 5 Mo, représentant jusqu’à 50 000 transactions.

Batch prend en charge deux méthodes de soumission des requêtes :

  • Requêtes compressées en GZIP. Après décompression, la taille totale ne doit pas dépasser 300 Mo.
  • Charge utile JSON en clair, avec une taille maximale de 5 Mo.

Pour optimiser votre implémentation de Batch, nous recommandons

  • Tester votre structure de charge utile pour déterminer les tailles de lot optimales.
  • Équilibrer la quantité de transactions avec les variations de propriétés pour plus d'efficacité.

Contactez-nous pour obtenir de l'aide sur cette tâche.

En cas de soumission de lot échouée, reportez-vous à notre réponse de plateforme lorsque vous envoyez des requêtes à notre endpoint SubmitBatch.

Pour commencer

Pour traiter des transactions sur notre plateforme avec cette solution, assurez-vous que

  • Vous avez un compte sur notre plateforme.
  • L'option Batch est activée pour votre abonnement de compte. Contactez-nous au besoin pour le confirmer.
  • Au moins un des moyens de paiement suivants est activé sur votre compte :

    Moyens de paiement par carte
    Bancontact

Un reporting détaillé pour les transactions Batch est disponible via le e-Portal ou les webhooks.


Utilisez-vous le Back Office ?
Vous pouvez vérifier l'état d'activation de la méthode de paiement via Configuration > Activation PM.

  • Vous avez configuré votre clé API et secret API dans votre compte.
  • Votre serveur peut traiter les requêtes serveur à serveur via notre API RESTful.

Tout est prêt ? Apprenez ensuite à utiliser notre solution Batch dans le chapitre suivant !

Comment ça marche

Avant de traiter des transactions en production, utilisez notre environnement de test. Familiarisez-vous avec notre solution sans frais ni engagement ! Une fois que vous êtes prêt à passer en direct, découvrez ici comment obtenir un compte de production ou contactez-nous !

Les connexions Server-to-server nécessitent que vos systèmes traitent les données de carte à un moment donné. Cette méthode entraîne un très grand nombre d'exigences PCI.

Cependant, vous pouvez réduire considérablement la portée de votre évaluation et le nombre d'exigences PCI : Remplacez le numéro de carte par un token via notre Hosted Tokenization Page. Cela vous permet d'externaliser complètement la gestion des données de carte à notre plateforme. Aucun de vos systèmes utilisant des tokens ne nécessitera d'évaluation.

Moyens d'intégration

Étant donné que ce produit est en mode pilote, nos SDK Server ne prennent pas encore en charge cette méthode d'intégration. Au lieu de cela, vous devez envoyer toutes les requêtes comme décrit dans le chapitre "Étapes d'intégration" directement aux points de terminaison API respectifs. Pour ce faire, vous devez suivre un processus d'authentification spécifique décrit dans le guide Authentification.

Formatage JSON

L'utilisation de Batch nécessite l'envoi d'un JSON contenant toutes les données nécessaires pour les opérations de transaction/maintenance. Le contenu du JSON diffère selon les cas d'utilisation individuels. Retrouvez la collection de tous les cas d'utilisation pris en charge dans le chapitre dédié.

Cependant, pour tout cas d'utilisation, la requête elle-même doit répondre aux exigences suivantes :

  • Notre point de terminaison SubmitBatch ne prend en charge que les données JSON dans le corps de la requête. Le corps de la requête contient un objet JSON avec le modèle correct comme valeur :
    {
       "header":{
          "operationType":"CreatePayment",
          "merchantBatchReference":"unique-batch-reference",
          "itemCount":1
       },
       "createPayments":[
          {
             "cardPaymentMethodSpecificInput":{
                "card":{
                   "cardNumber":"4150551403657424",
                   "cvv":"031",
                   "expiryDate":"1231",
                   "cardholderName":"John Doe"
                },
                "paymentProductId":130,
                "transactionChannel":"ECOMMERCE",
                "authorizationMode":"FINAL_AUTHORIZATION"
             },
             "order":{
                "amountOfMoney":{
                   "amount":5600,
                   "currencyCode":"EUR"
                },
                "references":{
                   "merchantReference":"merchant-reference"
                }
             }
          }
       ]
    }
  • Chaque opération de transaction/maintenance est un enregistrement formaté comme un objet JSON. Selon l'operationType, tous les enregistrements (objets JSON) sont placés dans un tableau dont le nom de champ est la forme plurielle en camelCase de operationType.
  • Exemples :
    CreatePayment -> createPayments
    CapturePayment -> capturePayments
    RefundPayment -> refundPayments

Lors de la soumission d'un lot, notre plateforme validera toujours le JSON. La validation couvre les vérifications pour :

  • Propriétés obligatoires manquantes.
  • Inadéquation des types de données pour toute propriété.
  • Erreurs de syntaxe et de formatage.

Étapes d'intégration

Notre solution Batch vous permet de traiter de grandes quantités de transactions en une seule fois. Vos clients fournissent leurs données de carte que vous stockez dans votre système. Au lieu de les soumettre en temps réel, vous pouvez choisir le moment du traitement des transactions à votre guise.

En conséquence, votre entreprise n'a pas besoin d'une boutique en ligne : Vous envoyez vos demandes de transaction collectivement à tout moment à notre plateforme. Ainsi, vous pouvez soit :

  • Stocker les informations d'identification des cartes de vos clients.
  • Utiliser des jetons existants pour les MITs.

Pour une soumission ultérieure dans des JSON de lots spécifiques.

Traiter les transactions de cette manière signifie que vous :

  • Traitez les transactions/opérations de maintenance de manière asynchrone : Vous définissez le moment réel de la soumission des données de transaction à notre plateforme.
  • Recevez un délai pour obtenir les résultats des transactions/opérations de maintenance. Cela dépend du "daily cut-off time" de votre acquéreur : Nous recevons les résultats réels des transactions par intervalles pour toutes les transactions soumises dans un cadre temporel précis.

Les chapitres suivants couvrent une vue d'ensemble à haut niveau d'un flux typique. Il décrit toutes les étapes que vous devez suivre pour le traitement des transactions Batch. Retrouvez une vue d'ensemble détaillée dans ce chapitre.

Contrairement à d'autres méthodes d'intégration, Batch utilise des points de terminaison API individuels pour les différentes étapes du flux de traitement par lots.

  1. Envoyer une requête SubmitBatch
  2. Envoyer une requête Process
  3. Obtenir le statut de traitement du lot

Envoyer une requête SubmitBatch

Vous envoyez une requête SubmitBatch à notre plateforme, contenant les données pertinentes dans le corps de la requête. Batch prend en charge deux catégories de cas d'utilisation : 

  1. Traitement de nouvelles transactions (en utilisant des données de carte ou des jetons).
  2. Réalisation d'opérations de maintenance sur des transactions existantes. 

En fonction du cas d'utilisation, la requête doit contenir des propriétés spécifiques. Trouvez différents exemples pour chacun des cas dans notre chapitre dédié.

URLs de points de terminaison en test / production

  • URL de point de terminaison TEST : https://payment.preprod.direct.worldline-solutions.com/{merchantId}/merchant-batches
  • URL de point de terminaison PRODUCTION : https://payment.direct.worldline-solutions.com/{merchantId}/merchant-batches

Remplacez "{merchantId}" par votre compte de test/production sur notre plateforme. En savoir plus sur le "merchantId" dans notre glossaire.

  • Cette première étape ne représente que le début du processus de transaction. Vous devez suivre toutes les étapes suivantes pour réellement traiter les transactions et/ou realiser des opérations de maintenance.
  • Ne mélangez pas les cas d'utilisation dans le corps de requête. Soumettez toujours une requête distincte par cas d'utilisation.
  • Sachez que certaines erreurs ou informations manquantes ou incorrectes pourraient ne pas être remarquées lorsque vous soumettez une requête. Après avoir traité la requête, notre plateforme la vérifiera à nouveau, et tout problème détecté alors pourrait entraîner l'échec de la transaction.

Notre plateforme envoie une réponse contenant des informations sur la requête :


{
    "merchantBatchReference": "unique-batch-reference",
    "totalCount": 0
}
Propriétés Description
merchantBatchReference La référence unique du marchand pour le lot. Assurez-vous d'envoyer une valeur pour chaque requête afin de la rendre identifiable parmi d'autres requêtes. Vous utiliserez cette référence dans les requêtes ultérieures pour les actions de suivi.
totalCount Nombre total d'enregistrements que vous avez soumis dans la requête Batch.


Envoyer une requête Process

Pour traiter réellement les transactions/opérations de maintenance à partir des données soumises précédemment dans un délai de 12 heures, vous devez en donner l'instruction à notre plateforme.

Sachez que vous devez traiter un lot précédemment soumis dans les 12 heures. Après cette période, notre plateforme supprimera le lot.

Envoyez une requête avec un corps vide à notre point de terminaison Process, en remplaçant {merchantBatchReference} par la valeur que vous avez définie dans la requête SubmitBatch précédente.

Skip code example Copy
final URI apiEndpoint = URI.create(""https://payment.preprod.direct.worldline-solutions.com"");

final Authenticator authenticator = new V1HmacAuthenticator(""YourAPIkey"", ""YourAPISecret"");
final MetadataProvider metadataProvider = new DefaultMetadataProvider(""OnlinePayments"");

final DefaultConnection defaultConnection = new DefaultConnection(5000, 10000, 3000);

ClientInterface client = Factory.createClient(apiEndpoint, defaultConnection, authenticator, metadataProvider);

// merchantBatchReference - reference of previously submitted batch
client.merchant("YourPSPID").merchantBatch().processBatch(merchantBatchReference); 

GetBatchStatusResponse getBatchStatusResponse = client
        .merchant("YourPSPID")
        .merchantBatch()
        .getBatchStatus(merchantBatchReference);

String status = getBatchStatusResponse.getStatus(); // The status will initially be "InProgress" and will change to "Processed" once the platform has finished processing the batch
Uri apiEndpoint = new Uri("https://payment.preprod.direct.worldline-solutions.com");                                                                                                                                             
                                                                                                                                                                                                                                 
IAuthenticator authenticator = new V1HmacAuthenticator(AuthorizationType.V1HMAC, "YourAPIkey", "YourAPISecret");                                                                                                                 
IMetadataProvider metadataProvider = new MetadataProvider("OnlinePayments");                                                                                                                                                     
IConnection connection = new DefaultConnection(TimeSpan.FromSeconds(10), 10);                                                                                                                                                    
                                                                                                                                                                                                                               
IClient client = Factory.CreateClient(apiEndpoint, connection, authenticator, metadataProvider);                                                                                                                                 
                                                                                                                                                                                                                               
// merchantBatchReference - reference of previously submitted batch                                                                                                                                                              
await client.WithNewMerchant("YourPSPID").MerchantBatch.ProcessBatch(merchantBatchReference);                                                                                                                                    
                                                                                                                                                                                                                                 
GetBatchStatusResponse getBatchStatusResponse = await client                                                                                                                                                                     
    .WithNewMerchant("YourPSPID")                                                                                                                                                                                                
    .MerchantBatch                                                                                                                                                                                                               
    .GetBatchStatus(merchantBatchReference);                                                                                                                                                                                     
                                                                                                                                                                                                                                   
string status = getBatchStatusResponse.Status; // The status will initially be "InProgress" and will change to "Processed" once the platform has finished processing the batch
const client = init({                                                                                                                                                                                                            
    host: 'payment.preprod.direct.worldline-solutions.com',                                                                                                                                                                      
    scheme: 'https',                                                                                                                                                                                                             
    apiKeyId: 'YourAPIkey',                                                                                                                                                                                                      
    secretApiKey: 'YourAPISecret',                                                                                                                                                                                               
    integrator: 'OnlinePayments'                                                                                                                                                                                                 
});                                                                                                                                                                                                                              
                                                                                                                                                                                                                                   
// merchantBatchReference - reference of previously submitted batch                                                                                                                                                              
await client.merchantBatch.processBatch('YourPSPID', merchantBatchReference);                                                                                                                                                    
                                                                                                                                                                                                                                  
const getBatchStatusResponse = await client.merchantBatch.getBatchStatus('YourPSPID', merchantBatchReference);                                                                                                                   
                                                                                                                                                                                                                                   
const status = (getBatchStatusResponse.body as GetBatchStatusResponse).status; // The status will initially be "InProgress" and will change to "Processed" once the platform has finished processing the batch
$communicatorConfiguration = new CommunicatorConfiguration(                                                                                                                                                                                         
    apiKeyId: 'YourAPIkey',                                                                                                                                                                                                      
    apiSecret: 'YourAPISecret',                                                                                                                                                                                                  
    apiEndpoint: 'https://payment.preprod.direct.worldline-solutions.com',                                                                                                                                                       
    integrator: 'OnlinePayments'                                                                                                                                                                                                 
);                                                                                                                                                                                                                               
                                                                                                                                                                                                                                   
$authenticator = new V1HmacAuthenticator($communicatorConfiguration);                                                                                                                                                                               
$communicator = new Communicator($communicatorConfiguration, $authenticator);                                                                                                                                                                       
$client = new Client($communicator);                                                                                                                                                                                             
                                                                                                                                                                                                                                   
// $merchantBatchReference - reference of previously submitted batch                                                                                                                                                             
$client->merchant('YourPSPID')->merchantBatch()->processBatch($merchantBatchReference);                                                                                                                                          
                                                                                                                                                                                                                                   
$getBatchStatusResponse = $client                                                                                                                                                                                                
    ->merchant('YourPSPID')                                                                                                                                                                                                      
    ->merchantBatch()                                                                                                                                                                                                            
    ->getBatchStatus($merchantBatchReference);                                                                                                                                                                                   
                                                                                                                                                                                                                                   
$status = $getBatchStatusResponse->getStatus(); // The status will initially be "InProgress" and will change to "Processed" once the platform has finished processing the batch
configuration = CommunicatorConfiguration(                                                                                                                                                                                       
    api_endpoint='https://payment.preprod.direct.worldline-solutions.com',                                                                                                                                                       
    api_key_id='YourAPIkey',                                                                                                                                                                                                     
    secret_api_key='YourAPISecret',                                                                                                                                                                                              
    integrator='OnlinePayments'                                                                                                                                                                                                  
)                                                                                                                                                                                                                                
                                                                                                                                                                                                                                   
client = Factory.create_client_from_configuration(configuration)                                                                                                                                                                 
                                                                                                                                                                                                                                   
# merchant_batch_reference - reference of previously submitted batch                                                                                                                                                             
client.merchant('YourPSPID').merchant_batch().process_batch(merchant_batch_reference)                                                                                                                                            
                                                                                                                                                                                                                                   
get_batch_status_response = client \                                                                                                                                                                                             
    .merchant('YourPSPID') \                                                                                                                                                                                                     
    .merchant_batch() \                                                                                                                                                                                                          
    .get_batch_status(merchant_batch_reference)                                                                                                                                                                                  
                                                                                                                                                                                                                                   
status = get_batch_status_response.status  # The status will initially be "InProgress" and will change to "Processed" once the platform has finished processing the batch
configuration = OnlinePayments::SDK::CommunicatorConfiguration.new(                                                                                                                                                              
    api_endpoint: 'https://payment.preprod.direct.worldline-solutions.com',                                                                                                                                                      
    api_key_id: 'YourAPIkey',                                                                                                                                                                                                    
    secret_api_key: 'YourAPISecret',                                                                                                                                                                                             
    integrator: 'OnlinePayments'                                                                                                                                                                                                 
)                                                                                                                                                                                                                                
                                                                                                                                                                                                                                   
client = OnlinePayments::SDK::Factory.create_client_from_configuration(configuration)                                                                                                                                            
                                                                                                                                                                                                                                   
# merchant_batch_reference - reference of previously submitted batch                                                                                                                                                             
client.merchant('YourPSPID').merchant_batch.process_batch(merchant_batch_reference)                                                                                                                                              
                                                                                                                                                                                                                                   
get_batch_status_response = client                                                                                                                                                                                               
    .merchant('YourPSPID')                                                                                                                                                                                                       
    .merchant_batch                                                                                                                                                                                                              
    .get_batch_status(merchant_batch_reference)                                                                                                                                                                                  
                                                                                                                                                                                                                                   
status = get_batch_status_response.status  # The status will initially be "InProgress" and will change to "Processed" once the platform has finished processing the batch

URLs des points de terminaison en test / production (Méthode : POST)

  • Test : https://payment.preprod.direct.worldline-solutions.com/{merchantId}/merchant-batches/{merchantBatchReference}/process
  • Production : https://payment.direct.worldline-solutions.com/{merchantId}/merchant-batches/{merchantBatchReference}/process

Si notre plateforme ne peut pas traiter la requête du lot pour une raison quelconque, la réponse de notre plateforme fournit des informations via ces propriétés :

Propriétés Description

errorId

L'identifiant unique de votre requête sur notre plateforme.

Si vous avez besoin de notre aide pour résoudre l'erreur liée à cette requête, veillez à l'inclure dans votre message lorsque vous nous contactez.

errors
    errorCode
    category
    httpStatusCode
    id
    message

errorCode : Code d'erreur à 8 chiffres.

category : Description lisible de la catégorie d'erreur globale.

httpStatusCode : Code d'erreur à 3 chiffres lié aux codes de statut HTTP standards.

id : Description lisible de la catégorie spécifique dans laquelle l'erreur se trouve.

message : Description lisible de la catégorie spécifique dans laquelle l'erreur se trouve, fournissant des informations détaillées si disponibles.

Pour un dépannage efficace, nous vous recommandons de reproduire l’erreur pour chaque enregistrement impacté en appelant l’endpoint API Batch correspondant à l’objet JSON concerné. En fonction de la valeur de operationType, il peut s’agir de n’importe quel endpoint de l’API Batch, par exemple :

createPayments: endpoint CreatePayment API
capturePayments: endpoint CapturePayment API
cancelPayments: endpoint CancelPayment API
refundPayments: endpoint RefundPayment API
subsequentPayments: endpoint SubsequentPayment API
createPayouts: endpoint CreatePayout API
createPaymentLinks: endpoint CreatePaymentLink API
.
.
.


Obtenir le statut de traitement du lot

Obtenez le statut du fichier de lot en envoyant une requête à notre point de terminaison Batches, en remplaçant {merchantBatchReference} par la valeur que vous avez envoyée lors de la soumission de la demande originale :

URLs des points de terminaison en test / production (Méthode : GET)

  • Test : https://payment.preprod.direct.worldline-solutions.com/{merchantId}/merchant-batches/{merchantBatchReference}
  • Prod : https://payment.direct.worldline-solutions.com/{merchantId}/merchant-batches/{merchantBatchReference}

La réponse de notre plateforme contient diverses propriétés, fournissant des informations sur le lot :

{
	"operationType": "CreatePayment",
	"merchantBatchReference": "unique-batch-reference",
	"itemCount": 1,
	"status":"Processed”
}
Propriétés Description

operationType

Le type d'opération pour le lot. Valeurs possibles :

  • CreatePayment : Pour les nouvelles transactions.
  • CancelPayment : Pour annuler les transactions autorisées. 
  • CapturePayment : Pour capturer les transactions autorisées.
  • RefundPayment : Pour rembourser les transactions capturées.
  • SubsequentPayment : Pour initier un paiement ultérieur basé sur l'ID de paiement initial.
  • CreatePayout : Pour transférer des fonds directement à vos clients via leur carte de crédit/de débit.
  • CreatePaymentLink : Pour créer un lien de paiement.

merchantBatchReference

L'identifiant unique du lot pour lequel vous avez envoyé la requête.

itemCount

Nombre total de transactions/opérations de maintenance pour ce lot.

status

Statut du lot soumis. Valeurs possibles : 

  • Submitted : Le lot a été soumis.
  • InProgress : Le lot est actuellement en cours de traitement par notre plateforme.
  • Processed : Tous les éléments contenus dans le lot ont été traités. Notez que ce statut concerne le lot et non les statuts des enregistrements individuels (transactions/opérations de maintenance). 

Obtenez le statut du fichier de lot en envoyant une requête à notre point de terminaison Batches, en remplaçant {merchantBatchReference} par la valeur que vous avez envoyée lors de la soumission de la demande originale :

URLs des points de terminaison en test / production (Méthode : GET)

  • Test : https://payment.preprod.direct.worldline-solutions.com/{merchantId}/merchant-batches/{merchantBatchReference}
  • Prod : https://payment.direct.worldline-solutions.com/{merchantId}/merchant-batches/{merchantBatchReference}

La réponse de notre plateforme contient diverses propriétés, fournissant des informations sur le lot :

{
	"operationType": "CreatePayment",
	"merchantBatchReference": "unique-batch-reference",
	"itemCount": 1,
	"status":"Processed”
}
Propriétés Description

operationType

Le type d'opération pour le lot. Valeurs possibles :

  • CreatePayment : Pour les nouvelles transactions.
  • CancelPayment : Pour annuler les transactions autorisées. 
  • CapturePayment : Pour capturer les transactions autorisées.
  • RefundPayment : Pour rembourser les transactions capturées.
  • SubsequentPayment : Pour initier un paiement ultérieur basé sur l'ID de paiement initial.
  • CreatePayout : Pour transférer des fonds directement à vos clients via leur carte de crédit/de débit.
  • CreatePaymentLink : Pour créer un lien de paiement.

merchantBatchReference

L'identifiant unique du lot pour lequel vous avez envoyé la requête.

itemCount

Nombre total de transactions/opérations de maintenance pour ce lot.

status

Statut du lot soumis. Valeurs possibles : 

  • Submitted : Le lot a été soumis.
  • InProgress : Le lot est actuellement en cours de traitement par notre plateforme.
  • Processed : Tous les éléments contenus dans le lot ont été traités. Notez que ce statut concerne le lot et non les statuts des enregistrements individuels (transactions/opérations de maintenance). 


Flux

Découvrez un flux de transaction complet impliquant chaque partie et les étapes (facultatives) dans cet aperçu :

  1. Votre client se rend sur votre page de paiement et saisit ses données de carte de paiement pour finaliser l'achat.
  2. Vous stockez les données de carte de paiement de vos clients dans votre système ou vous tokenisez les données de carte.
  3. Vous envoyez une requête SubmitBatch à notre plateforme.
    3'(facultatif). Nous effectuons un contrôle de prévention de la fraude.
  4. Notre plateforme effectue un contrôle de validation et envoie la réponse contenant une merchantBatchReference unique.
  5. Vous envoyez une requête ProcessBatch à notre plateforme pour traiter les transactions/opérations de maintenance du lot.
  6. Nous traitons les transactions et recevons le résultat de l'acquéreur.
  7. Vous envoyez une requête statut de traitement du lot à notre plateforme ou recevez le résultat via webhooks une fois que le lot a été traité.
  8. Si la transaction a été réussie, vous pouvez livrer les marchandises / services.

Cas d'utilisation

Batch est une solution polyvalente pour divers cas d'utilisation. Chaque cas d'utilisation vous oblige à ajouter un ensemble spécifique de propriétés obligatoires/facultatives à chaque enregistrement/objet JSON dans la requête.

Nous distinguons entre le traitement de :

Apprenez dans les chapitres suivants comment composer votre requête par lot pour ces différents cas d'utilisation. Assurez-vous de respecter les règles de formatage JSON.

Les données spécifiques à Batch seront supprimées après 540 jours; cependant, nous n'avons pas de contrôle sur les données transactionnelles.

Transactions

Batch vous permet de traiter de nouvelles transactions en tant que :

Transactions ponctuelles autonomes avec données de carte

Votre JSON doit contenir un tableau de createPayments où chaque élément du tableau représente une transaction :

Skip code example Copy
final URI apiEndpoint = URI.create("https://payment.preprod.direct.worldline-solutions.com");

        final Authenticator authenticator = new V1HmacAuthenticator("YourAPIkey", "YourAPISecret");
        final MetadataProvider metadataProvider = new DefaultMetadataProvider("OnlinePayments");

        final DefaultConnection defaultConnection = new DefaultConnection(5000, 10000, 3000);

        ClientInterface client = Factory.createClient(apiEndpoint, defaultConnection, authenticator, metadataProvider);

        CreatePaymentRequest payment = new CreatePaymentRequest()
            .withCardPaymentMethodSpecificInput(
                new CardPaymentMethodSpecificInput()
                    .withCard(new Card()
                        .withCardNumber("4330264936344675")
                        .withCvv("031")
                        .withExpiryDate("1231")
                        .withCardholderName("Jacqueline"))
                    .withPaymentProductId(1)
                    .withTransactionChannel("ECOMMERCE")
                    .withAuthorizationMode("FINAL_AUTHORIZATION"))
            .withOrder(new Order()
                .withAmountOfMoney(new AmountOfMoney().
                    withAmount(5600L).
                    withCurrencyCode("EUR"))
                .withReferences(new OrderReferences()
                    .withMerchantReference("merchant-reference")));

        List payments = new ArrayList<>();
        payments.add(payment);

        SubmitBatchRequestBody submitBatchRequestBody = new SubmitBatchRequestBody()
            .withHeader(new BatchMetadata()
                .withOperationType("CreatePayment")
                .withMerchantBatchReference("unique-batch-reference")
                .withItemCount(1))
            .withCreatePayments(payments);

        SubmitBatchResponse submitBatchResponse = client
            .merchant("YourPSPID")
            .merchantBatch()
            .submitBatch(submitBatchRequestBody);
Uri apiEndpoint = new("https://payment.preprod.direct.worldline-solutions.com/");

        IClient client = Factory.CreateClient(new CommunicatorConfiguration
        {
            ApiKeyId = "YourAPIkey",
            SecretApiKey = "YourAPISecret",
            Integrator = "YourCompanyName",
            ApiEndpoint = apiEndpoint,
        });

        SubmitBatchRequestBody request = new()
        {
            Header = new()
            {
                ItemCount = 1,
                OperationType = "CreatePayment",
                MerchantBatchReference = "unique-batch-reference"
            },
            CreatePayments = new List
            {
                new()
                {
                    CardPaymentMethodSpecificInput = new()
                    {
                        Card = new()
                        {
                            CardNumber = "4330264936344675",
                            Cvv = "031",
                            ExpiryDate = "1231",
                            CardholderName = "Jacqueline"
                        },
                        PaymentProductId = 1,
                        TransactionChannel = "ECOMMERCE",
                        AuthorizationMode = "FINAL_AUTHORIZATION"
                    },
                    Order = new()
                    {
                        AmountOfMoney = new()
                        {
                            Amount = 5600,
                            CurrencyCode = "EUR"
                        },
                        References = new()
                        {
                            MerchantReference = "merchant-reference"
                        }
                    }
                }
            }
        };

        SubmitBatchResponse response = await client
            .WithNewMerchant("YourPSPID")
            .MerchantBatch
            .SubmitBatch(request);
const client = directSdk.init({
  host: 'payment.preprod.direct.worldline-solutions.com',
  apiKeyId: 'YourAPIkey',
  secretApiKey: 'YourAPISecret',
  integrator: 'OnlinePayments',
});

const submitBatchRequestBody = {
  header: {
    itemCount: 1,
    merchantBatchReference: 'unique-batch-reference',
    operationType: 'CreatePayment'
  },
  createPayments: [
    {
      cardPaymentMethodSpecificInput: {
        card: {
          cardNumber: '4330264936344675',
          cardholderName: 'Jacqueline',
          cvv: '031',
          expiryDate: '1231'
        },
        paymentProductId: 1,
        transactionChannel: 'ECOMMERCE',
        authorizationMode: 'FINAL_AUTHORIZATION'
      },
      order: {
        amountOfMoney: {
          amount: 5600,
          currencyCode: 'EUR',
        },
        references: {
          merchantReference: 'merchant-reference'
        }
      }
    }
  ]
};

const submitBatchResponse = client.merchantBatch.submitBatch(
  'YourPSPID',
  submitBatchRequestBody,
  null
);
$communicatorConfiguration = new CommunicatorConfiguration(
            "yourAPIkey",
            'yourAPIsecret',
            "https://payment.preprod.direct.worldline-solutions.com",
            'yourMerchantId',
            null
        );

        $authenticator = new V1HmacAuthenticator($communicatorConfiguration);

        $communicator = new Communicator($communicatorConfiguration, $authenticator);

        $client = new Client($communicator);

        Integration steps = new BatchMetadata();
        $header->setItemCount(1);
        $header->setOperationType("CreatePayment");
        $header->setMerchantBatchReference("unique-batch-reference");

        $card = new Card();
        $card->setCardNumber("4330264936344675");
        $card->setCvv("031");
        $card->setExpiryDate("1231");
        $card->setCardholderName("Jacqueline");

        $cardPaymentMethodSpecificInput = new CardPaymentMethodSpecificInput();
        $cardPaymentMethodSpecificInput->setCard($card);
        $cardPaymentMethodSpecificInput->setPaymentProductId(1);
        $cardPaymentMethodSpecificInput->setTransactionChannel("ECOMMERCE");
        $cardPaymentMethodSpecificInput->setAuthorizationMode("FINAL_AUTHORIZATION");

        $amountOfMoney = new AmountOfMoney();
        $amountOfMoney->setAmount(5600);
        $amountOfMoney->setCurrencyCode("EUR");

        $references = new OrderReferences();
        $references->setMerchantReference("merchant-reference");

        $order = new Order();
        $order->setAmountOfMoney($amountOfMoney);
        $order->setReferences($references);

        $payment = new CreatePaymentRequest();
        $payment->setCardPaymentMethodSpecificInput($cardPaymentMethodSpecificInput);
        $payment->setOrder($order);

        $requestBody = new SubmitBatchRequestBody();
        $requestBody->setHeader(Integration steps);
        $requestBody->createPayments = [$payment];

        $submitBatchResponse = $client->merchant("yourPSPID")->merchantBatch()->submitBatch($requestBody);
communicator_configuration = CommunicatorConfiguration(
            api_endpoint="https://payment.preprod.direct.worldline-solutions.com",
            api_key_id="YourAPIkey",
            secret_api_key="YourAPISecret",
            authorization_type="v1HMAC",
            integrator="YourCompanyName",
            connect_timeout=5000,
            socket_timeout=10000,
            max_connections=10
        )

        communicator = Factory.create_communicator_from_configuration(communicator_configuration)

        client = Factory.create_client_from_communicator(communicator)

        header = BatchMetadata()
        header.item_count = 1
        header.operation_type = "CreatePayment"
        header.merchant_batch_reference = "unique-batch-reference"

        card = Card()
        card.card_number = "4330264936344675"
        card.expiry_date = "1231"
        card.cvv = "031"
        card.cardholder_name = "Jacqueline"

        cardPaymentMethodSpecificInput = CardPaymentMethodSpecificInput()
        cardPaymentMethodSpecificInput.card = card
        cardPaymentMethodSpecificInput.payment_product_id = 1
        cardPaymentMethodSpecificInput.transaction_channel = "ECOMMERCE"
        cardPaymentMethodSpecificInput.authorization_mode = "FINAL_AUTHORIZATION"

        amountOfMoney = AmountOfMoney()
        amountOfMoney.amount = 5600
        amountOfMoney.currency_code = "EUR"

        references = OrderReferences()
        references.merchant_reference = "merchant-reference"

        order = Order()
        order.amount_of_money = amountOfMoney
        order.references = references

        payment = CreatePaymentRequest()
        payment.order = order
        payment.card_payment_method_specific_input = cardPaymentMethodSpecificInput

        requestBody = SubmitBatchRequestBody()
        requestBody.header = header
        requestBody.create_payments = [payment]

        submitBatchResponse = (client.merchant("YourPSPID").merchant_batch().submit_batch(requestBody))
communication_configuration = OnlinePayments::SDK::CommunicatorConfiguration.new(
    integrator: "OnlinePayments",
    api_endpoint: "https://payment.preprod.direct.worldline-solutions.com",
    api_key_id: "yourAPIkey",
    secret_api_key: "yourAPIsecret",
    authorization_type: "v1HMAC",
    connect_timeout: 5000,
    socket_timeout: 10000,
    max_connections: 10
  )

  client = OnlinePayments::SDK::Factory.create_client_from_configuration(communication_configuration)

  header = Domain::BatchMetadata.new
  header.item_count = 1
  header.merchant_batch_reference = "unique-batch-reference"
  header.operation_type = "CreatePayment"

  card = Domain::Card.new
  card.card_number = "4330264936344675"
  card.cvv = "031"
  card.expiry_date = "1231"
  card.cardholder_name = "Jacqueline"

  card_payment_method_specific_input = Domain::CardPaymentMethodSpecificInput.new
  card_payment_method_specific_input.payment_product_id = 1
  card_payment_method_specific_input.transaction_channel = "ECOMMERCE"
  card_payment_method_specific_input.authorization_mode = "FINAL_AUTHORIZATION"
  card_payment_method_specific_input.card = card

  references = Domain::OrderReferences.new
  references.merchant_reference = "merchant-reference"

  amount_of_money = Domain::AmountOfMoney.new
  amount_of_money.amount = 5600
  amount_of_money.currency_code = "EUR"

  order = Domain::Order.new
  order.amount_of_money = amount_of_money
  order.references = references

  payment = Domain::CreatePaymentRequest.new
  payment.order = order
  payment.card_payment_method_specific_input = card_payment_method_specific_input

  request_body = Domain::SubmitBatchRequestBody.new
  request_body.header = header
  request_body.create_payments = [payment]

  submit_batch_response = client.merchant("yourPSPID").merchant_batch.submit_batch(request_body)

Les connexions de serveur à serveur exigent que vos systèmes traitent les données de carte à un moment donné. Cette méthode implique un très grand nombre d'exigences PCI.

Cependant, vous pouvez considérablement réduire l'étendue de votre évaluation et le nombre d'exigences PCI : Remplacez le numéro de carte par un token. Cela vous permet de déléguer entièrement la gestion des données de carte à notre plateforme.

Bancontact Wallet Initiated Payments (WIP) avec un token existant

Batch prend en charge les transactions initiées par le marchand (MIT) pour les Bancontact Wallet Initiated Payments (WIP).

Une fois que vous avez créé un token WIP, vous pouvez traiter les paiements récurrents/les paiements échelonnés suivants. Reportez-vous au chapitre dédié dans notre guide Bancontact pour obtenir une vue d’ensemble complète de la création et de l’utilisation des tokens WIP.

Votre JSON doit contenir un tableau createPayments où chaque élément du tableau représente une transaction :

Skip code example Copy
final URI apiEndpoint = URI.create("https://payment.preprod.direct.worldline-solutions.com");

        final Authenticator authenticator = new V1HmacAuthenticator("YourAPIkey", "YourAPISecret");
        final MetadataProvider metadataProvider = new DefaultMetadataProvider("OnlinePayments");

        final DefaultConnection defaultConnection = new DefaultConnection(5000, 10000, 3000);

        ClientInterface client = Factory.createClient(apiEndpoint, defaultConnection, authenticator, metadataProvider);

        CreatePaymentRequest payment = new CreatePaymentRequest()
            .withCardPaymentMethodSpecificInput(
                new CardPaymentMethodSpecificInput()
                    .withAuthorizationMode("SALE")
                    .withPaymentProduct3012SpecificInput(
                        new PaymentProduct3012SpecificInput()
                            .withForceAuthentication(false)
                            .withIsWipTransaction(true)
                    )
                    .withPaymentProductId(3012)
                    .withToken("de87813500ba45a58c443775af81ac45")
            )
            .withOrder(
                new Order()
                    .withAmountOfMoney(
                        new AmountOfMoney()
                            .withAmount(1000L)
                            .withCurrencyCode("EUR")
                    )
                    .withReferences(
                        new OrderReferences()
                            .withMerchantReference("merchant-reference")
                    )
            );

        List payments = new ArrayList<>();
        payments.add(payment);

        SubmitBatchRequestBody submitBatchRequestBody = new SubmitBatchRequestBody()
            .withHeader(new BatchMetadata()
                .withOperationType("CreatePayment")
                .withMerchantBatchReference("unique-batch-reference")
                .withItemCount(1))
            .withCreatePayments(payments);

        SubmitBatchResponse submitBatchResponse = client
            .merchant("YourPSPID")
            .merchantBatch()
            .submitBatch(submitBatchRequestBody);
Uri apiEndpoint = new("https://payment.preprod.direct.worldline-solutions.com/");

        IClient client = Factory.CreateClient(new CommunicatorConfiguration
        {
            ApiKeyId = "YourAPIkey",
            SecretApiKey = "YourAPISecret",
            Integrator = "YourCompanyName",
            ApiEndpoint = apiEndpoint,
        });

        SubmitBatchRequestBody request = new()
        {
            Header = new()
            {
                ItemCount = 1,
                OperationType = "CreatePayment",
                MerchantBatchReference = "unique-batch-reference"
            },
            CreatePayments = new List
            {
                new()
                {
                    CardPaymentMethodSpecificInput = new()
                    {
                        AuthorizationMode = "SALE",
                        PaymentProduct3012SpecificInput = new()
                        {
                            ForceAuthentication = false,
                            IsWipTransaction = true
                        },
                        PaymentProductId = 3012,
                        Token = "de87813500ba45a58c443775af81ac45"
                    },
                    Order = new()
                    {
                        AmountOfMoney = new()
                        {
                            Amount = 1000,
                            CurrencyCode = "EUR"
                        },
                        References = new()
                        {
                            MerchantReference = "merchant-reference"
                        }
                    }
                }
            }
        };

        SubmitBatchResponse response = await client
            .WithNewMerchant("YourPSPID")
            .MerchantBatch
            .SubmitBatch(request);
const client = directSdk.init({
  host: 'payment.preprod.direct.worldline-solutions.com',
  apiKeyId: 'YourAPIkey',
  secretApiKey: 'YourAPISecret',
  integrator: 'OnlinePayments',
});

const submitBatchRequestBody = {
  header: {
    itemCount: 1,
    merchantBatchReference: 'unique-batch-reference',
    operationType: 'CreatePayment'
  },
  createPayments: [
    {
      cardPaymentMethodSpecificInput: {
        authorizationMode: 'SALE',
        paymentProduct3012SpecificInput: {
          forceAuthentication: false,
          isWipTransaction: true
        },
        paymentProductId: 3012,
        token: 'de87813500ba45a58c443775af81ac45'
      },
      order: {
        amountOfMoney: {
          amount: 1000,
          currencyCode: 'EUR',
        },
        references:{
          merchantReference: 'merchant-reference'
        }
      }
    }
  ]
};

const submitBatchResponse = client.merchantBatch.submitBatch(
  'YourPSPID',
  submitBatchRequestBody,
  null
);
$communicatorConfiguration = new CommunicatorConfiguration(
            "yourAPIkey",
            'yourAPIsecret',
            "https://payment.preprod.direct.worldline-solutions.com",
            'yourMerchantId',
            null
        );

        $authenticator = new V1HmacAuthenticator($communicatorConfiguration);

        $communicator = new Communicator($communicatorConfiguration, $authenticator);

        $client = new Client($communicator);

        Integration steps = new BatchMetadata();
        $header->setItemCount(1);
        $header->setOperationType("CreatePayment");
        $header->setMerchantBatchReference("unique-batch-reference");

        $paymentProduct3012SpecificInput = new PaymentProduct3012SpecificInput();
        $paymentProduct3012SpecificInput->setForceAuthentication(false);
        $paymentProduct3012SpecificInput->setIsWipTransaction(true);

        $cardPaymentMethodSpecificInput = new CardPaymentMethodSpecificInput();
        $cardPaymentMethodSpecificInput->setAuthorizationMode("SALE");
        $cardPaymentMethodSpecificInput->setPaymentProduct3012SpecificInput($paymentProduct3012SpecificInput);
        $cardPaymentMethodSpecificInput->setPaymentProductId(3012);
        $cardPaymentMethodSpecificInput->setToken("de87813500ba45a58c443775af81ac45");

        $amountOfMoney = new AmountOfMoney();
        $amountOfMoney->setAmount(1000);
        $amountOfMoney->setCurrencyCode("EUR");

        $references = new OrderReferences();
        $references->setMerchantReference("merchant-reference");

        $order = new Order();
        $order->setAmountOfMoney($amountOfMoney);
        $order->setReferences($references);

        $payment = new CreatePaymentRequest();
        $payment->setOrder($order);
        $payment->setCardPaymentMethodSpecificInput($cardPaymentMethodSpecificInput);

        $requestBody = new SubmitBatchRequestBody();
        $requestBody->setHeader(Integration steps);
        $requestBody->createPayments = [$payment];

        $submitBatchResponse = $client->merchant("yourPSPID")->merchantBatch()->submitBatch($requestBody);
communicator_configuration = CommunicatorConfiguration(
            api_endpoint="https://payment.preprod.direct.worldline-solutions.com",
            api_key_id="YourAPIkey",
            secret_api_key="YourAPISecret",
            authorization_type="v1HMAC",
            integrator="YourCompanyName",
            connect_timeout=5000,
            socket_timeout=10000,
            max_connections=10
        )

        communicator = Factory.create_communicator_from_configuration(communicator_configuration)

        client = Factory.create_client_from_communicator(communicator)

        header = BatchMetadata()
        header.item_count = 1
        header.operation_type = "CreatePayment"
        header.merchant_batch_reference = "unique-batch-reference"

        paymentProduct3012SpecificInput = PaymentProduct3012SpecificInput()
        paymentProduct3012SpecificInput.force_authentication = False
        paymentProduct3012SpecificInput.is_wip_transaction = True

        cardPaymentMethodSpecificInput = CardPaymentMethodSpecificInput()
        cardPaymentMethodSpecificInput.payment_product3012_specific_input = paymentProduct3012SpecificInput
        cardPaymentMethodSpecificInput.payment_product_id = 3012
        cardPaymentMethodSpecificInput.token = "de87813500ba45a58c443775af81ac45"
        cardPaymentMethodSpecificInput.authorization_mode = "SALE"

        amountOfMoney = AmountOfMoney()
        amountOfMoney.amount = 1000
        amountOfMoney.currency_code = "EUR"

        references = OrderReferences()
        references.merchant_reference = "merchant-reference"

        order = Order()
        order.amount_of_money = amountOfMoney
        order.references = references

        payment = CreatePaymentRequest()
        payment.order = order
        payment.card_payment_method_specific_input = cardPaymentMethodSpecificInput

        requestBody = SubmitBatchRequestBody()
        requestBody.header = header
        requestBody.create_payments = [payment]

        submitBatchResponse = (client.merchant("YourPSPID").merchant_batch().submit_batch(requestBody))
communication_configuration = OnlinePayments::SDK::CommunicatorConfiguration.new(
    integrator: "OnlinePayments",
    api_endpoint: "https://payment.preprod.direct.worldline-solutions.com",
    api_key_id: "yourAPIkey",
    secret_api_key: "yourAPIsecret",
    authorization_type: "v1HMAC",
    connect_timeout: 5000,
    socket_timeout: 10000,
    max_connections: 10
  )

  client = OnlinePayments::SDK::Factory.create_client_from_configuration(communication_configuration)

  header = Domain::BatchMetadata.new
  header.item_count = 1
  header.merchant_batch_reference = "unique-batch-reference"
  header.operation_type = "CreatePayment"

  payment_product3012_specific_input = Domain::PaymentProduct3012SpecificInput.new
  payment_product3012_specific_input.force_authentication = false
  payment_product3012_specific_input.is_wip_transaction = true

  card_payment_method_specific_input = Domain::CardPaymentMethodSpecificInput.new
  card_payment_method_specific_input.authorization_mode = "SALE"
  card_payment_method_specific_input.payment_product_id = 3012
  card_payment_method_specific_input.token = "de87813500ba45a58c443775af81ac45"
  card_payment_method_specific_input.payment_product3012_specific_input = payment_product3012_specific_input

  amount_of_money = Domain::AmountOfMoney.new
  amount_of_money.amount = 1000
  amount_of_money.currency_code = "EUR"

  references = Domain::OrderReferences.new
  references.merchant_reference = "merchant-reference"

  order = Domain::Order.new
  order.amount_of_money = amount_of_money
  order.references = references

  payment = Domain::CreatePaymentRequest.new
  payment.order = order
  payment.card_payment_method_specific_input = card_payment_method_specific_input


  request_body = Domain::SubmitBatchRequestBody.new
  request_body.header = header
  request_body.create_payments = [payment]

  submit_batch_response = client.merchant("yourPSPID").merchant_batch.submit_batch(request_body)

Transactions initiées par le marchand (MIT) avec un token

Assurez-vous de suivre les directives Card On File pour ce cas d'utilisation.

Votre JSON doit contenir un tableau de createPayments où chaque élément du tableau représente une transaction. Remplacez les données sensibles de la carte par un token :

Skip code example Copy
final URI apiEndpoint = URI.create("https://payment.preprod.direct.worldline-solutions.com");

        final Authenticator authenticator = new V1HmacAuthenticator("YourAPIkey", "YourAPISecret");
        final MetadataProvider metadataProvider = new DefaultMetadataProvider("OnlinePayments");

        final DefaultConnection defaultConnection = new DefaultConnection(5000, 10000, 3000);

        ClientInterface client = Factory.createClient(apiEndpoint, defaultConnection, authenticator, metadataProvider);

        CreatePaymentRequest payment = new CreatePaymentRequest()
            .withCardPaymentMethodSpecificInput(
                new CardPaymentMethodSpecificInput()
                    .withToken("52f6764169fb419785643a9a9751a33c")
                    .withAuthorizationMode("FINAL_AUTHORIZATION")
                    .withTransactionChannel("ECOMMERCE")
                    .withPaymentProductId(3)
                    .withUnscheduledCardOnFileRequestor("merchantInitiated")
                    .withUnscheduledCardOnFileSequenceIndicator("subsequent")
            )
            .withOrder(
                new Order()
                    .withAmountOfMoney(
                        new AmountOfMoney()
                            .withAmount(5600L)
                            .withCurrencyCode("EUR")
                    )
            );

        List payments = new ArrayList<>();
        payments.add(payment);

        SubmitBatchRequestBody submitBatchRequestBody = new SubmitBatchRequestBody()
            .withHeader(new BatchMetadata()
                .withOperationType("CreatePayment")
                .withMerchantBatchReference("unique-batch-reference")
                .withItemCount(1))
            .withCreatePayments(payments);

        SubmitBatchResponse submitBatchResponse = client
            .merchant("YourPSPID")
            .merchantBatch()
            .submitBatch(submitBatchRequestBody);
Uri apiEndpoint = new("https://payment.preprod.direct.worldline-solutions.com/");

            IClient client = Factory.CreateClient(new CommunicatorConfiguration
            {
                ApiKeyId = "YourAPIkey",
                SecretApiKey = "YourAPISecret",
                Integrator = "YourCompanyName",
                ApiEndpoint = apiEndpoint,
            });

            SubmitBatchRequestBody request = new()
            {
                Header = new()
                {
                    ItemCount = 1,
                    OperationType = "CreatePayment",
                    MerchantBatchReference = "unique-batch-reference"
                },
                CreatePayments = new List
                {
                    new()
                    {
                        CardPaymentMethodSpecificInput = new()
                        {
                            Token = "52f6764169fb419785643a9a9751a33c",
                            AuthorizationMode = "FINAL_AUTHORIZATION",
                            TransactionChannel = "ECOMMERCE",
                            PaymentProductId = 3,
                            UnscheduledCardOnFileRequestor = "merchantInitiated",
                            UnscheduledCardOnFileSequenceIndicator = "subsequent"

                        },
                        Order = new()
                        {
                            AmountOfMoney = new()
                            {
                                Amount = 5600,
                                CurrencyCode = "EUR"
                            }
                        }
                    }
                }
            };

            SubmitBatchResponse response = await client
                .WithNewMerchant("YourPSPID")
                .MerchantBatch
                .SubmitBatch(request);
const client = directSdk.init({
      host: 'payment.preprod.direct.worldline-solutions.com',
      apiKeyId: 'YourAPIkey',
      secretApiKey: 'YourAPISecret',
      integrator: 'OnlinePayments',
    });

    const submitBatchRequestBody = {
      header: {
        itemCount: 1,
        merchantBatchReference: "unique-batch-reference",
        operationType: "CreatePayment",
      },
      createPayments: [
        {
          cardPaymentMethodSpecificInput: {
            token: "52f6764169fb419785643a9a9751a33c",
            authorizationMode: "FINAL_AUTHORIZATION",
            transactionChannel: "ECOMMERCE",
            paymentProductId: 3,
            unscheduledCardOnFileRequestor: "merchantInitiated",
            unscheduledCardOnFileSequenceIndicator: "subsequent",
          },
          order: {
            amountOfMoney: {
              amount: 5600,
              currencyCode: "EUR",
            },
          },
        },
      ],
    };

    const submitBatchResponse = client.merchantBatch.submitBatch(
      'YourPSPID',
      submitBatchRequestBody,
      null
    );
$communicatorConfiguration = new CommunicatorConfiguration(
            "yourAPIkey",
            'yourAPIsecret',
            "https://payment.preprod.direct.worldline-solutions.com",
            'yourMerchantId',
            null
        );

        $authenticator = new V1HmacAuthenticator($communicatorConfiguration);

        $communicator = new Communicator($communicatorConfiguration, $authenticator);

        $client = new Client($communicator);

        Integration steps = new BatchMetadata();
        $header->setItemCount(1);
        $header->setOperationType("CreatePayment");
        $header->setMerchantBatchReference("unique-batch-reference");

        $cardPaymentMethodSpecificInput = new CardPaymentMethodSpecificInput();
        $cardPaymentMethodSpecificInput->setToken("52f6764169fb419785643a9a9751a33c");
        $cardPaymentMethodSpecificInput->setAuthorizationMode("FINAL_AUTHORIZATION");
        $cardPaymentMethodSpecificInput->setTransactionChannel("ECOMMERCE");
        $cardPaymentMethodSpecificInput->setPaymentProductId(3);
        $cardPaymentMethodSpecificInput->setUnscheduledCardOnFileRequestor("merchantInitiated");
        $cardPaymentMethodSpecificInput->setUnscheduledCardOnFileSequenceIndicator("subsequent");

        $amountOfMoney = new AmountOfMoney();
        $amountOfMoney->setAmount(5600);
        $amountOfMoney->setCurrencyCode("EUR");

        $order = new Order();
        $order->setAmountOfMoney($amountOfMoney);

        $payment = new CreatePaymentRequest();
        $payment->setCardPaymentMethodSpecificInput($cardPaymentMethodSpecificInput);
        $payment->setOrder($order);

        $requestBody = new SubmitBatchRequestBody();
        $requestBody->setHeader(Integration steps);
        $requestBody->createPayments = [$payment];

        $submitBatchResponse = $client->merchant("yourPSPID")->merchantBatch()->submitBatch($requestBody);
communicator_configuration = CommunicatorConfiguration(
                api_endpoint="https://payment.preprod.direct.worldline-solutions.com",
                api_key_id="YourAPIkey",
                secret_api_key="YourAPISecret",
                authorization_type="v1HMAC",
                integrator="YourCompanyName",
                connect_timeout=5000,
                socket_timeout=10000,
                max_connections=10
            )

            communicator = Factory.create_communicator_from_configuration(communicator_configuration)

            client = Factory.create_client_from_communicator(communicator)

            header = BatchMetadata()
            header.item_count = 1
            header.operation_type = "CreatePayment"
            header.merchant_batch_reference = "unique-batch-reference"

            cardPaymentMethodSpecificInput = CardPaymentMethodSpecificInput()
            cardPaymentMethodSpecificInput.token = "52f6764169fb419785643a9a9751a33c"
            cardPaymentMethodSpecificInput.authorization_mode = "FINAL_AUTHORIZATION"
            cardPaymentMethodSpecificInput.transaction_channel = "ECOMMERCE"
            cardPaymentMethodSpecificInput.payment_product_id = 3
            cardPaymentMethodSpecificInput.unscheduled_card_on_file_requestor = "merchantInitiated"
            cardPaymentMethodSpecificInput.unscheduled_card_on_file_sequence_indicator = "subsequent"

            amountOfMoney = AmountOfMoney()
            amountOfMoney.amount = 5600
            amountOfMoney.currency_code = "EUR"

            order = Order()
            order.amount_of_money = amountOfMoney

            payment = CreatePaymentRequest()
            payment.card_payment_method_specific_input = cardPaymentMethodSpecificInput
            payment.order = order

            requestBody = SubmitBatchRequestBody()
            requestBody.header = header
            requestBody.create_payments = [payment]

            submitBatchResponse = (client.merchant("YourPSPID").merchant_batch().submit_batch(requestBody))
communication_configuration = OnlinePayments::SDK::CommunicatorConfiguration.new(
      integrator: "OnlinePayments",
      api_endpoint: "https://payment.preprod.direct.worldline-solutions.com",
      api_key_id: "yourAPIkey",
      secret_api_key: "yourAPIsecret",
      authorization_type: "v1HMAC",
      connect_timeout: 5000,
      socket_timeout: 10000,
      max_connections: 10
    )

    client = OnlinePayments::SDK::Factory.create_client_from_configuration(communication_configuration)

    header = Domain::BatchMetadata.new
    header.item_count = 1
    header.merchant_batch_reference = "unique-batch-reference"
    header.operation_type = "CreatePayment"

    card_payment_method_specific_input = Domain::CardPaymentMethodSpecificInput.new
    card_payment_method_specific_input.token = "52f6764169fb419785643a9a9751a33c"
    card_payment_method_specific_input.authorization_mode = "FINAL_AUTHORIZATION"
    card_payment_method_specific_input.transaction_channel = "ECOMMERCE"
    card_payment_method_specific_input.payment_product_id = 3
    card_payment_method_specific_input.unscheduled_card_on_file_requestor = "merchantInitiated"
    card_payment_method_specific_input.unscheduled_card_on_file_sequence_indicator = "subsequent"

    amount_of_money = Domain::AmountOfMoney.new
    amount_of_money.amount = 5600
    amount_of_money.currency_code = "EUR"

    order = Domain::Order.new
    order.amount_of_money = amount_of_money

    payment = Domain::CreatePaymentRequest.new
    payment.card_payment_method_specific_input = card_payment_method_specific_input
    payment.order = order
    
    request_body = Domain::SubmitBatchRequestBody.new
    request_body.header = header
    request_body.create_payments = [payment]

    submit_batch_response = client.merchant("yourPSPID").merchant_batch.submit_batch(request_body)

Transactions initiées par le marchand (MIT) avec un payment.id

Assurez-vous de suivre les directives Card On File pour ce cas d'utilisation. Votre JSON doit contenir un tableau de subsequentPayments où chaque élément du tableau représente une transaction : 

Skip code example Copy
final URI apiEndpoint = URI.create("https://payment.preprod.direct.worldline-solutions.com");

        final Authenticator authenticator = new V1HmacAuthenticator("YourAPIkey", "YourAPISecret");
        final MetadataProvider metadataProvider = new DefaultMetadataProvider("OnlinePayments");

        final DefaultConnection defaultConnection = new DefaultConnection(5000, 10000, 3000);

        ClientInterface client = Factory.createClient(apiEndpoint, defaultConnection, authenticator, metadataProvider);

        SubsequentPaymentBatchRequest payment = new SubsequentPaymentBatchRequest()
            .withPaymentId("48901070_0")
            .withSubsequent(
                new SubsequentPaymentRequest()
                    .withSubsequentcardPaymentMethodSpecificInput(
                        new SubsequentCardPaymentMethodSpecificInput()
                            .withSubsequentType("Recurring")
                    )
                    .withOrder(
                        new Order()
                            .withAmountOfMoney(
                                new AmountOfMoney()
                                    .withAmount(1000L)
                                    .withCurrencyCode("EUR")
                            )
                            .withReferences(
                                new OrderReferences()
                                    .withMerchantReference("merchant-reference")
                            )
                    )
            );

        List payments = new ArrayList<>();
        payments.add(payment);

        SubmitBatchRequestBody submitBatchRequestBody = new SubmitBatchRequestBody()
            .withHeader(new BatchMetadata()
                .withOperationType("SubsequentPayment")
                .withMerchantBatchReference("unique-batch-reference")
                .withItemCount(1))
            .withSubsequentPayments(payments);

        SubmitBatchResponse submitBatchResponse = client
            .merchant("YourPSPID")
            .merchantBatch()
            .submitBatch(submitBatchRequestBody);
Uri apiEndpoint = new("https://payment.preprod.direct.worldline-solutions.com/");

        IClient client = Factory.CreateClient(new CommunicatorConfiguration
        {
            ApiKeyId = "YourAPIkey",
            SecretApiKey = "YourAPISecret",
            Integrator = "YourCompanyName",
            ApiEndpoint = apiEndpoint,
        });

        SubmitBatchRequestBody request = new()
        {
            Header = new()
            {
                ItemCount = 1,
                OperationType = "SubsequentPayment",
                MerchantBatchReference = "unique-batch-reference"
            },
            SubsequentPayments = new List
            {
                new()
                {
                    PaymentId = "48901070_0",
                    Subsequent = new()
                    {
                        SubsequentcardPaymentMethodSpecificInput = new()
                        {
                            SubsequentType = "Recurring"
                        },
                        Order = new()
                        {
                            AmountOfMoney = new()
                            {
                                Amount = 1000,
                                CurrencyCode = "EUR"
                            },
                            References = new()
                            {
                                MerchantReference = "merchant-reference"
                            }
                        }
                    }
                }
            }
        };

        SubmitBatchResponse response = await client
            .WithNewMerchant("YourPSPID")
            .MerchantBatch
            .SubmitBatch(request);
const client = directSdk.init({
  host: 'payment.preprod.direct.worldline-solutions.com',
  apiKeyId: 'YourAPIkey',
  secretApiKey: 'YourAPISecret',
  integrator: 'OnlinePayments',
});

const submitBatchRequestBody = {
  header: {
    itemCount: 1,
    merchantBatchReference: 'unique-batch-reference',
    operationType: 'SubsequentPayment'
  },
  subsequentPayments: [
    {
      paymentId: '48901070_0',
      subsequent: {
        subsequentcardPaymentMethodSpecificInput: {
          subsequentType: 'Recurring'
        },
        order: {
          amountOfMoney: {
            amount: 1000,
            currencyCode: 'EUR',
          },
          references:{
            merchantReference: 'merchant-reference'
          }
        }
      }
    }
  ]
};

const submitBatchResponse = client.merchantBatch.submitBatch(
  'YourPSPID',
  submitBatchRequestBody,
  null
);
$communicatorConfiguration = new CommunicatorConfiguration(
            "yourAPIkey",
            'yourAPIsecret',
            "https://payment.preprod.direct.worldline-solutions.com",
            'yourMerchantId',
            null
        );

        $authenticator = new V1HmacAuthenticator($communicatorConfiguration);

        $communicator = new Communicator($communicatorConfiguration, $authenticator);

        $client = new Client($communicator);

        Integration steps = new BatchMetadata();
        $header->setItemCount(1);
        $header->setOperationType("SubsequentPayment");
        $header->setMerchantBatchReference("unique-batch-reference");

        $amountOfMoney = new AmountOfMoney();
        $amountOfMoney->setAmount(1000);
        $amountOfMoney->setCurrencyCode("EUR");

        $references = new OrderReferences();
        $references->setMerchantReference("merchant-reference");

        $order = new Order();
        $order->setAmountOfMoney($amountOfMoney);
        $order->setReferences($references);

        $subsequentcardPaymentMethodSpecificInput = new SubsequentCardPaymentMethodSpecificInput();
        $subsequentcardPaymentMethodSpecificInput->setSubsequentType("Recurring");

        $subsequent = new SubsequentPaymentRequest();
        $subsequent->setSubsequentcardPaymentMethodSpecificInput($subsequentcardPaymentMethodSpecificInput);
        $subsequent->setOrder($order);

        $payment = new SubsequentPaymentBatchRequest();
        $payment->setPaymentId("48901070_0");
        $payment->setSubsequent($subsequent);

        $requestBody = new SubmitBatchRequestBody();
        $requestBody->setHeader(Integration steps);
        $requestBody->subsequentPayments = [$payment];

        $submitBatchResponse = $client->merchant("yourPSPID")->merchantBatch()->submitBatch($requestBody);
communicator_configuration = CommunicatorConfiguration(
            api_endpoint="https://payment.preprod.direct.worldline-solutions.com",
            api_key_id="YourAPIkey",
            secret_api_key="YourAPISecret",
            authorization_type="v1HMAC",
            integrator="YourCompanyName",
            connect_timeout=5000,
            socket_timeout=10000,
            max_connections=10
        )

        communicator = Factory.create_communicator_from_configuration(communicator_configuration)

        client = Factory.create_client_from_communicator(communicator)

        header = BatchMetadata()
        header.item_count = 1
        header.operation_type = "SubsequentPayment"
        header.merchant_batch_reference = "unique-batch-reference"

        subsequentcardPaymentMethodSpecificInput = SubsequentCardPaymentMethodSpecificInput()
        subsequentcardPaymentMethodSpecificInput.subsequent_type = "Recurring"

        amountOfMoney = AmountOfMoney()
        amountOfMoney.amount = 1000
        amountOfMoney.currency_code = "EUR"

        references = OrderReferences()
        references.merchant_reference = "merchant-reference"

        order = Order()
        order.amount_of_money = amountOfMoney
        order.references = references

        subsequent = SubsequentPaymentRequest()
        subsequent.order = order
        subsequent.subsequentcard_payment_method_specific_input = subsequentcardPaymentMethodSpecificInput

        payment = SubsequentPaymentBatchRequest()
        payment.payment_id = "48901070_0"
        payment.subsequent = subsequent

        requestBody = SubmitBatchRequestBody()
        requestBody.header = header
        requestBody.subsequent_payments = [payment]

        submitBatchResponse = (client.merchant("YourPSPID").merchant_batch().submit_batch(requestBody))
communication_configuration = OnlinePayments::SDK::CommunicatorConfiguration.new(
    integrator: "OnlinePayments",
    api_endpoint: "https://payment.preprod.direct.worldline-solutions.com",
    api_key_id: "yourAPIkey",
    secret_api_key: "yourAPIsecret",
    authorization_type: "v1HMAC",
    connect_timeout: 5000,
    socket_timeout: 10000,
    max_connections: 10
  )

  client = OnlinePayments::SDK::Factory.create_client_from_configuration(communication_configuration)

  header = Domain::BatchMetadata.new
  header.item_count = 1
  header.merchant_batch_reference = "unique-batch-reference"
  header.operation_type = "SubsequentPayment"

  amount_of_money = Domain::AmountOfMoney.new
  amount_of_money.amount = 1000
  amount_of_money.currency_code = "EUR"

  references = Domain::OrderReferences.new
  references.merchant_reference = "merchant-reference"

  order = Domain::Order.new
  order.amount_of_money = amount_of_money
  order.references = references

  subsequentcard_payment_method_specific_input = Domain::SubsequentCardPaymentMethodSpecificInput.new
  subsequentcard_payment_method_specific_input.subsequent_type = "Recurring"

  subsequent = Domain::SubsequentPaymentRequest.new
  subsequent.order = order
  subsequent.subsequentcard_payment_method_specific_input = subsequentcard_payment_method_specific_input


  payment = Domain::SubsequentPaymentBatchRequest.new
  payment.payment_id = "48901070_0"
  payment.subsequent = subsequent

  request_body = Domain::SubmitBatchRequestBody.new
  request_body.header = header
  request_body.subsequent_payments = [payment]

  submit_batch_response = client.merchant("yourPSPID").merchant_batch.submit_batch(request_body)

Batch prend en charge la Network Tokenisation pour subsequentPayments. Notre plateforme appliquera automatiquement cette fonctionnalité pour ces soumissions.

Opérations de maintenance

Batch vous permet de :

Annulations

Créez un JSON avec un tableau de cancelPayments où chaque élément du tableau représente une annulation. Référez-vous à chaque transaction via la propriété paymentId.

Skip code example Copy
final URI apiEndpoint = URI.create("https://payment.preprod.direct.worldline-solutions.com");

        final Authenticator authenticator = new V1HmacAuthenticator("YourAPIkey", "YourAPISecret");
        final MetadataProvider metadataProvider = new DefaultMetadataProvider("OnlinePayments");

        final DefaultConnection defaultConnection = new DefaultConnection(5000, 10000, 3000);

        ClientInterface client = Factory.createClient(apiEndpoint, defaultConnection, authenticator, metadataProvider);

        CancelPaymentBatchRequest payment = new CancelPaymentBatchRequest()
            .withPaymentId("48901070_0")
            .withCancel(
                new CancelPaymentRequest()
                    .withAmountOfMoney(
                        new AmountOfMoney()
                            .withAmount(1000L)
                            .withCurrencyCode("EUR")
                    )
                    .withIsFinal(true)
            );

        List payments = new ArrayList<>();
        payments.add(payment);

        SubmitBatchRequestBody submitBatchRequestBody = new SubmitBatchRequestBody()
            .withHeader(new BatchMetadata()
                .withOperationType("CancelPayment")
                .withMerchantBatchReference("unique-batch-reference")
                .withItemCount(1))
            .withCancelPayments(payments);

        SubmitBatchResponse submitBatchResponse = client
            .merchant("YourPSPID")
            .merchantBatch()
            .submitBatch(submitBatchRequestBody);
Uri apiEndpoint = new("https://payment.preprod.direct.worldline-solutions.com/");

        IClient client = Factory.CreateClient(new CommunicatorConfiguration
        {
            ApiKeyId = "YourAPIkey",
            SecretApiKey = "YourAPISecret",
            Integrator = "YourCompanyName",
            ApiEndpoint = apiEndpoint,
        });

        SubmitBatchRequestBody request = new()
        {
            Header = new()
            {
                ItemCount = 1,
                OperationType = "CancelPayment",
                MerchantBatchReference = "unique-batch-reference"
            },
            CancelPayments = new List
            {
                new()
                {
                    PaymentId = "48901070_0",
                    Cancel = new()
                    {
                        AmountOfMoney = new()
                        {
                            Amount = 1000,
                            CurrencyCode = "EUR"
                        },
                        IsFinal = true
                    }
                }
            }
        };

        SubmitBatchResponse response = await client
            .WithNewMerchant("YourPSPID")
            .MerchantBatch
            .SubmitBatch(request);
const client = directSdk.init({
  host: 'payment.preprod.direct.worldline-solutions.com',
  apiKeyId: 'YourAPIkey',
  secretApiKey: 'YourAPISecret',
  integrator: 'OnlinePayments',
});

const submitBatchRequestBody = {
  header: {
    itemCount: 1,
    merchantBatchReference: 'unique-batch-reference',
    operationType: 'CancelPayment'
  },
  cancelPayments: [
    {
      paymentId: '48901070_0',
      cancel: {
        amountOfMoney: {
          amount: 1000,
          currencyCode: 'EUR',
        },
        isFinal: true
      }
    }
  ]
};

const submitBatchResponse = client.merchantBatch.submitBatch(
  'YourPSPID',
  submitBatchRequestBody,
  null
);
$communicatorConfiguration = new CommunicatorConfiguration(
            "yourAPIkey",
            'yourAPIsecret',
            "https://payment.preprod.direct.worldline-solutions.com",
            'yourMerchantId',
            null
        );

        $authenticator = new V1HmacAuthenticator($communicatorConfiguration);

        $communicator = new Communicator($communicatorConfiguration, $authenticator);

        $client = new Client($communicator);

        Integration steps = new BatchMetadata();
        $header->setItemCount(1);
        $header->setOperationType("CancelPayment");
        $header->setMerchantBatchReference("unique-batch-reference");

        $amountOfMoney = new AmountOfMoney();
        $amountOfMoney->setAmount(1000);
        $amountOfMoney->setCurrencyCode("EUR");

        $cancel = new CancelPaymentRequest();
        $cancel->setIsFinal(true);
        $cancel->setAmountOfMoney($amountOfMoney);

        $payment = new CancelPaymentBatchRequest();
        $payment->setPaymentId("48901070_0");
        $payment->setCancel($cancel);

        $requestBody = new SubmitBatchRequestBody();
        $requestBody->setHeader(Integration steps);
        $requestBody->cancelPayments = [$payment];

        $submitBatchResponse = $client->merchant("yourPSPID")->merchantBatch()->submitBatch($requestBody);
communicator_configuration = CommunicatorConfiguration(
            api_endpoint="https://payment.preprod.direct.worldline-solutions.com",
            api_key_id="YourAPIkey",
            secret_api_key="YourAPISecret",
            authorization_type="v1HMAC",
            integrator="YourCompanyName",
            connect_timeout=5000,
            socket_timeout=10000,
            max_connections=10
        )

        communicator = Factory.create_communicator_from_configuration(communicator_configuration)

        client = Factory.create_client_from_communicator(communicator)

        header = BatchMetadata()
        header.item_count = 1
        header.operation_type = "CancelPayment"
        header.merchant_batch_reference = "unique-batch-reference"

        amountOfMoney = AmountOfMoney()
        amountOfMoney.amount = 1000
        amountOfMoney.currency_code = "EUR"

        cancel = CancelPaymentRequest()
        cancel.amount_of_money = amountOfMoney
        cancel.is_final = True

        payment = CancelPaymentBatchRequest()
        payment.payment_id = "48901070_0"
        payment.cancel = cancel

        requestBody = SubmitBatchRequestBody()
        requestBody.header = header
        requestBody.cancel_payments = [payment]

        submitBatchResponse = (client.merchant("YourPSPID").merchant_batch().submit_batch(requestBody))
communication_configuration = OnlinePayments::SDK::CommunicatorConfiguration.new(
    integrator: "OnlinePayments",
    api_endpoint: "https://payment.preprod.direct.worldline-solutions.com",
    api_key_id: "yourAPIkey",
    secret_api_key: "yourAPIsecret",
    authorization_type: "v1HMAC",
    connect_timeout: 5000,
    socket_timeout: 10000,
    max_connections: 10
  )

  client = OnlinePayments::SDK::Factory.create_client_from_configuration(communication_configuration)

  header = Domain::BatchMetadata.new
  header.item_count = 1
  header.merchant_batch_reference = "unique-batch-reference"
  header.operation_type = "CancelPayment"

  amount_of_money = Domain::AmountOfMoney.new
  amount_of_money.amount = 1000
  amount_of_money.currency_code = "EUR"

  cancel = Domain::CancelPaymentRequest.new
  cancel.amount_of_money = amount_of_money
  cancel.is_final = true

  payment = Domain::CancelPaymentBatchRequest.new
  payment.payment_id = "48901070_0"
  payment.cancel = cancel

  request_body = Domain::SubmitBatchRequestBody.new
  request_body.header = header
  request_body.cancel_payments = [payment]

  submit_batch_response = client.merchant("yourPSPID").merchant_batch.submit_batch(request_body)

Captures

Créez un JSON avec un tableau de capturePayments où chaque élément du tableau représente une capture. Référez-vous à chaque transaction via la propriété paymentId.

Skip code example Copy
final URI apiEndpoint = URI.create("https://payment.preprod.direct.worldline-solutions.com");

        final Authenticator authenticator = new V1HmacAuthenticator("YourAPIkey", "YourAPISecret");
        final MetadataProvider metadataProvider = new DefaultMetadataProvider("OnlinePayments");

        final DefaultConnection defaultConnection = new DefaultConnection(5000, 10000, 3000);

        ClientInterface client = Factory.createClient(apiEndpoint, defaultConnection, authenticator, metadataProvider);

        CapturePaymentBatchRequest payment = new CapturePaymentBatchRequest()
            .withPaymentId("48901070_0")
            .withCapture(
                new CapturePaymentRequest()
                    .withAmount(0L)
                    .withIsFinal(true)
                    .withOperationReferences(
                        new OperationPaymentReferences()
                            .withMerchantReference("merchant-reference")
                    )
            );

        List payments = new ArrayList<>();
        payments.add(payment);

        SubmitBatchRequestBody submitBatchRequestBody = new SubmitBatchRequestBody()
            .withHeader(new BatchMetadata()
                .withOperationType("CapturePayment")
                .withMerchantBatchReference("unique-batch-reference")
                .withItemCount(1))
            .withCapturePayments(payments);

        SubmitBatchResponse submitBatchResponse = client
            .merchant("YourPSPID")
            .merchantBatch()
            .submitBatch(submitBatchRequestBody);
Uri apiEndpoint = new("https://payment.preprod.direct.worldline-solutions.com/");

        IClient client = Factory.CreateClient(new CommunicatorConfiguration
        {
            ApiKeyId = "YourAPIkey",
            SecretApiKey = "YourAPISecret",
            Integrator = "YourCompanyName",
            ApiEndpoint = apiEndpoint,
        });

        SubmitBatchRequestBody request = new()
        {
            Header = new()
            {
                ItemCount = 1,
                OperationType = "CapturePayment",
                MerchantBatchReference = "unique-batch-reference"
            },
            CapturePayments = new List
            {
                new()
                {
                    PaymentId = "48901070_0",
                    Capture = new()
                    {
                        Amount = 0,
                        IsFinal = true,
                        OperationReferences = new()
                        {
                            MerchantReference = "merchant-reference"
                        }
                    }
                }
            }
        };

        SubmitBatchResponse response = await client
            .WithNewMerchant("YourPSPID")
            .MerchantBatch
            .SubmitBatch(request);
const client = directSdk.init({
  host: 'payment.preprod.direct.worldline-solutions.com',
  apiKeyId: 'YourAPIkey',
  secretApiKey: 'YourAPISecret',
  integrator: 'OnlinePayments',
});

const submitBatchRequestBody = {
  header: {
    itemCount: 1,
    merchantBatchReference: 'unique-batch-reference',
    operationType: 'CapturePayment'
  },
  capturePayments: [
    {
      paymentId: '48901070_0',
      capture: {
        operationReferences: {
          merchantReference: 'merchant-reference',
        },
        amount: 0,
        isFinal: true
      }
    }
  ]
};

const submitBatchResponse = client.merchantBatch.submitBatch(
  'YourPSPID',
  submitBatchRequestBody,
  null
);
$communicatorConfiguration = new CommunicatorConfiguration(
            "yourAPIkey",
            'yourAPIsecret',
            "https://payment.preprod.direct.worldline-solutions.com",
            'yourMerchantId',
            null
        );

        $authenticator = new V1HmacAuthenticator($communicatorConfiguration);

        $communicator = new Communicator($communicatorConfiguration, $authenticator);

        $client = new Client($communicator);

        Integration steps = new BatchMetadata();
        $header->setItemCount(1);
        $header->setOperationType("CapturePayment");
        $header->setMerchantBatchReference("unique-batch-reference");

        $operationReferences = new OperationPaymentReferences();
        $operationReferences->setMerchantReference("merchant-reference");

        $capture = new CapturePaymentRequest();
        $capture->setAmount(0);
        $capture->setIsFinal(true);
        $capture->setOperationReferences($operationReferences);

        $payment = new CapturePaymentBatchRequest();
        $payment->setPaymentId("48901070_0");
        $payment->setCapture($capture);

        $requestBody = new SubmitBatchRequestBody();
        $requestBody->setHeader(Integration steps);
        $requestBody->capturePayments = [$payment];

        $submitBatchResponse = $client->merchant("yourPSPID")->merchantBatch()->submitBatch($requestBody);
communicator_configuration = CommunicatorConfiguration(
            api_endpoint="https://payment.preprod.direct.worldline-solutions.com",
            api_key_id="YourAPIkey",
            secret_api_key="YourAPISecret",
            authorization_type="v1HMAC",
            integrator="YourCompanyName",
            connect_timeout=5000,
            socket_timeout=10000,
            max_connections=10
        )

        communicator = Factory.create_communicator_from_configuration(communicator_configuration)

        client = Factory.create_client_from_communicator(communicator)

        header = BatchMetadata()
        header.item_count = 1
        header.operation_type = "CapturePayment"
        header.merchant_batch_reference = "unique-batch-reference"

        operationReferences = OperationPaymentReferences()
        operationReferences.merchant_reference = "merchant-reference"

        capture = CapturePaymentRequest()
        capture.amount = 0
        capture.is_final = True
        capture.operation_references = operationReferences

        payment = CapturePaymentBatchRequest()
        payment.payment_id = "48901070_0"
        payment.capture = capture

        requestBody = SubmitBatchRequestBody()
        requestBody.header = header
        requestBody.capture_payments = [payment]

        submitBatchResponse = (client.merchant("YourPSPID").merchant_batch().submit_batch(requestBody))
communication_configuration = OnlinePayments::SDK::CommunicatorConfiguration.new(
    integrator: "OnlinePayments",
    api_endpoint: "https://payment.preprod.direct.worldline-solutions.com",
    api_key_id: "yourAPIkey",
    secret_api_key: "yourAPIsecret",
    authorization_type: "v1HMAC",
    connect_timeout: 5000,
    socket_timeout: 10000,
    max_connections: 10
  )

  client = OnlinePayments::SDK::Factory.create_client_from_configuration(communication_configuration)

  header = Domain::BatchMetadata.new
  header.item_count = 1
  header.merchant_batch_reference = "unique-batch-reference"
  header.operation_type = "CapturePayment"

  operation_references = Domain::OperationPaymentReferences.new
  operation_references.merchant_reference = "merchant-reference"

  capture = Domain::CapturePaymentRequest.new
  capture.amount = 0
  capture.is_final = true
  capture.operation_references = operation_references

  payment = Domain::CapturePaymentBatchRequest.new
  payment.payment_id = "48901070_0"
  payment.capture = capture

  request_body = Domain::SubmitBatchRequestBody.new
  request_body.header = header
  request_body.capture_payments = [payment]

  submit_batch_response = client.merchant("yourPSPID").merchant_batch.submit_batch(request_body)

Remboursements

Créez un JSON avec un tableau de refundPayments où chaque élément du tableau représente un remboursement. Référez-vous à chaque transaction via la propriété paymentId.

Skip code example Copy
final URI apiEndpoint = URI.create("https://payment.preprod.direct.worldline-solutions.com");

        final Authenticator authenticator = new V1HmacAuthenticator("YourAPIkey", "YourAPISecret");
        final MetadataProvider metadataProvider = new DefaultMetadataProvider("OnlinePayments");

        final DefaultConnection defaultConnection = new DefaultConnection(5000, 10000, 3000);

        ClientInterface client = Factory.createClient(apiEndpoint, defaultConnection, authenticator, metadataProvider);

        RefundPaymentBatchRequest payment = new RefundPaymentBatchRequest()
            .withPaymentId("48901070_0")
            .withRefund(
                new RefundRequest()
                    .withAmountOfMoney(
                        new AmountOfMoney()
                            .withAmount(1000L)
                            .withCurrencyCode("EUR")
                    )
                    .withOperationReferences(
                        new OperationPaymentReferences()
                            .withMerchantReference("merchant-reference")
                    )
            );

        List payments = new ArrayList<>();
        payments.add(payment);

        SubmitBatchRequestBody submitBatchRequestBody = new SubmitBatchRequestBody()
            .withHeader(new BatchMetadata()
                .withOperationType("RefundPayment")
                .withMerchantBatchReference("unique-batch-reference")
                .withItemCount(1))
            .withRefundPayments(payments);

        SubmitBatchResponse submitBatchResponse = client
            .merchant("YourPSPID")
            .merchantBatch()
            .submitBatch(submitBatchRequestBody);
Uri apiEndpoint = new("https://payment.preprod.direct.worldline-solutions.com/");

        IClient client = Factory.CreateClient(new CommunicatorConfiguration
        {
            ApiKeyId = "YourAPIkey",
            SecretApiKey = "YourAPISecret",
            Integrator = "YourCompanyName",
            ApiEndpoint = apiEndpoint,
        });

        SubmitBatchRequestBody request = new()
        {
            Header = new()
            {
                ItemCount = 1,
                OperationType = "RefundPayment",
                MerchantBatchReference = "unique-batch-reference"
            },
            RefundPayments = new List
            {
                new()
                {
                    PaymentId = "48901070_0",
                    Refund = new()
                    {
                        AmountOfMoney = new()
                        {
                            Amount = 1000,
                            CurrencyCode = "EUR"
                        },
                        OperationReferences = new()
                        {
                            MerchantReference = "merchant-reference"
                        }
                    }
                }
            }
        };

        SubmitBatchResponse response = await client
            .WithNewMerchant("YourPSPID")
            .MerchantBatch
            .SubmitBatch(request);
const client = directSdk.init({
  host: 'payment.preprod.direct.worldline-solutions.com',
  apiKeyId: 'YourAPIkey',
  secretApiKey: 'YourAPISecret',
  integrator: 'OnlinePayments',
});

const submitBatchRequestBody = {
  header: {
    itemCount: 1,
    merchantBatchReference: 'unique-batch-reference',
    operationType: 'RefundPayment'
  },
  refundPayments: [
    {
      paymentId: '48901070_0',
      refund: {
        operationReferences: {
          merchantReference: 'merchant-reference',
        },
        amountOfMoney: {
          amount: 0,
          currencyCode: 'EUR',
        }
      }
    }
  ]
};

const submitBatchResponse = client.merchantBatch.submitBatch(
  'YourPSPID',
  submitBatchRequestBody,
  null
);
$communicatorConfiguration = new CommunicatorConfiguration(
            "yourAPIkey",
            'yourAPIsecret',
            "https://payment.preprod.direct.worldline-solutions.com",
            'yourMerchantId',
            null
        );

        $authenticator = new V1HmacAuthenticator($communicatorConfiguration);

        $communicator = new Communicator($communicatorConfiguration, $authenticator);

        $client = new Client($communicator);

        Integration steps = new BatchMetadata();
        $header->setItemCount(1);
        $header->setOperationType("RefundPayment");
        $header->setMerchantBatchReference("unique-batch-reference");

        $amountOfMoney = new AmountOfMoney();
        $amountOfMoney->setAmount(1000);
        $amountOfMoney->setCurrencyCode("EUR");

        $operationReferences = new OperationPaymentReferences();
        $operationReferences->setMerchantReference("merchant-reference");

        $refund = new RefundRequest();
        $refund->setAmountOfMoney($amountOfMoney);
        $refund->setOperationReferences($operationReferences);

        $payment = new RefundPaymentBatchRequest();
        $payment->setPaymentId("48901070_0");
        $payment->setRefund($refund);

        $requestBody = new SubmitBatchRequestBody();
        $requestBody->setHeader(Integration steps);
        $requestBody->refundPayments = [$payment];

        $submitBatchResponse = $client->merchant("yourPSPID")->merchantBatch()->submitBatch($requestBody);
communicator_configuration = CommunicatorConfiguration(
            api_endpoint="https://payment.preprod.direct.worldline-solutions.com",
            api_key_id="YourAPIkey",
            secret_api_key="YourAPISecret",
            authorization_type="v1HMAC",
            integrator="YourCompanyName",
            connect_timeout=5000,
            socket_timeout=10000,
            max_connections=10
        )

        communicator = Factory.create_communicator_from_configuration(communicator_configuration)

        client = Factory.create_client_from_communicator(communicator)

        header = BatchMetadata()
        header.item_count = 1
        header.operation_type = "RefundPayment"
        header.merchant_batch_reference = "unique-batch-reference"

        amountOfMoney = AmountOfMoney()
        amountOfMoney.amount = 1000
        amountOfMoney.currency_code = "EUR"

        operationReferences = OperationPaymentReferences()
        operationReferences.merchant_reference = "merchant-reference"

        refund = RefundRequest()
        refund.amount_of_money = amountOfMoney
        refund.operation_references = operationReferences

        payment = RefundPaymentBatchRequest()
        payment.payment_id = "48901070_0"
        payment.refund = refund

        requestBody = SubmitBatchRequestBody()
        requestBody.header = header
        requestBody.refund_payments = [payment]

        submitBatchResponse = (client.merchant("YourPSPID").merchant_batch().submit_batch(requestBody))
communication_configuration = OnlinePayments::SDK::CommunicatorConfiguration.new(
    integrator: "OnlinePayments",
    api_endpoint: "https://payment.preprod.direct.worldline-solutions.com",
    api_key_id: "yourAPIkey",
    secret_api_key: "yourAPIsecret",
    authorization_type: "v1HMAC",
    connect_timeout: 5000,
    socket_timeout: 10000,
    max_connections: 10
  )

  client = OnlinePayments::SDK::Factory.create_client_from_configuration(communication_configuration)

  header = Domain::BatchMetadata.new
  header.item_count = 1
  header.merchant_batch_reference = "unique-batch-reference"
  header.operation_type = "RefundPayment"

  operation_references = Domain::OperationPaymentReferences.new
  operation_references.merchant_reference = "merchant-reference"

  amount_of_money = Domain::AmountOfMoney.new
  amount_of_money.amount = 1000
  amount_of_money.currency_code = "EUR"

  refund = Domain::RefundRequest.new
  refund.amount_of_money = amount_of_money
  refund.operation_references = operation_references

  payment = Domain::RefundPaymentBatchRequest.new
  payment.payment_id = "48901070_0"
  payment.refund = refund

  request_body = Domain::SubmitBatchRequestBody.new
  request_body.header = header
  request_body.refund_payments = [payment]

  submit_batch_response = client.merchant("yourPSPID").merchant_batch.submit_batch(request_body)

Payouts

Batch vous permet de transférer directement des fonds à vos clients via leur carte de crédit/débit grâce à notre  service Payouts

Votre JSON doit contenir un tableau de createPayouts où chaque élément du tableau représente une transaction :

Skip code example Copy
final URI apiEndpoint = URI.create("https://payment.preprod.direct.worldline-solutions.com");

        final Authenticator authenticator = new V1HmacAuthenticator("YourAPIkey", "YourAPISecret");
        final MetadataProvider metadataProvider = new DefaultMetadataProvider("OnlinePayments");

        final DefaultConnection defaultConnection = new DefaultConnection(5000, 10000, 3000);

        ClientInterface client = Factory.createClient(apiEndpoint, defaultConnection, authenticator, metadataProvider);

        CreatePayoutRequest payout = new CreatePayoutRequest()
            .withAmountOfMoney(
                new AmountOfMoney()
                    .withAmount(1000L)
                    .withCurrencyCode("EUR")
            )
            .withCardPayoutMethodSpecificInput(
                new CardPayoutMethodSpecificInput()
                    .withCard(
                        new Card()
                            .withCardholderName("Jacqueline")
                            .withCardNumber("4111111111111111")
                            .withExpiryDate("0228")
                            .withCvv("723")
                    )
                    .withPaymentProductId(1)
            )
            .withReferences(
                new PaymentReferences()
                    .withMerchantReference("merchant-reference")
            );

        List payouts = new ArrayList<>();
        payouts.add(payout);

        SubmitBatchRequestBody submitBatchRequestBody = new SubmitBatchRequestBody()
            .withHeader(new BatchMetadata()
                .withOperationType("CreatePayout")
                .withMerchantBatchReference("unique-batch-reference")
                .withItemCount(1))
            .withCreatePayouts(payouts);

        SubmitBatchResponse submitBatchResponse = client
            .merchant("YourPSPID")
            .merchantBatch()
            .submitBatch(submitBatchRequestBody);
Uri apiEndpoint = new("https://payment.preprod.direct.worldline-solutions.com/");

        IClient client = Factory.CreateClient(new CommunicatorConfiguration
        {
            ApiKeyId = "YourAPIkey",
            SecretApiKey = "YourAPISecret",
            Integrator = "YourCompanyName",
            ApiEndpoint = apiEndpoint,
        });

        SubmitBatchRequestBody request = new()
        {
            Header = new()
            {
                ItemCount = 1,
                OperationType = "CreatePayout",
                MerchantBatchReference = "unique-batch-reference"
            },
            CreatePayouts = new List
            {
                new()
                {
                    AmountOfMoney = new()
                    {
                        Amount = 1000,
                        CurrencyCode = "EUR"
                    },
                    CardPayoutMethodSpecificInput = new()
                    {
                        Card = new()
                        {
                            CardholderName = "Jacqueline",
                            CardNumber = "4111111111111111",
                            ExpiryDate = "0228",
                            Cvv = "723"
                        },
                        PaymentProductId = 1
                    },
                    References = new()
                    {
                        MerchantReference = "merchant-reference"
                    }
                }
            }
        };

        SubmitBatchResponse response = await client
            .WithNewMerchant("YourPSPID")
            .MerchantBatch
            .SubmitBatch(request);
const client = directSdk.init({
  host: 'payment.preprod.direct.worldline-solutions.com',
  apiKeyId: 'YourAPIkey',
  secretApiKey: 'YourAPISecret',
  integrator: 'OnlinePayments',
});

const submitBatchRequestBody = {
  header: {
    itemCount: 1,
    merchantBatchReference: 'unique-batch-reference',
    operationType: 'CreatePayout'
  },
  createPayouts: [
    {
      amountOfMoney: {
        amount: 1000,
        currencyCode: 'EUR',
      },
      cardPayoutMethodSpecificInput: {
        card: {
          cardholderName:'Jacqueline',
          cardNumber:'4111111111111111',
          expiryDate:'0228',
          cvv: '723'
        },
        paymentProductId: 1
      },
      references: {
        merchantReference: 'merchant-reference'
      }
    }
  ]
};

const submitBatchResponse = client.merchantBatch.submitBatch(
  'YourPSPID',
  submitBatchRequestBody,
  null
);
$communicatorConfiguration = new CommunicatorConfiguration(
            "yourAPIkey",
            'yourAPIsecret',
            "https://payment.preprod.direct.worldline-solutions.com",
            'yourMerchantId',
            null
        );

        $authenticator = new V1HmacAuthenticator($communicatorConfiguration);

        $communicator = new Communicator($communicatorConfiguration, $authenticator);

        $client = new Client($communicator);

        Integration steps = new BatchMetadata();
        $header->setItemCount(1);
        $header->setOperationType("CreatePayout");
        $header->setMerchantBatchReference("unique-batch-reference");

        $amountOfMoney = new AmountOfMoney();
        $amountOfMoney->setAmount(1000);
        $amountOfMoney->setCurrencyCode("EUR");

        $card= new Card();
        $card->setCardholderName("Jacqueline");
        $card->setCardNumber("4111111111111111");
        $card->setExpiryDate("0228");
        $card->setCvv("723");

        $cardPayoutMethodSpecificInput = new CardPayoutMethodSpecificInput();
        $cardPayoutMethodSpecificInput->setCard($card);
        $cardPayoutMethodSpecificInput->setPaymentProductId(1);

        $references = new PaymentReferences();
        $references->setMerchantReference("merchant-reference");

        $payout = new CreatePayoutRequest();
        $payout->setAmountOfMoney($amountOfMoney);
        $payout->setCardPayoutMethodSpecificInput($cardPayoutMethodSpecificInput);
        $payout->setReferences($references);

        $requestBody = new SubmitBatchRequestBody();
        $requestBody->setHeader(Integration steps);
        $requestBody->createPayouts = [$payout];

        $submitBatchResponse = $client->merchant("yourPSPID")->merchantBatch()->submitBatch($requestBody);
communicator_configuration = CommunicatorConfiguration(
            api_endpoint="https://payment.preprod.direct.worldline-solutions.com",
            api_key_id="YourAPIkey",
            secret_api_key="YourAPISecret",
            authorization_type="v1HMAC",
            integrator="YourCompanyName",
            connect_timeout=5000,
            socket_timeout=10000,
            max_connections=10
        )

        communicator = Factory.create_communicator_from_configuration(communicator_configuration)

        client = Factory.create_client_from_communicator(communicator)

        header = BatchMetadata()
        header.item_count = 1
        header.operation_type = "CreatePayout"
        header.merchant_batch_reference = "unique-batch-reference"

        amountOfMoney = AmountOfMoney()
        amountOfMoney.amount = 1000
        amountOfMoney.currency_code = "EUR"

        references = PaymentReferences()
        references.merchant_reference = "merchant-reference"

        card = Card()
        card.cardholder_name = "Jacqueline"
        card.card_number = "4111111111111111"
        card.expiry_date = "0228"
        card.cvv = "723"

        cardPayoutMethodSpecificInput = CardPayoutMethodSpecificInput()
        cardPayoutMethodSpecificInput.card = card
        cardPayoutMethodSpecificInput.payment_product_id = 1

        payout = CreatePayoutRequest()
        payout.amount_of_money = amountOfMoney
        payout.card_payout_method_specific_input = cardPayoutMethodSpecificInput
        payout.references = references

        requestBody = SubmitBatchRequestBody()
        requestBody.header = header
        requestBody.create_payouts = [payout]

        submitBatchResponse = (client.merchant("YourPSPID").merchant_batch().submit_batch(requestBody))
communication_configuration = OnlinePayments::SDK::CommunicatorConfiguration.new(
    integrator: "OnlinePayments",
    api_endpoint: "https://payment.preprod.direct.worldline-solutions.com",
    api_key_id: "yourAPIkey",
    secret_api_key: "yourAPIsecret",
    authorization_type: "v1HMAC",
    connect_timeout: 5000,
    socket_timeout: 10000,
    max_connections: 10
  )

  client = OnlinePayments::SDK::Factory.create_client_from_configuration(communication_configuration)

  header = Domain::BatchMetadata.new
  header.item_count = 1
  header.merchant_batch_reference = "unique-batch-reference"
  header.operation_type = "CreatePayout"

  references = Domain::OrderReferences.new
  references.merchant_reference = "merchant-reference"

  amount_of_money = Domain::AmountOfMoney.new
  amount_of_money.amount = 1000
  amount_of_money.currency_code = "EUR"

  card = Domain::Card.new
  card.cardholder_name = "Jacqueline"
  card.card_number = "4111111111111111"
  card.expiry_date = "0228"
  card.cvv = "723"

  card_payout_method_specific_input = Domain::CardPayoutMethodSpecificInput.new
  card_payout_method_specific_input.card = card
  card_payout_method_specific_input.payment_product_id = 1

  payout = Domain::CreatePayoutRequest.new
  payout.amount_of_money = amount_of_money
  payout.card_payout_method_specific_input = card_payout_method_specific_input
  payout.references = references

  request_body = Domain::SubmitBatchRequestBody.new
  request_body.header = header
  request_body.create_payouts = [payout]

  submit_batch_response = client.merchant("yourPSPID").merchant_batch.submit_batch(request_body)

Reporting et statut instantanné

Vous pouvez suivre les transactions Batch via le e-Portal.

Le e-Portal propose un reporting détaillé via des :

  • Rapports immédiats pour un suivi en quasi temps-réel des transactionset pour les investigations.
  • Rapports planifiés pour le reporting récurrent, la réconciliation et les exportations de données volumineuses.

Les fonctionnalités de reporting disponibles incluent :

  • Le Reporting au niveau transactionne;
  • Les Totaux agrégés des transactions;
  • Les Reporting des Captures;
  • La Livraison automatisée des rapports via SFTP;

Veuillez vous reporter au chapitre du guide e-Portal pour plus d'information.

Contactez votre représentant Worldline si vous avez besoin d'accéder à ces fonctionnalités du e-Portal.

Cette page vous a-t-elle été utile ?

Avez-vous des commentaires ?

Merci pour votre réponse.
New Feature

Try out our new chatbot and find answers to all your questions.