- 26 Apr 2024
- 1 Minute to read
- Print
- DarkLight
Create Digital Payment Request
- Updated on 26 Apr 2024
- 1 Minute to read
- Print
- DarkLight
Unlike other payment methods you do not use your Payment API key for DPR payments. This is because you are not calling the payment endpoint directly. Instead, you are creating a link to a Access PaySuite’s hosted page which will display a summary page with the details of the payment request, and then call the payment endpoint internally.
The first step is to send a Create Payment Request. This will return a link that can either be sent to the customer via email, or can be provided to the customer by the ISV e.g. via live chat, SMS or their own email system.
Example Code
curl --location 'https://api.test.pay360evolve.com/demo/pf-api-gateway/apiGateway//paymentRequestService/paymentRequests/EVOLVE/<ISVID>/<MERCHANTID>' \
--header 'jwt: <API KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"attended": false,
"currency": "GBP",
"customer": {
"email": "example@example.com"
},
"deliveryMethods": [
"EMAIL"
],
"description": "test",
"expiresAt": "2023-03-25T17:08:29Z",
"merchantId": "<MERCHANTID>",
"ownerId": "<ISVID>",
"paymentGateway": "EVOLVE",
"reference": "XYZ-12345678",
"sendManually": false,
"totalAmount": 10.25,
"type": "PAYMENT"
}'
If you are intending to use the Evolve facility to email the link to the customer you will need use the Send An Email With Payment Request endpoint once the Payment Request has been created. For this to be successful you will need to have set customer.email to the email you want to use, set deliveryMethods to [“EMAIL”] and set sendManually to false.
Example Code – Send Email with Payment Request
curl --location --request POST 'https://api.test.pay360evolve.com/demo/pf-api-gateway/apiGateway//paymentRequestService/paymentRequests/EVOLVE//<ISVID>/<MERCHANTID>/<PAYMENTREQUESTID>/send' \
--header 'jwt: <API KEY>'