-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_payment_request.go
45 lines (44 loc) · 5.44 KB
/
model_payment_request.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* Payrobot
*
* # Introduction Accept, store, send or forward Bitcoin, Litecoin and Bitcoin Cash for your website or app and protect your privacy. Supported crytocurrencies: * BTC Bitcoin * LTC Litecoin * BCH Bitcoin Cash ## Benefits * **Anonymous** No personal details are required and transactions are mixed among all payments. You can forward your payments so as soon payrobot.io receives it forwards it to another address under your control. * **No Registration** No registration, sign-up, application or form required to use payrobot.io * **Easy Integration** Integrate your web / app through our simple RESTful API, you can accept payments with just one line of code! * **Instant Payment Notification** Our servers notify your web / app the status of your payments. No polling, daemons or cronjobs required on your side! * **Secure** Payrobot.io works with SSL and bank-level security protocols. Your transactions are safe! ## Features **Payment Forward** Generate one-time addresses to recieve payments. Payrobot will notify your web /app through callbacks (webhooks) the status of the payment. As soon as it's confirmed the payment is forwarded to your desired address. **Wallet** Receive, send payments and store your coins in a secure, private and anonymous wallet. All events are notified to your web / app through callbacks (webhooks). You can generate wallets with just one line of code without registration or further information ## Fees **Only 0.90% per inbound transaction** (receive payments), NO HIDDEN FEES. All outbound transactions (send funds) are totally free. Minimum fees applies, therefore the largest amount is going to be considered as fee either: `(inboundAmount*feePct)` or `the minimum fee` **Inbound Fees (Receive payments)** - `Bitcoin` 0.90% *(Minimum fee 0.00005 BTC)* - `Litecoin` 0.90% *(Minimum fee 0.0005 LTC)* - `Bitcoin Cash` 0.90% *(Minimum fee 0.0005 BCH)* **Outbound Fees (Send funds)** - `Bitcoin` 0.00% - `Litecoin` 0.00% - `Bitcoin Cash` 0.00% ## Rate Limit To guarantee the good performance of the service and its fair use. The API is **limited to receiving 120 requests per minute per IP**, which is sufficient for most use cases. Payrobot.io is asynchronous in most API methods to communicate with your application through callbacks (webhooks), thus reducing unnecessary calls to the service. **If the limit is exceeded, the IP will be banned for 1 minute.** If you require an upper limit for your application, do not hesitate to contact us ## Considerations * Amounts in responses are expresed as `strings` * Wallets are not multi-currency, you have to create a different wallet per cryptocurrency (You can't store Litecoin in a Bitcoin wallet and vice-versa) * Payment forwarding has to be of the same type of currency (You can't forward a Bitcoin Cash payment to a Bitcoin address and vice-versa)
*
* API version: 1.0
* Contact: contact@payrobot.io
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package payrobot
// PaymentRequest struct for PaymentRequest
type PaymentRequest struct {
Currency CryptoCurrency `json:"currency,omitempty"`
// Unique identifier of the payment in selected currency
PaymentId string `json:"paymentId,omitempty"`
// One-use address for receive your client payment
Address string `json:"address,omitempty"`
// PIN, it will be required if you need support with this payment.\\ *Note: It's provided only the first time you create the payment request*
Pin string `json:"pin,omitempty"`
// * `0: Receive and forward` payment is forwarded to a desired coin address once it's confirmed * `1: Receive and store` payment is stored in a payrobot.io wallet
Type int32 `json:"type,omitempty"`
// The payment amount your client has to send to the coin address
Amount string `json:"amount,omitempty"`
// URL where payrobot.io will send the status of the payment (Webhook)
Callback string `json:"callback,omitempty"`
// Fee percentage that will be discounted
FeePct float32 `json:"feePct,omitempty"`
// Fee amount that will be discounted
FeeAmount string `json:"feeAmount,omitempty"`
// Final amount of the transaction (Fee discount is already applied) * For `Receive and forward` payment is the total amount to `forward` as soon as the payment is confirmed * For `Receive and forward` payment is the total amount to `store` in the wallet as soon as the payment is confirmed
FinalAmount string `json:"finalAmount,omitempty"`
// * For `Receive and forward` payment is the coin `ADDRESS` where the payment is going to be forwarded as soon as it's confirmed * For `Receive and store` payment is the `WALLET ID` where the payment is going to be stored as soon as it's confirmed
Destination string `json:"destination,omitempty"`
// Custom reference for payment identifying
Reference string `json:"reference,omitempty"`
// Request creation date expressed in UNIX timestamp
Timestamp int32 `json:"timestamp,omitempty"`
// Last update expressed in UNIX timestamp
Lastupdate int32 `json:"lastupdate,omitempty"`
// Status of the payment: * `0: Idle` payment has not been paid * `1: Incomplete` payment is being paid partially * `2: Confirming` payment has been received completely but it's not confirmed by network yet * `3: Confirmed` payment has been paid completely and it has at least `1` confirmation by network
Status int32 `json:"status,omitempty"`
// `true` is there was a problem. `false` if not
Error bool `json:"error,omitempty"`
}