While our dashboard is under development, the same steps can be performed using the endpoints available in the API reference.
1
Create a Sandbox Account
Get started with Paylias by heading over to sandbox.paylias.xyz. Create your free account. Note that Paylias will send you a unique code to the email you used to create the account. This code will be used to verify your account once its created.
2
Create a Namespace
Once logged in, you’ll be shown a page of all of your Namespaces. Since you may not have any right now, go ahead and click on the ‘Create namespace’ button and choose a name and domain. Note that domains cannot be edited once created.
A Namespace is a logical grouping of all other relevant API resources like
A Namespace is a logical grouping of all other relevant API resources like
Customers
, Api Keys
Payments
etc. For instance if your company is called Oyster and you want your issued aliases to look like customer_name@oyster
, the name you select can be Oyster but the domain should be oyster
.3
Create an API Key
After creating your Namespace, click on the “API Keys” tab on the sub menu bar and generate a new API key. API keys can be scoped by permission and restricted to access only certain resources. You can create multiple API keys with different permissions but please make sure to keep the keys in a secure environment. In case you think your keys have been compromised, you can immediately revoke access from our dashboard and generate a new key. For now, on your sandbox account, go ahead and create a new API Key and grant it all permissions.
4
Issue an Alias
We don’t offer an official SDK just yet, but you can generate one using our OpenAPI spec. Tools like Swagger Codegen or OpenAPI Generator make it easy to scaffold a client in your language of choice.
Org-ID
is the unique identifier for your organization and the Partner-ID
is the unique identifier for the namspace you just created. Both can be copied from the dashboard.If you prefer to use the command line, you can run this request but make sure to replace the values in the header with your own.
Issue an Alias
5
Subscribe to webhook events
Before requesting a payment, you must create webhook subscriptions to be notified of events as and when they take place during the payment lifecycle. While all events are required to be acknowledged at the very least, some events require follow up action from your side.
To create a webhook subscription, head over to the dashboard and click on the “Webhooks” tab on the sub menu and create a new Webhook.
To create a webhook subscription, head over to the dashboard and click on the “Webhooks” tab on the sub menu and create a new Webhook.
- Webhooks require you to pass in a valid endpoint that lives on your server. Please note that all endpoints must be
https
(SSL enabled). - Along with an endpoint, you must also subscribe to at least one event. For now, you may subscribe to all events but in production you can choose to segregate events per endpoint for better management.
- If you would like Paylias to sign webhooks (recommended), you can optionally pass in a secret key which will be used to sign the generated payload. The signature will be included under the
X-PAYLIAS-SIGNATURE
header when the event is POSTed to your server.
Make sure you implement this endpoint on your server and return a response with a
200
HTTP status code.6
Initiate your first payment
Paylias supports both Push and Pull payments but in this example we will initiate a Pull payment. A pull payment essentially is a payment request - your customer is initiating a request for payment from a customer on another platform (similar to an ecommerce payment).
Payments need to be created before they are submitted to the network. Just like in the previous step where you issued you first alias, you can head over to the Create Payment endpoint, update theIn response you should get back the following confirmationA few important things to note:
Payments need to be created before they are submitted to the network. Just like in the previous step where you issued you first alias, you can head over to the Create Payment endpoint, update the
<API Key>
, <Org-ID>
, <Partner-ID>
and <Idempotency-Key>
parameters below with your own identifiers and send the request. Alternatively, if you prefer to use the command line, run this code snippet in your terminal but make sure to replace the values in the header with your own.Create a payment
- The
payment_id
should be a unique ID generated by your system. This will be used as the main identifier to trace payments throughout its lifecycle. - Currently, only
USD
is supported and all amounts must be submitted in their lowest denomination. In this example a payment of $100.00 is being requested. - Since this is a pull payment (
"payment_type": "Type_Pull"
), your customer is thebeneficiary_party
and their customer will be thedebtor_party
. This will reverse in the case of a push payment. - To make integration faster, we recommend using these credentials for the
debtor_party
since they will be routed to our simulator for a faster feedback loop. Otherwise, you will have to find other participants who are also integrating and request aliases they have configured on their end. More information about simulating payments can be found in our Simulator guide.
7
Submit the payment
Using the same
Alternatively, if you prefer to use the command line, run this code snippet in your terminal but make sure to replace the values in the header with your own.In response you should get back the following confirmation
payment_id
used above, submit the payment to the network. You can head over to the Create Payment Submission endpoint, update the <API Key>
, <Org-ID>
, <Partner-ID>
and <Idempotency-Key>
parameters below with your own identifiers and send the request.Alternatively, if you prefer to use the command line, run this code snippet in your terminal but make sure to replace the values in the header with your own.
Submit payment
Response
8
Monitor webhooks
After submitting your payment, monitor your webhook logs to be notified as the payment travels through the network to the correct participant, its customer and finally, back to you.Once the payment has been confirmed, a Transaction is created both, yours and your debitor’s, systems are notified and the payment is marked as completed.