Create a payment link
Creates a link to the hosted payment page that you can send to your customer, for example by email or in an invoice. Every time your customer opens the link and tries to pay, Paytrim creates a new order, up to 25 attempts.
See Payment links.
apiKeyAuthorizationBasic <token>Use your project's API key as the username and leave the password empty. Only use the API key from your server: it gives full access to your project.
application/json- body
merchant_order_id*stringYour own order reference.
amount*AmountAmount in the smallest currency unit, including VAT. 1234 is € 12.34. For currencies without minor units, send the whole amount.
0 <= valuecurrency*CurrencyISO 4217 currency code, such as EUR, GBP or USD. Get supported currencies lists the currencies of your project.
^[A-Z]{3}$description?stringDescription of the payment. Without it, the orders have no description.
payment_methods?array<>Payment methods to show on the hosted payment page. Without it, every active payment method is shown.
expiration_period?DurationHow long the link stays valid, such as P20D for 20 days. The default is 30 days.
return_url?stringWhere your customer goes after paying.
uriwebhook_url?stringWhere status changes of the orders created from the link are sent.
uriThe payment link has been created.
application/json- response
id?stringPayment link ID.
uuidproject_id?stringuuidmerchant_id?stringuuidmerchant_order_id*stringYour own order reference.
amount*AmountAmount in the smallest currency unit, including VAT. 1234 is € 12.34. For currencies without minor units, send the whole amount.
0 <= valuecurrency*CurrencyISO 4217 currency code, such as EUR, GBP or USD. Get supported currencies lists the currencies of your project.
^[A-Z]{3}$description?stringDescription of the payment. Without it, the orders have no description.
payment_methods?array<>Payment methods to show on the hosted payment page. Without it, every active payment method is shown.
expiration_period?DurationHow long the link stays valid, such as P20D for 20 days. The default is 30 days.
return_url?stringWhere your customer goes after paying.
uriwebhook_url?stringWhere status changes of the orders created from the link are sent.
uripayment_url?stringThe link to send to your customer.
uristatus?stringnew: your customer hasn't tried to pay yet.processing: a payment is in progress.all_unsuccessful: every attempt so far failed. Your customer can try again until the link expires.completed: one of the attempts succeeded.expired: the link expired without a successful payment.
"new""processing""completed""expired""all_unsuccessful"reason?stringWhy the link has its current status.
completed_order_id?stringID of the order that was paid.
uuidorders?IDs of the orders created from the link, grouped by order status.
created?TimestampDate and time in ISO 8601 format.
date-timemodified?TimestampDate and time in ISO 8601 format.
date-timecompleted?TimestampDate and time in ISO 8601 format.
date-timecurl -X POST 'https://api.pay.paytrim.com/v1/paymentlinks/' \ -H 'Content-Type: application/json' \ -d '{ "merchant_order_id": "EXAMPLE001", "amount": 995, "currency": "EUR", "description": "Invoice EXAMPLE001", "expiration_period": "P20D", "payment_methods": [ "credit-card", "apple-pay", "google-pay" ], "return_url": "https://www.example.com/thank-you", "webhook_url": "https://www.example.com/webhook"}'{ "id": "a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7", "project_id": "05ad138f-52fa-40dc-9751-5fde949dcb57", "merchant_id": "b251b220-5d8b-4b9d-9915-b89676dc0948", "merchant_order_id": "EXAMPLE001", "amount": 995, "currency": "EUR", "description": "Invoice EXAMPLE001", "expiration_period": "P20D", "payment_methods": [ "credit-card", "apple-pay", "google-pay" ], "payment_url": "https://api.pay.paytrim.com/paylink/a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7/", "created": "2026-10-12T15:39:12.773776+00:00", "orders": {}, "status": "new", "reason": "Payment Link was created, not yet visited"}