Example description: Payment with many customers
Fill the form with a valid email.
paymentRequestId:
- Curl
- PHP
curl -v paymentRequest \
-u '1c1b28f2-a84b-4b30:VJezNXV9Wz#A' \
-F paymentMethod[]='TRANSACTION' \
-F currency='EUR' \
-F totalAmount=290000 \
-F breakdown[]='{"email":"","amount":}' \
-F breakdown[]='{"email":"","amount":}' \
-F breakdown[]='{"email":"","amount":}' \
-F scenarioId='' \
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://test-api.centralpay.net/v2/rest/paymentRequest');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$post = array(
'paymentMethod[]' => 'TRANSACTION',
'currency' => 'EUR',
'totalAmount' => '',
'breakdown[]' => '{"email":"","amount":}'
'breakdown[]' => '{"email":"","amount":}'
'breakdown[]' => '{"email":"","amount":}'
'scenarioId' => '15ab3df7-edbb-43e1-801a-61b1763043f3',
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_USERPWD, '1c1b28f2-a84b-4b30' . ':' . 'VJezNXV9Wz#A');
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
<form method="post" data-centralpay="form" action="https://example.centralpay.net/v2/process/request">
<div data-centralpay="errors"></div>
<div class="row mx-0 text-center">
<div class="col-4 px-0">
<div class="card card-offer">
<div class="card-header">
<label for="amount0">
<span data-display="offer-name">Basic</span>
</label>
</div>
<div class="card-body">
<p class="text-price">
<span data-display="amount">1900</span>
<span data-display="currency-symbol">,00€</span>
</p>
<input type="radio" name="amount" id="amount0" value="190000" data-select="amount" required ng-model="totalAmount" disabled/>
</div>
</div>
</div>
<div class="col-4 px-0">
<div class="card card-offer card-primary">
<div class="card-header">
<label for="amount1">
<span data-display="offer-name">Standard</span>
</label>
</div>
<div class="card-body">
<p class="text-price">
<span data-display="amount">2900</span>
<span data-display="currency-symbol">,00€</span>
</p>
<input type="radio" name="amount" id="amount1" value="290000" data-select="amountfff" ng-model="totalAmount" ng-init="totalAmount='290000'" checked="checked" />
</div>
</div>
</div>
<div class="col-4 px-0">
<div class="card card-offer">
<div class="card-header">
<label for="amount2">
<span data-display="offer-name">Premium</span>
</label>
</div>
<div class="card-body">
<p class="text-price">
<span data-display="amount">3900</span>
<span data-display="currency-symbol">,00€</span>
</p>
<input type="radio" name="amount" id="amount2" value="390000" data-select="amount" ng-model="totalAmount" disabled />
</div>
</div>
</div>
</div>
<p data-form="main-description" class="mt-3 mb-0">Breakdown 1</p>
<div class="form-row" data-form="breakdown-validation">
<div class="form-group col-12">
<div class="has-feedback input-group has-amount">
<div class="input-group-prepend">
<div class="input-group-text">
<div class="ico ico-envelope"></div>
</div>
</div>
<input data-centralpay="email_1" type="email" name="email_1" ng-model="email_1" autocomplete="off" class="form-control" data-form="email_1" placeholder="E-mail" required="required" />
<input data-centralpay="amount_1_front" type="text" name="amount_1_front" ng-model="amount_1_front" autocomplete="off" class="text-right" data-form="amount_1_front" ng-init="amount_1_front='1400,00 €'" placeholder="Montant" readonly required="required" tabindex="-1" />
<input type="hidden" name="amount_1" ng-model="amount_1" value="140000" ng-init="amount_1='140000'" />
</div>
</div>
</div>
<p data-form="main-description" class="mt-2 mb-0">Breakdown 2</p>
<div class="form-row" data-form="breakdown-validation">
<div class="form-group col-12">
<div class="has-feedback input-group has-amount">
<div class="input-group-prepend">
<div class="input-group-text">
<div class="ico ico-envelope"></div>
</div>
</div>
<input data-centralpay="email_2" type="email" name="email_2" ng-model="email_2" autocomplete="off" class="form-control" data-form="email_2" placeholder="E-mail" required="required" />
<input data-centralpay="amount_2_front" type="text" name="amount_2_front" ng-model="amount_2_front" autocomplete="off" class="text-right" data-form="amount_2_front" ng-init="amount_2_front='1000,00 €'" placeholder="Montant" readonly required="required" tabindex="-1" />
<input type="hidden" name="amount_2" ng-model="amount_2" value="100000" ng-init="amount_2='100000'" />
</div>
</div>
</div>
<p data-form="main-description" class="mt-2 mb-0">Breakdown 3</p>
<div class="form-row" data-form="breakdown-validation">
<div class="form-group col-12">
<div class="has-feedback input-group has-amount">
<div class="input-group-prepend">
<div class="input-group-text">
<div class="ico ico-envelope"></div>
</div>
</div>
<input data-centralpay="email_3" type="email" name="email_3" ng-model="email_3" autocomplete="off" class="form-control" data-form="email_3" placeholder="E-mail" required="required" />
<input data-centralpay="amount_3_front" type="text" name="amount_3_front" ng-model="amount_3_front" autocomplete="off" class="text-right" data-form="amount_3_front" ng-init="amount_3_front='500,00 €'" placeholder="Montant" readonly required="required" tabindex="-1" />
<input type="hidden" name="amount_3" ng-model="amount_3" value="50000" ng-init="amount_3='50000'"/>
</div>
</div>
</div>
<input data-centralpay="isPartial" type="checkbox" id="isPartial" name="isPartial" ng-model="isPartial" ng-init="isPartial=false" data-form="isPartial" style="display:none;">
<input type="hidden" name="currency" value="EUR" ng-model="currency" ng-init="currency='EUR'" />
<input type="hidden" name="paymentMethod" value="TRANSACTION" ng-model="paymentMethod" ng-init="paymentMethod='TRANSACTION'" />
<input type="hidden" name="scenarioId" id="scenarioId" ng-model="scenarioId" value="15ab3df7-edbb-43e1-801a-61b1763043f3" ng-init="scenarioId='15ab3df7-edbb-43e1-801a-61b1763043f3'">
<div class="text-center mt-2">
<button class="btn btn-cpay" type="submit" value="submit" data-form="submit" data-toggle="popover" data-placement="bottom" data-trigger="hover"> Pay <div class="np-loader"></div>
</button>
</div>
</form>
×
Check your Mailbox!
The details of the Payment Request has been sent to each recipient
The details of the Payment Request has been sent to each recipient