Creating a payment request
1. Create a payment request
Payment requests can be created that specify:
| Field | Description | Required |
|---|---|---|
| Amount | The amount the customer is required to pay | Yes |
| Description | A string description that will describe the reason for the payment to the customer | Yes |
| CustomerId | The Id of the customer who will be making the payment | Yes |
| VaultId | the Id of the vault into which the funds will be paid. This vault must belong to the customer specified by CustomerId | Yes |
| OnSuccess | A url that will be called when the payment succeeds | No |
| OnFail | A url that will be called if the payment fails | No |
| Data | A dictionary of key value pairs that will be posted to the OnSuccess and OnFail methods | No |
To create a payment request issue a post to https://pay.nfiniti.co/PaymentRequest/Create.
The body of the post should be as follows.
{
aescription : "Test Payment",
amount : 100.00,
customerId : "da99e8fe-e97f-44ef-ba77-8bdf2c6512da",
walletId "ee0a2167-fccf-4b79-86ef-c06f1a230305",
data {
metaDataId_0 1234;
metaDataId_1 : "Test Stuff"
},
onSuccess : "https://an.example.callback/id=abc",
tenant "tenantId"
}
The Hosted Payment System will return a response such as:
{
paymentRequestUrl: "https://pay.nfiniti.co/pay/28afb9f2-9619-46ac-9784-208408851560"
}
The customer who should make the payment can then be directed to the paymentRequestUrl.
Updated about 7 years ago
