Rocketr API Reference
This website documents the public API for Rocketr Payments.
You can view code examples in the dark area to the right; switch the programming language of the examples with the tabs in the top right.
Authentication
curl -X GET -H "Content-type: application/json" -H "Authorization: <ACCESS_TOKEN>" -H "Application-ID: <Application_ID>"
https://api.rocketr.net
Once you register your application with Rocketr, you will be provided the following: Once you register your application with Rocketr, you will be provided the following:
- Application ID - this can be shared with the public.
- Application Secret - As implied by the name, this should be kept hidden from prying eyes.
Application-ID: Client ID is required and can be public.
Application-ID: Client ID is required and can be public.
To ensure the proper use of our API, we use header based authentication. Authentication is very simple, every API request must contain the "Application-ID" header
Authorization: This is the Application Secret and is not required for all requests
Authorization: This is the Application Secret and is not required for all requests
Some API requests require more secure authentication (for example, retreiving individual orders). For these requests, the "Authorization" header must also be present.
Guides
Introduction to Payments
There are two main objects that are involved in payments: Invoices and Orders.
Invoices are like bills. They represent amount owed
Invoices
Invoices are entities that contain information about a payment to be paid. They don't contain any information about how a customer can pay, they only specify how much a customer needs to pay, what he needs to pay for and who the customer is.
Orders tell a customer how they can pay for an invoice
Orders
Orders belong to invoices. An order represents a payment object. For example, if a buyer decides to click purchase now on an invoice, an order is created and the order contains payment information. One of the key features of an order is the payment method. In an invoice, you can specify which payment methods a buyer can potentially pay with. However, an order specifies exactly how a buyer will pay using one of the accepted payment methods (per the invoice).
--
The great thing about Rocketr Payments's API is that you can create an order right away---without an invoice. Rocketr will automatically create an invoice for you. This saves time and an extra API call that really isn't needed. And don't worry, when you create the order, you will receive a link to the invoice too.
How to Request a Payment
Great. Now that you understand how the difference between invoices and orders, we can learn how to request a payment.
Rocketr Payments allows you to request payments in many different ways (e.g. POS app, e-mailable invoices, etc). Here, we will cover how to request a payment with an API.
There are two main ways to request a payment with the API. The main difference between the methods stems from how you want to present the buyer with the invoice.
Request (Method 1 of requesting a payment)
<?php
$o = new \RocketrPayments\Order();
$o->setPaymentMethod(\RocketrPayments\PaymentMethods::BitcoinPayment);
$o->setAmount(12.31);
$o->setNotes('This is an test note');
$o->setBuyerEmail('saad@rocketr.net');
$o->addCustomField('internal_id', '2195342212');
$o->setIpnUrl('https://rocketr.net/webhook.php');
$result = $o->createOrder();
echo 'Please send ' . $result['paymentInstructions']['amount'] . $result['paymentInstructions']['currencyText'] . ' to ' . $result['paymentInstructions']['address'];
?>
curl -X POST
https://api.rocketr.net/orders/create
-H 'application-id: <APPLICATION_ID>'
-H 'authorization: <APPLICATION_SECRET>'
-H 'content-type: application/json'
-d '{
"amount": 10,
"currency": "BTC",
"buyerEmail": "saad@rocketr.net",
"paymentMethod": "btc",
"customFields": {
"internalCustomerId": "000212021"
}
}'
Response (Method 1 of requesting a payment)
{
"success": true,
"paymentInstructions": {
"amount": 10.00006121,
"address": "16Esi8BCkmuAzftK3KwSL1g3YrejD4GE13",
"confirms": 3,
"currencyText": "BTC",
"qrImage": "https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=bitcoin:16Esi8BCkmuAzftK3KwSL1g3YrejD4GE13?amount=10",
"orderIdentifier": "4a58bdfd9e89"
},
"orderIdentifier": "4a58bdfd9e89",
"invoiceIdentifier": "i_4146ae159854",
"links": {
"invoice": "https://rocketr.net/checkout/i_4146ae159854"
}
}
If you want the buyer to stay on your website and display the order on your website:
If you want the buyer to stay on your website, then you will have to create an order and specify the payment method the buyer will pay with. This is essential. If you don't specify the payment method, then you can't create an order.
API Request
As you can see on the right hand column, the request is made to /orders/create
and contains important information such as the buyer's e-mail address, amount the buyer needs to pay, currency, and payment method. You can learn more about the /orders/create/
request here
API Response
The response includes a paymentInstructions
object. This way, you can directly tell your customer how they can pay to complete the invoice. The paymentInstructions
object is different depending on the paymentMethod
. You can learn more about the paymentInstructions
object here
Request (Method 2 of requesting a payment)
<?php
$i = new \RocketrPayments\Invoice();
$i->addBillItem(9.99, 'Line Item 1', 10);
$i->addAcceptedPaymentMethod(\RocketrPayments\PaymentMethods::PaypalPayment);
$i->setNotes('This is an test note');
$i->setBuyerEmail('saad@rocketr.net');
$i->addCustomField('Please enter your preferred color', '', false, false, 0);
$i->addCustomField('internal_id', '2195342212', true, true, 0);
$i->setBrowserRedirect('https://google.com');
$result = $i->createInvoice();
echo "Please visit click the following link to pay the invoice: " . $result['links']['invoice'] . "\n";
?>
curl -X POST
https://api.rocketr.net/invoices/create
-H 'application-id: <APPLICATION_ID>'
-H 'authorization: <APPLICATION_SECRET>'
-H 'content-type: application/json'
-d '{
"billItems": [{
"description": "Line Item 1",
"price": 10,
"quantity": 10
}],
"acceptedPaymentMethods": ["paypal", "btc"],
"shouldCollectAddress": false,
"notes": "This is a test note",
"buyerEmail": "saad@rocketr.net",
"customFields": [
{
"name": "Please enter your preferred color",
"type": 0,
"required": false
}
],
"browserRedirect": "https://google.com"
}'
Response (Method 2 of requesting a payment)
{
"success": true,
"invoice": {
"identifier": "i_d636893f18e5"
},
"links": {
"invoice": "https://rocketr.net/checkout/i_d636893f18e5"
},
"redirctUrl": "https://rocketr.net/checkout/i_d636893f18e5"
}
If you are unsure how the buyer will pay, or don't want to display the payment information on your website:
Many times, you want to redirect the buyer away from your website to Rocketr and allow Rocketr to handle the payment experience. This is ideal for merchants who don't want to spend too much time developing their own payment flows and UI/UX to go with it.
Alternately, you might want to allow the buyer to choose the payment method and pay later (in the next couple days as opposed to right away with the method above).
API Request
The request is made to /invoices/create
and an invoice object is created. You can learn more about the /invoices/create/
request here
API Response
The response includes a link to the invoice so you can easily redirect the buyer to the payment page.
Webhooks
Webhooks are used to notify your application when there has been a change made to an order. For example, in an online video game scenario, you can use webhooks to upgrade a buyer's account once the payment has been successfully completed. At the same time, you can also use the webhooks to demote a player's account if the buyer disputed the payment. Webhooks are sent as an HTTP POST
request to the url you set. You can choose a different webhook url for different orders.
Validation
Remember you must set your
IPN Secret
in your account settings to ensure the authenticity of webhooks.
To verify the integrity of the payload, we will send an HMAC signature over a HTTP header called IPN_HASH
. The HMAC signature will be a signed json encoded POST object with your IPN secret (this setting can be changed in your account settings). You can see how to verify the signature here.
Payload
Example Payload (sent through a
POST
request)
{
"order_id": "000000000000",
"buyer_email": "saad@rocketr.net",
"buyer_ip": "127.0.0.1",
"payment_method": "4",
"invoice_amount": "2.99",
"invoice_amount_usd": "2.99",
"quantity": "1",
"purchased_at": "1519935649",
"txn_id": "ch_9P0oaVIUMVPe9wq9993Gc1sk",
"status": "4",
"custom_fields": "{\"game_username\":\"saad\"}",
"invoice_id": "000000"
}
The payload is the a JSON Object that is sent with the webhook. It contains the following items:
Atrribute | Description |
---|---|
order_id | This is a unique string of 12 characters that identifies each order. |
buyer_email | The email address of the buyer. (If the buyer email is not collected, this is the merchant's email address) |
buyer_ip | The IP Address of the buyer (note this can be in IPv4 or IPv6 format). |
payment_method | This is a number that represents the payment method used for the purchase. Please see Payment Methods for details. |
invoice_amount_usd | This is a decimal value of the amount the buyer was invoiced. |
purchased_at | Unix Timestamp of when the order was created. |
txn_id | This is a string that represents a transaction id for the payment method used to purchase the product. For example, this can refer to payapl's transaction id, btc/eth's blockchain ID, or perfect money id |
status | This is an integer value that refers to the order status. Please see Order Status for details. |
custom_fields | This is a JSON Object that contains all the custom fields that may have been associated with the order. |
invoice_id | This is a unique string of 12 characters that identifies the invoice this order is associated with. |
API Resources
Orders
The Order Object
Attribute | Type | Description |
---|---|---|
identifier | String | This is an identifier for the order. |
buyerEmail | String | This is the email of the buyer. If the send_buyer_emails flag is set true on order creation, the buyer will receive an email about the order to this email address |
buyerIp | String | The IP Address associated with the order. |
paymentMethod | PaymentMethod | The Payment Method associated with this order. Please see the PaymentMethod specifications for details. |
amount | decimal | The amount of the order. The amount is in the currency of the order. |
notes | String | Any notes about the order. |
customFields | JSON Object | Any Custom Fields associated with the order. |
status | int | The status of the order. Please see the Status specifications for details. |
purchased_at | timestamp | The timestamp when the order was created. |
countryCode | String | The country code of the IP used to create the order. |
currency | int | The currency of the order. Please see the Currency specifications for details. |
ipnUrl | String | The URL where webhooks will be sent at for this order. Please see the Webhook Guide for details. |
shippingAddress | JSON Object | The shipping address associated with the order |
POST /orders/create
This will create an invoice and order and return the payment details. The response is different depending on the type of payment method.
Accepted POST Paramters
Request
<?php
$o = new \RocketrPayments\Order();
$o->setPaymentMethod(\RocketrPayments\PaymentMethods::BitcoinPayment);
$o->setAmount(12.31);
$o->setNotes('This is an test note');
$o->setBuyerEmail('saad@rocketr.net');
$o->addCustomField('internal_id', '2195342212');
$o->setIpnUrl('https://rocketr.net/webhook.php');
$result = $o->createOrder();
echo 'Please send ' . $result['paymentInstruction']['amount'] . $result['paymentInstruction']['currencyText'] . ' to ' . $result['paymentInstruction']['address'];
?>
curl -X POST
https://api.rocketr.net/orders/create
-H 'application-id: <APPLICATION_ID>'
-H 'authorization: <APPLICATION_SECRET>'
-H 'content-type: application/json'
-d '{
"amount": 10,
"currency": "BTC",
"buyerEmail": "saad@rocketr.net",
"paymentMethod": "btc",
"customFields": {
"internalCustomerId": "000212021"
}
}'
Attribute | Type | Description | Required |
---|---|---|---|
paymentMethod | String | The Payment Method associated with this order. Please see the PaymentMethod specifications for details. | Yes |
amount | decimal | The amount of the order. The amount is in the currency of the order. | Yes |
currency | String | The currency of the order. Please see the Currency specifications for details. | No, default: Merchant base currency. |
billItems | JSON Array | This is for the invoice that will be created. Please see the BillItems specifications for details. | No, default: {} |
buyerEmail | String | This is the email of the buyer. If the send_buyer_emails flag is set true on order creation, the buyer will receive an email about the order to this email address |
No, default: Merchant email |
notes | String | Any notes about the order. | No, default: '' |
ipnUrl | String | The URL where webhooks will be sent at for this order | No, default: '' |
customFields | JSON Object | Any Custom Fields associated with the order. | false, default: {} |
buyerIp | String | The IP Address associated with the order. | No, default: IP of the requesting server |
shippingAddress | JSON Object | The shipping address associated with the order | No, default: {} |
shouldSendInvoiceEmail | boolean | If this is enabled, the buyerEmail will be sent an email on order creation and when the order is complete |
No, default: false |
Response For CryptoCurrency Orders (HTTP Code: 201)
{
"success": true,
"paymentInstructions": {
"amount": 10.00006121,
"address": "16Esi8BCkmuAzftK3KwSL1g3YrejD4GE13",
"confirms": 3,
"currencyText": "BTC",
"qrImage": "https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=bitcoin:16Esi8BCkmuAzftK3KwSL1g3YrejD4GE13?amount=10",
"orderIdentifier": "4a58bdfd9e89"
},
"orderIdentifier": "4a58bdfd9e89",
"invoiceIdentifier": "i_4146ae159854",
"links": {
"invoice": "https://rocketr.net/checkout/i_4146ae159854"
}
}
Alternative Response For Paypal Orders (HTTP Code: 201)
{
"success": true,
"paymentInstructions": {
"urlToRedirect": "https://tinyurl.com/ybccswlj",
"orderIdentifier": "b6b04d0954c5"
},
"orderIdentifier": "b6b04d0954c5",
"invoiceIdentifier": "i_0db6c9f1a318",
"links": {
"invoice": "https://rocketr.net/checkout/i_0db6c9f1a318"
}
}
Response
Please note that the response is slightly different depending on the payment method. For cryptocurrency orders, the paymentInstructions
object includes the amount of coins, the address to send to and more. For paypal orders, the paymentInstructions
object contains a urlToRedirect
key where the buyer needs to be redirected to.
GET /orders/list
This endpoint is used to retreive a list of all orders. Responses will vary depending on the payment method used.
Request
<?php
print_r(\RocketrPayments\Order::getOrders('includeTimedOut=false&perPage=10'));
?>
curl -X GET
https://api.rocketr.net/orders/list
-H 'application-id: <APPLICATION_ID>'
-H 'authorization: <APPLICATION_SECRET>'
-H 'content-type: application/json'
Accepted GET Paramters
Attribute | Type | Description | Required |
---|---|---|---|
page | int | The page of orders | No, default: 1 |
perPage | int | The number of orders to include per query. Must be between 1 and 100. | No, default: 20 |
search | string | You can search the buyer email or the order identifier |
No, default: '' |
sortBy | string | You can sort the results by: order identifier , amount , payment_method , status , or purchased_at |
No, default: order identifier |
sortMethod | string | You can sort asc (ascending) or desc (descending) |
No, default: 'asc' |
includeTimedOut | boolean | Whether or not to include timed out/unpaid orders | No, default: false |
Response (HTTP Code: 200)
{
"page": 1,
"perPage": 20,
"nextPage": 2,
"totalCount": 50,
"data": [
{
"orderIdentifier": "89f424830f72",
"invoiceIdentifier": "i_e3ae1c5927aa",
"buyerEmail": "saad@rocketr.net",
"buyerIp": "127.0.0.1",
"paymentMethod": "6",
"amount": "52.95",
"status": "0",
"purchasedAt": "2017-12-18 16:43:39",
"countryCode": "US",
"referer": "",
"notes": "",
"currency": "1",
"customFields": "[]"
},
...
]
}
GET /orders/:id/details
This endpoint is used to retreive specific information about an order. The order identifier must be sent through the request url.
Request
TODO;
curl -X GET
https://api.rocketr.net/orders/89f424830f72/details
-H 'application-id: <APPLICATION_ID>'
-H 'authorization: <APPLICATION_SECRET>'
-H 'content-type: application/json'
Response (HTTP Code: 200)
{
"orderIdentifier": "89f424830f72",
"purchasedAt": "2017-12-18 16:43:39",
"status": 0,
"orderPrice": 52.95,
"orderCurrency": "USD",
"paymentMethod": "BCH",
"buyerEmail": "saad@rocketr.net",
"buyerIp": "127.0.0.1",
"buyerCountry": "US",
"referer": "",
"notes": "",
"custom_fields": [],
"paymentDetails": {
"payment_method": "BCH",
"txnId": "",
"addressToSendTo": "1HTviuE3XBnydGsJ2K6Hbv2usCm91tixjN",
"amountToReceive": 0.02293797,
"amountDidReceive": 0,
"confirmations": 0,
"status": "",
"lastUpdated": "Moments ago",
"forwardId": ""
},
"invoiceIdentifier": "i_e3ae1c5927aa"
}
Invoices
Invoices represent amount owed and contain important information such as how a buyer can pay the invoice. Unlike orders, invoices don't tell a buyer exactly how to pay for an invoice---that's the job of an order.
The Invoice Object
Attribute | Type | Description |
---|---|---|
invoiceIdentifier | String | This is an identifier for the invoice |
buyerEmail | String | This is the email of the buyer. If the send_buyer_emails flag is set true on order creation, the buyer will receive an email about the order to this email address |
status | int | The status of the invoice. Please see the Invoice Status specifications for details. |
amount | decimal | The amount of the invoice. The amount is in the currency of the invoice. |
currency | int | The currency of the invoice. Please see the Currency specifications for details. |
acceptedPaymentMethods | JSON Array | An array list of accepted payment methods. Please see the Payment Method specifications for details. |
billItems | JSON Array | Please see the BillItems specifications for details. |
shouldCollectAddress | String | Whether or not an address should be asked when the buyer pays |
customFields | JSON Array | An array of Custom Fields that the buyer needs to fill out when completing the order. Please note that you can pass through your own custom fields by setting the passthrough fields to true and providing a default value for a custom field object. |
notes | String | Any notes about the invoice. |
ipnUrl | String | The URL where webhooks will be sent for this invoice (e.g. when an order is created etc) |
createdAt | timestamp | The timestamp when the invoice was created. |
POST /invoices/create
This will create an invoice and respond with the invoice identifier and a link to the checkout page.
Accepted POST Paramters
Request
<?php
$i = new \RocketrPayments\Invoice();
$i->addBillItem(9.99, 'Line Item 1', 10);
$i->addAcceptedPaymentMethod(\RocketrPayments\PaymentMethods::PaypalPayment);
$i->setNotes('This is an test note');
$i->setBuyerEmail('saad@rocketr.net');
$i->addCustomField('Please enter your preferred color', '', false, false, 0);
$i->addCustomField('internal_id', '2195342212', true, true, 0);
$i->setBrowserRedirect('https://google.com');
$result = $i->createInvoice();
echo "Please visit click the following link to pay the invoice: " . $result['links']['invoice'] . "\n";
curl -X POST
https://api.rocketr.net/invoices/create
-H 'application-id: <APPLICATION_ID>'
-H 'authorization: <APPLICATION_SECRET>'
-H 'content-type: application/json'
-d '{
"billItems": [{
"description": "Line Item 1",
"price": 10,
"quantity": 10
}],
"acceptedPaymentMethods": ["paypal", "bcc"],
"shouldCollectAddress": false,
"notes": "This is a test note",
"buyerEmail": "saad@rocketr.net",
"customFields": [
{
"name": "Please enter your preferred color",
"type": 0,
"required": false
},
{
"name": "internal_id",
"type": 0,
"required": false,
"default": "Example internal id that is passthrough only, will not be shown to buyer on checkout",
"passthrough": true
},
],
"browserRedirect": "https://google.com"
}'
Attribute | Type | Description | Required |
---|---|---|---|
buyerEmail | String | This is the email of the buyer. | Yes |
currency | String | The currency of the invoice. Please see the Currency specifications for details. | No, default: Merchant base currency. |
acceptedPaymentMethods | JSON Array | An array list of accepted payment methods. Please see the Payment Method specifications for details. | No, default: all payment methods |
billItems | JSON Array | Please see the BillItems specifications for details. | Not if amount is passed. If amount is passed a default line item will be made with one item of amount . However, either amount or billItems must be passed. |
amount | decimal | The amount of the invoice. The amount is in the currency of the invoice. | Not if billItems is passed. If amount is passed a default line item will be made with one item of amount . However, either amount or billItems must be passed. |
shouldCollectAddress | String | Whether or not an address should be asked when the buyer pays | No, default: false |
customFields | JSON Array | An array of Custom Fields that the buyer needs to fill out when completing the invoice. Please note that you can pass through your own custom fields by setting the passthrough fields to true and providing a default value for a custom field object. |
No, default: {} |
notes | String | Any notes about the invoice. | No, default: '' |
ipnUrl | String | The URL where webhooks will be sent for this invoice (e.g. when an invoice is created etc) | No, default: '' |
browserRedirect | String | The URL to redirect the buyer to after the purchase is complete | No, default: '' |
shouldSendInvoiceEmail | boolean | If this is enabled, the buyerEmail will be sent an email on invoice creation and when the invoice is complete |
No, default: false |
Response (HTTP Code: 201)
{
"success": true,
"invoice": {
"identifier": "i_22f095ec7152"
},
"links": {
"invoice": "https://rocketr.net/checkout/i_22f095ec7152"
},
"redirctUrl": "https://rocketr.net/checkout/i_22f095ec7152"
}
Response
The response contains the invoice id and the link to the checkout page.
GET /invoices/list
This endpoint is used to retreive a list of all invoices. Responses will vary depending on the payment method used.
Accepted GET Paramters
Attribute | Type | Description | Required |
---|---|---|---|
page | int | The page of orders | No, default: 1 |
perPage | int | The number of orders to include per query. Must be between 1 and 100. | No, default: 20 |
search | string | You can search the buyer email or the invoice identifier |
No, default: '' |
sortBy | string | You can sort the results by: invoice identifier , amount , status , or createdAt |
No, default: invoice identifier |
sortMethod | string | You can sort asc (ascending) or desc (descending) |
No, default: 'asc' |
Supporting Classes
Support classes are not API resources. However, they are objects that are necessary in core resources. For example, when creating an order, you need to specify the payment method. The payment method documentation below will tell you the different payment methods available and how to specify them in API calls.
Payment Methods
Name | String Representation | Integer Representation |
---|---|---|
Bitcoin | btc | 1 |
Ethereum | eth | 2 |
Perfect Money | pm | 3 |
Stripe | stripe | 4 |
Paypal | paypal | 5 |
Bitcoin Cash | bch | 6 |
Litecoin | ltc | 7 |
Currency
These are the currencies you can request payment in. Please note that if you use a cryptocurrency as the currency, the order amount will be in the cryptocurrency (e.g. Posting /order/create
with BTC as the currency and 100 as the amount will ask the buyer to send 100 BTC!)
Name | Short Representation | Integer Representation |
---|---|---|
US Dollar | USD | 1 |
Euro | EUR | 2 |
Pound | GBP | 3 |
Canadian Dollar | CAD | 4 |
Australian Dollar | AUD | 5 |
Japanese Yen | JPY | 6 |
Chinese Yuan | CNY | 7 |
Bitcoin | BTC | 100 |
Bitcoin Cash | BCH | 101 |
Ethereum | ETH | 102 |
Litecoin | LTC | 103 |
Order Status
Int Rep. | Title | Description |
---|---|---|
-1 | UNPAID | This means the order was not paid |
0 | NEW_ORDER | This is a new order that has been recently created. The buyer has not initiated payment yet. |
1 | WAITING_FOR_PAYMENT | The payment has been initiated by the buyer but not confirmed (e.g. 0 confirmations for cryptocurrency payment methods) |
2 | PARTIAL_PAYMENT_RECEIVED | The buyer did not send the full amount. |
3 | FULL_PAYMENT_RECEIVED | The payment is complete and the order will be complete soon. (This is a transitionary state, if an order is stuck here, it means there was an error forwarding the payment to the seller) |
4 | PAYMENT_COMPLETE | The payment has been complete. |
5 | REFUNDED | The money has been refunded. |
6 | UNKNOWN_ERROR | Please contact us at support@rocketr.net. |
8 | PAYPAL_PENDING | Paypal is verifying the order. |
9 | PAYPAL_OTHER | An unknown paypal status, please see the order for more details. |
10 | PAYPAL_REVERSED | The buyer reversed the payment. |
11 | PAYPAL_VOIDED | The payment was voided by either the buyer or Paypal (security check). |
20 | STRIPE_AUTO_REFUND | The payment was automatically refunded due to high risk. |
21 | STRIPE_DECLINED | The payment was declined by stripe |
22 | STRIPE_DISPUTED | The payment is under dispute |
Invoice Status
Int Rep. | Title |
---|---|
0 | DRAFT |
1 | SENT |
2 | PENDING |
3 | PARTIAL_PAID |
100 | PAID |
Bill Item
A Bill Item is a json object containing the following attributes:
Attribute | Type |
---|---|
description | string |
price | float |
quantity | int |
Example
<?php
$i = new \RocketrPayments\Invoice();
$i->addBillItem(9.99, 'Line Item 1', 10);
{
"description": "Line Item 1",
"price": 9.99,
"quantity": 10
}
Developer Support
Errors
Here are possible error codes our API might send back:
401 Unauthorized
{
"error": "You are unauthorized to access this resource.",
"path": "/orders/create"
}
429 Rate Limit Exceeded
{
"error": "Rate limit exceeded",
}
HTTP Code | Meaning |
---|---|
401 | Unauthorized -- Your API key is incorrect or your API key does not have access to a particular scope |
404 | Not Found -- The specified resource could not be found. |
429 | Too Many Requests -- Learn more about rate limiting here |
500 | Server Error -- We had a problem with our server. Try again later |
503 | Service Unavailable (Time out) -- The server is overloaded or under maintenance |
API Libraries
We are still working on adding libraries for various programming languages. For now, the only language we have is PHP
PHP
The PHP library can be found on github here:
Composer
The easiest way to use the library is through Composer:
composer require rocketr/rocketr-payments-php
Then in your code, load the Autoloader:
require_once('vendor/autoload.php');
Manual Installation
To manually use the library, download the latest release and include the init.php
file in your code:
require_once('/path-to-rocketr-payments-php/init.php');
Misc
There are some easter eggs hidden throughout. Here's a hint:
No authentication required of course. As long as you can cross 9 3/4, that is.
GET /misc/quotes
This endpoint will return a random quote from a certain set of books. Can you guess which?
Support
Good Luck!
We ❤️ developers and would love to help you in any way we can. Feel free to email us with any questions, suggestions, concerns or cupcakes.