New endpoint, same authentication
To create a payment request, use the new /payments/v1/requests endpoint. The authentication mechanism is the same as for /v2/invoices/create.See the full API endpoint documentation
Learn the new parameters and see a full request example
Currencies with networks
The way the currencies are represented in the payment requests API is different from the invoices API. Each field is now an object, not a plain string.- Inside currency, set iso to the code of the currency you want to receive. If it is a cryptocurrency, also specify the network_name.
- Inside the optional payment_currency, set iso to the code of the cryptocurrency you want the customer to pay. You may also specify the network_name — or omit it and let the customer choose the network themselves.
Invoice
Payment request
See the currency codes for payment requests
Learn the ISO codes and available network names for the API calls
Flexible payment lifetime
Unlike invoices, which offer either a fixed 15-minute timer or unlimited time, payment requests let you configure the lifetime to fit your business needs.| Invoice | Payment request | |
|---|---|---|
| Either 15 minutes or unlimited time to choose the currency | → | Between 5 minutes and 60 days as the overall lifespan |
| Up to 15 minutes for the transactions to be created + 24 hours for the transactions to be confirmed | → | Up to 1 hour for the transactions to be created and confirmed (cannot exceed the lifespan) |
Invoice
Payment request
Read more about the payment request timers
Learn how lifespan and rate_mode fields affect the payment request behavior
Two modes of currency pre-selection
For a payment request with both the currency and the network pre-selected, the new rate_mode parameter determines what the customer sees on the page.- Standard mode (the default): the customer still sees a page that describes the requested amount, the conversion rate, the processing fee (if you pass the fees to the customer), and the total amount to pay. On the same page, the customer is asked to enter their email address and KYC data (unless you provided it yourself).
- Fixed mode: the customer skips the first step entirely and goes straight to the payment details. The customer’s email address and the KYC data must be provided by you when creating the payment request. This is the closest equivalent of an invoice with timer and sender_currency. The lifespan of a fixed payment request never exceeds 1 hour, because the rate lock timer starts immediately after creation. A fixed payment request generates a crypto address immediately, before any interaction with the customer. If you want to show it to the customer in your own interface, you can find it as payment_details.address in the API response.
Invoice
Payment request
Read more about fixed payment requests
Learn how to skip the currency selection step for the customer
Underpayment tolerance
By default, CryptoProcessing always expects a customer to send the full requested amount of funds, and failing to do so triggers the automatic refund mechanism. If you used to allow partial pay in your invoices (by setting type to “good_until_expired”), you may want to change the default behavior. To do so, configure a custom underpayment tolerance in your merchant settings. This will let you accept payments that are less than requested by a specific amount. Setting the tolerance to 100% would be an equivalent to applying the partial pay mode to all your payment requests.Read more about underpayment handling
Learn how to set up an underpayment tolerance for payment requests
Other changes
- A payment request doesn’t have a title but may still have a description. Similar to an invoice, the customer can find the description in the “Payment details” dialog on the payment page.
- The payment request API accepts url_store — a link that, if provided, will be displayed under the payment form as “Return to merchant”. See Backlinks.
- Unlike an invoice, a payment request cannot be canceled until either the payment arrives or the timer expires.
- There is an option to pass the processing fees to the customer.
- There is an option to limit the currencies available to customers.
Migration checklist
Request
Request
- currency: pass an object using the new notation.
- sender_currency → payment_currency, pass an object using the new notation.
- type: remove. To accept partial payments, configure underpayment tolerance in your merchant settings.
- timer → life_time_duration or life_time_date_time. See Flexible payment lifetime.
- title: remove.
- email_user → end_user_email
Response
Response
- id: make sure to expect a UUID instead of a number.
- url → payment_link
- address → payment_details.address.value
- tag → payment_details.address.tag
- title: removed.
- status: process according to payment request statuses.
- currency: process according to the new notation.
- sender_currency → payment_currency, process according to the new notation.
- sender_amount → payment_details.expected_amount
- fixed_at: removed.
- release_at → life_time or valid_until. See Flexible payment lifetime.
- seconds_left: removed.
Callback
Callback
- id → payment_request_id
- type: now always equals to “payment_request”.
- currency_received.currency: process according to the new notation.
- transactions[]: some fields were changed or removed. Make sure to expect the new currency notation in currency and use status instead of confirmations.
- fees[].currency: process according to the new notation.
- error → status_reason
- status: process according to payment request statuses.
- crypto_address → payment_request_address: some fields were changed. Make sure to expect a UUID as the id and the new currency notation in currency and convert_to.
- currency_sent.currency: process according to the new notation.
- currency_sent.amount → currency_sent.received_amount
Read the full API endpoint documentation
/payments/v1/requests
Read the full API callback documentation
payment_request