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.
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.
Your API key.
The request body, signed with HMAC-SHA512 with your secret key. You can find the secret key in your account.
For partial pay invoices, set this parameter to good_until_expired. For standard invoices, use fill_or_kill or leave this parameter empty.
Permanent ID of the customer in your system. Must not contain personal data, such as the user's name or email address. Include this customer's data in the sender_data object.
If this parameter is set to true, the invoice will expire in 15 minutes after it is created.
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.
Currency you want to receive deposits in. For a list of all available currencies, see Supported currencies.
Currency of the customer's invoice payment. Invoices with a timer and a pre-selected currency will be externalized at the time of sending this parameter with 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.
Whether the sender is a natural person (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
}
}Last updated
Was this helpful?