Menu

Cas d'usage

Demande de paiement unitaire

Il s’agit d’une demande de paiement à une transaction comprenant un montant et une devise. Elle reste associée à un scénario permettant de gérer les cas définis par l’utilisateur.

Règlement simple d’un montant unique :

  • Montant
  • Devise
  • Langue

Exemple cURL :

curl -v https://test-api.centralpay.net/v2/rest/paymentRequest \
-u 'doctest:4I9HJRTd' \
-F paymentMethod[]='TRANSACTION' \
-F currency='EUR' \
-F totalAmount=100000 \
-F partial=false \
-F breakdown[]='{"amount":100000, "email":"johnDoe@hotmail.com"}' \
-F transfer[]='{"destinationWalletId":"10cfe034-ba9a-457e-b13d-fc68a5bfd171", "amount":100000, "email":"johnDoe@hotmail.com"}'

Réponse JSON :

{ 
 "paymentRequestId": "cd80f9c9-d121-44a6-a6a9-3f775a5acff8",
 "creationDate": "2020-08-13T15:34:02.004118+02:00",
 "pointOfSaleId": "cfc0b3c7-e666-4c52-b77a-96f234b873fe",
 "deadline": null,
 "linkExpirationDate": null,
 "endingDate": null,
 "scenarioId": null,
 "paymentFormTemplateId": null,
 "merchantPaymentRequestId": null,
 "description": null,
 "currency": "EUR",
 "totalAmount": 100000,
 "paymentRequestStatus": "ACTIVE",
 "paymentStatus": "UNPAID",
 "createCustomer": false,
 "paymentMethods": [ "TRANSACTION" ],
 "transaction": { 
  "paymentRequestTransactionId": "2f813571-dc15-4149-a39c-0a671d301bb2",
  "contractId": "71602dd0-2790-4743-877b-e72530d7576d",
  "receiptEmail": null,
  "source": "EC" 
 },
 "installment": null,
 "subscription": null,
 "breakdowns": [
  { 
   "paymentRequestBreakdownId": "4dc27147-4d46-4b68-ba2f-49f6f3a8871b",
   "customerId": null,
   "lastEnteringDate": null,
   "lastPaymentAttempt": null,
   "amount": 100000,
   "initiator": true,
   "endpoint": "https://test-form.centralpay.net/25cd87d7-2dd8-4f08-8b78-2f84f5496ffd",
   "email": "johnDoe@hotmail.com",
   "phone": null,
   "firstName": null,
   "lastName": null,
   "entered": false,
   "paymentAttempted": false,
   "paid": null,
   "view": 0,
   "status": "UNPAID",
   "payments": [] 
  } 
 ],
 "transfers": [ 
  { 
   "destinationWalletId": "10cfe034-ba9a-457e-b13d-fc68a5bfd171",
   "escrowDate": null,
   "amount": 100000,
   "fee": 0,
   "merchantTransferId": null 
  } 
 ],
 "wireTransfer": null,
 "transferGroup": null,
 "attachments": [],
 "language": "eng",
 "redirectUrl": null,
 "closeComment": null,
 "additionalData": {} 
}