To generate a payment link with our API function ‘generate_url’ please look at the code example here.
TIP You can open the file with notepad, if you do not have an editor for viewing source code.
When you run the code by uploading it to your server and navigating to it, you will see the following input form:
If you’re unsure of how to fill in the form, please look at the table below:
The request parameters are written in italic
|MerchantID (merchantid)||The merchantid for the merchant that should receive the payment.|
|Comments (comments)||Additional comments for the transaction|
|Language (lang)||The ISO-639 or ISO-3166 code for the language that should be used in the payment window.|
|OrderID (orderid)||The order id to be displayed on the payment. typically from the webshop.|
|Currency Code (CurrencyCode)||The ISO-4217 code for the currency that the payment should be paid in.|
|Amount (amount)||The amount to be paid by the consumer in the subunit of the chosen currency.|
|Time (time)||Unix timestamp of when the payment link was made.|
|Accept URL (accepturl)||The url to return the user to after the payment is processed.|
|Shopplatform (shopplatform)||The platform that the order was made on. WooCommerce, Shopify etc.|
|Creditcard type (cardmethod)||Redirect user directly towards the correct payment window (1=Visa, 2=MasterCard) deprecated|
When you submit you get a JSON response with the payment link url.
When the purchaser clicks the link the purchaser is then taken to the payment window to complete the payment. Upon completion the purchaser is forwarded to the accepturl, along with the following callback:
|uxtime||Unix timestamp of the moment the Callback was created|
|MerchantNumber||The id for the merchant to receive the payment.|
|tid||PaymentID for the transaction, this is needed for ‘Capture Payment’|
|tchecksum & checksum||SHA1 (PaymentID + Integrationcode)|
|orderid||OrderID from the Webshop|
|ShopPlatform||The shop platform used to pay with Yourpay|
|amount||The amount that has been paid by the purchaser, displayed in the subunit of the currency the payment was made in.|
|date||Date stamp for the payment.|
|cvc||Always empty string|
|expmonth||Expiration month for the credit card.|
|expyear||Expiration year for the credit card.|
|tcardno||Hashed card number. The first six & the last four digits of the card are sent the rest is replaced with X|
|time||Unix timestamp of the moment the payment was processed. This is needed for ‘Capture Payment’|
|cardid||The Card type used, e.g. VISA, Mastercard etc.|
|currency||ISO 4217 code for the currency used in the payment.|
The merchant is now able to see his/her payment in our admin portal.