Invoices
Create an invoice for the client for a specified amount. Make sure that the
URLs that you provide in the url_success
and url_failed
fields use the
secure HTTPS protocol, use domain names (not IP addresses) and are
considered clean by VirusTotal and similar scanners.
Note: Cryptoprocessing is required to collect sender data in compliance with the MiCA regulations. For more details, see About user data collection.
The end_user_reference
parameter is used to group, track and analyse transactions made by a specific customer. To prevent transactions from getting delayed or cancelled, always make sure to include the correct ID. The ID must not contain any personal or identifying customer data.
If you do not provide sender data in the request, the invoice will still be created, but your customer will be prompted for their data on the invoice form. If the customer is already registered in your system, include their end_user_reference
and the sender_data
object for a smoother user experience.
Warning: For invoices with a timer and pre-selected currency, sender_type
and sender_data
are required.
Private key
Private secret key
For partial pay invoices, set this parameter to good_until_expired. For standard invoices, use fill_or_kill or leave this parameter empty.
sender_data
object.Invoice title that the customer will see.
Invoice description that the customer will see.
Unique foreign ID in your system. Must not contain personal data, such as the user's name or email address.
timer
set to true.Invoice amount that you want to receive from the customer.
The URL the customer will be redirected to in case of a successful invoice payment.
The URL the customer will be redirected to in case of an unsuccessful invoice payment.
If the amount the customer pays does not match the amount you set for the invoice, Cryptoprocessing will send an email to this address instructing the customer on how they can receive a refund. If they paid less, they will receive a full refund. If they paid more, the customer will get instructions on how to be refunded the difference.
natural
) or a legal entity (legal
). If you include the sender_type
parameter in the request, sender_data
is also required.OK
Bad key header
POST /api/v2/invoices/create HTTP/1.1
Host: app.cryptoprocessing.com
X-Processing-Key: text
X-Processing-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 161
{
"timer": false,
"title": "Invoice Title",
"currency": "EUR",
"amount": 106.75,
"foreign_id": "user_196",
"end_user_reference": "12345",
"url_success": "https://example.com/success",
"url_failed": "https://example.com/failed",
"email_user": "[email protected]",
"sender_type": natural,
"sender_data": {
"first_name": "Friedrich",
"last_name": "Müller",
"date_of_birth": "1995-08-17"
}
}
{
"data": {
"id": 127,
"url": "https://wallet.coinspaid.com/invoice/iEU3uh",
"foreign_id": "user_196",
"end_user_reference": 12345,
"address": "2N2xtaZCNygY3iq6XKPJsdoPMDX85LUc8SM",
"title": "Invoice 171",
"status": "created",
"currency": "EUR",
"amount": "0.106.75000000",
"sender_currency": null,
"sender_amount": null,
"fixed_at": null,
"release_at": null,
"seconds_left": null
}
}
Was this helpful?