Payment Links

Payment links are also available to be generated by API, instead of just the dashboard. Note that payment links are available for 30mins after creation.

Architecture

Live environment: api.cycopay.com/api/public/payment/create


Test environment: sandboxapi.cycopay.com/api/public/payment/create

Test API Key: 7ef48bc4-1c7a-479f-b1a3-492cc2f6e58c

Test data:

Card NumberCVVResponse
4242424242424242anySuccessful card transaction.

All following parameters have to be sent in json format.


Parameters

NameType#Description
apiKeyStringRequiredYour merchant's API key.
amountFloatRequiredTotal order amount. Must be equal or above 1.
webhookURLStringRequiredThe URL that we will send an IPN notification to after a successful payment.
successURLStringRequiredsuccess URL where the user will be redirected after a successful payment.
failureURLStringRequiredfailure URL where the user will be redirected after a failed payment.
descriptionStringRequiredDescription of the payment. Can be any string.
emailStringOptionalAutofilling email field to improve conversion.
fullNameStringOptionalAutofilling full name field to improve conversion.
currencyStringRequiredCurrency from https://www.bnr.ro/mobile_fxr.aspx
metadataStringOptionalObject that the server will send back to you after a successful payment

Try it with postman

Response

HTTP StatusResponseDescription
200 Success"status": "success"The modal will open an render data.
400 Bad Request"status": "fail", "response": "Invalid parameter/s"Missing or invalid parameter/s has been passed.
401 Unauthorized"status": "fail", "response": "Invalid merchant's API key"API Key is wrong or deactivated. Check your key status in the dashboard.

You're done 🥳 Just add a listener in your application for our webhooks in order to confirm payments.

Test webhooks

Test your webhooks at our webhooks guide.

Retrieve status

Live environment: api.cycopay.com/api/public/payment/status


Test environment: sandboxapi.cycopay.com/api/public/payment/status

Test API Key: 7ef48bc4-1c7a-479f-b1a3-492cc2f6e58c

Parameters

NameType#Description
apiKeyStringRequiredYour merchant's API key.
descriptionStringRequiredDescription of the payment. Can be any string.
idStringRequiredURL's ID you got from the create payment link step.

Response

HTTP StatusResponseDescription
200 Success"status": "paid"The payment link has been paid.
200 Success"status": "due", "response": "Invalid parameter/s"The payment link is expecting a payment.
200 Success"status": "canceled", "response": "Invalid merchant's API key"The payment link has expired due to absence of payment.
400 Bad Request"status": "fail", "response": "Invalid parameter/s"Missing or invalid parameter has been passed.
401 Unauthorized"status": "fail", "response": "Invalid merchant's API key"API Key is wrong or deactivated. Check your key status in the dashboard.