Invoices

Create invoice

post

Create 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.

Header parameters
X-Processing-KeystringRequired

Private key

X-Processing-SignaturestringRequired

Private secret key

Body
typestring · enumOptional

For partial pay invoices, set this parameter to good_until_expired. For standard invoices, use fill_or_kill or leave this parameter empty.

Possible values:
timerbooleanRequired

Time on the rate is fixed for invoice payment (15 minutes). During this time the user has to pay an invoice.

titlestring · min: 1 · max: 50Required

Invoice title that will be displayed to the user.

descriptionstring · max: 1000Optional

Invoice description that will be displayed to the user.

foreign_idstring · max: 255Required

Unique foreign ID in your system. Must not contain personal data, such as the user's name or email address.

currencystringRequired
Currency you want to receive deposits in. For a list of all available currencies, see Supported currencies.
sender_currencystringOptional

Currency of user invoice payment (3rd type invoice will be externalized at the time of sending this parameter with timer= true).

amountnumberRequired

Invoice amount that you want to receive from the user.

url_successstring · uriRequired

URL on which we redirect the user in case of a successful invoice payment.

url_failedstring · uriRequired

URL on which we redirect the user in case of an unsuccessful invoice payment.

email_userstring · emailRequired

In case the payment amount does not match the amount stated above, we will send an email to the stated address with instructions on funds recovery. In case of underpayment, the whole amount will be refunded. In case of overpayment, user will be able to recover the difference by following the instructions.

Responses
200
OK
application/json
post
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: 254

{
  "type": "fill_or_kill",
  "timer": true,
  "title": "string",
  "description": "string",
  "foreign_id": "string",
  "currency": "BTC",
  "sender_currency": "string",
  "amount": 0,
  "url_success": "http://example.com",
  "url_failed": "http://example.com",
  "email_user": "[email protected]"
}
{
  "data": {
    "id": 123732,
    "url": "https://invoices.morpheus.getcurrencies.com/invoice/6rKzdo",
    "foreign_id": "test_foreign_id",
    "address": "2N2xtaZCNygY3iq6XKPJsdoPMDX85LUc8SM",
    "title": "test title",
    "status": "pending",
    "currency": "BTC",
    "amount": "0.01230000",
    "sender_currency": "BTC",
    "sender_amount": "0.01230000",
    "fixed_at": 1667895345,
    "release_at": 1667896245,
    "seconds_left": 899
  }
}

Was this helpful?