Payments

The Payments resource is located at `/payments` route and requires API Credentials

get
Getting Payment Metadata

https://api.limepay.io/v1/payments/metadata?shopperId={shopperId}&returnGasPrice={true/false}
In order to create payments on must provide a signed authorization signature. The signature requires metadata that can be received from this request.
Request
Response
Headers
Authorization
required
string
Authorization through API Credentials
Query Parameters
returnGasPrice
optional
boolean
Whether to return gas price or not
shopperId
required
string
The ID of the shopper for which you want to create payment
200: OK
{
nonce: "0128991019671",
shopperAddress: "0x6788bac9907e5cd38e472fe243a7271e7ec35898",
escrowAddress: "0xde5E5c944D52488Eeb31C27ec2b5cCe9f14f4C88"
}

post
Creating Fiat Payment

https://api.limepay.io/v1/payments
The following request creates fiat payment
Request
Response
Headers
Authorization
required
string
Authorization through API Credentials
Body Parameters
currency
required
string
Currency code (ISO 4217) of the amount to be charged
shopper
required
string
The ID of the shopper for which the payment is being created
items
required
array
Array of item objects TODO Link
fundTxData
required
object
Fund TX Data object TODO link
genericTransactions
required
array
Array of Generic Transaction Objects TODO link
201: Created
The returned data once you've successfully created fiat payment
{
paymentDetails: {
baseAmount: 6
},
fundTxData: {
tokenAmount: '10000000000000000000',
status: 'PENDING',
weiAmount: '60000000000000000',
nonce: '95536884874082896539454',
authorizationSignature: '0xc81002ec416d6ad24675a854caba578147b467e91106d1e6d2f6c098f5efbdeb2048a0f87db2c7b88491e66ca4fa3fc1358b35d40b9569ca78fde0396787c7f11c'
},
_id: '5c90e2a70d7265c9310ae9a6',
status: 'NEW',
type: 'FIAT_PAYMENT',
shopper: '5c753d4ef96ad883a65e8fb9',
currency: 'USD',
genericTransactions: [
{
status: 'PENDING',
_id: '5c90e2a70d7265c9310ae9a8',
gasPrice: '9000000000',
gasLimit: 100000,
to: '0x30D25785515bE27d0B46Ab41Ed57dBAbf8A9cFf6',
functionName: 'approve',
functionParams: [
{
_id : "5c90e2a70d7265c9310ae9aa",
type : "address",
value : "0x37688cFc875DC6AA6D39fE8449A759e434a86482"
},
{
_id : "5c90e2a70d7265c9310ae9a9",
type : "uint",
value : "10000000000000000000"
}
]
},
{
status: 'PENDING',
_id: '5c90e2a70d7265c9310ae9a7',
gasPrice: '9000000000',
gasLimit: 100000,
to: '0x37688cFc875DC6AA6D39fE8449A759e434a86482',
functionName: 'buySomeService',
functionParams: []
}
],
items: [
{
quantity: 1,
_id: '5c90e2a70d7265c9310ae9ab',
description: 'Some good description',
lineAmount: 6
}
],
vendor: '5c18dca47dc18d30a1e978f3',
limeToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcGlVc2VyIjoiNWM4YTYzYjk4MTE0ZWFlYThlNGQyMGVlIiwidXNlciI6IjVjMThkYjhkN2RjMThkMzBhMWU5NzhlYyIsInNob3BwZXJJZCI6IjVjNzUzZDRlZjk2YWQ4ODNhNjVlOGZiOSIsImNyZWF0ZWRPbiI6MTU1Mjk5OTA3OTk1OSwidHlwZSI6IkxJTUVfVE9LRU4iLCJpYXQiOjE1NTI5OTkwNzksImV4cCI6MTU1MzAwMjY3OX0.DsFTSS9NqMzk8QTELnWCVSBtKl-eEdtAfD6SJxw3h94',
date: '2019-03-19T12:37:59.967Z'
}

post
Creating Relayed Payment

https://api.limepay.io/v1/payments/relayed
The following request creates relayed payment
Request
Response
Headers
Authorization
required
string
Authorization through API Credentials
Body Parameters
shopper
required
string
The ID of the shopper for which the payment will be created
fundTxData
required
object
Fund TX Data object TODO Link
genericTransactions
required
array
Array of Generic Transaction Objects TODO Link
201: Created
{
fundTxData: {
tokenAmount: '0',
status: 'PENDING',
weiAmount: '60000000000000000',
nonce: '5287555272935245904970208814260078944',
authorizationSignature: '0x561b3b7a0fb8511758e7302e0063ea730e8937a6e2c00e86e32ac5ee7f12b376362047913d394100bb588fc240340a3b51fbc5eac81202df9304fde8c972faeb1c'
},
_id: '5c90e5d90d7265c9310ae9ac',
status: 'NEW',
type: 'RELAYED_PAYMENT',
shopper: '5c753d4ef96ad883a65e8fb9',
genericTransactions: [
{
status: 'PENDING',
_id: '5c90e5d90d7265c9310ae9ae',
gasPrice: '9000000000',
gasLimit: 100000,
to: '0x30D25785515bE27d0B46Ab41Ed57dBAbf8A9cFf6',
functionName: 'approve',
functionParams: [
{
_id : "5c90e2a70d7265c9310ae9aa",
type : "address",
value : "0x37688cFc875DC6AA6D39fE8449A759e434a86482"
},
{
_id : "5c90e2a70d7265c9310ae9a9",
type : "uint",
value : "10000000000000000000"
}
]
},
{
status: 'PENDING',
_id: '5c90e5d90d7265c9310ae9ad',
gasPrice: '9000000000',
gasLimit: 100000,
to: '0x37688cFc875DC6AA6D39fE8449A759e434a86482',
functionName: 'buySomeService',
functionParams: []
}
],
vendor: '5c18dca47dc18d30a1e978f3',
limeToken:
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcGlVc2VyIjoiNWM4YTYzYjk4MTE0ZWFlYThlNGQyMGVlIiwidXNlciI6IjVjMThkYjhkN2RjMThkMzBhMWU5NzhlYyIsInNob3BwZXJJZCI6IjVjNzUzZDRlZjk2YWQ4ODNhNjVlOGZiOSIsImNyZWF0ZWRPbiI6MTU1Mjk5OTg5Nzg2MCwidHlwZSI6IkxJTUVfVE9LRU4iLCJpYXQiOjE1NTI5OTk4OTcsImV4cCI6MTU1MzAwMzQ5N30.for2Cpx3DQ7XozhLLV1rOx7uXGtswKtUJa_Oy1z5lsQ',
date: '2019-03-19T12:51:37.866Z'
}

get
Getting Payment by ID

https://api.limepay.io/v1/payments/:id
Getting payment by ID
Request
Response
Path Parameters
id
required
string
Payment ID
Headers
Authorization
required
string
Authorization through API Credentials
200: OK
{
paymentDetails: {
baseAmount: 6
},
fundTxData: {
tokenAmount: '10000000000000000000',
status: 'PENDING',
weiAmount: '60000000000000000',
nonce: '95536884874082896539454',
authorizationSignature: '0xc81002ec416d6ad24675a854caba578147b467e91106d1e6d2f6c098f5efbdeb2048a0f87db2c7b88491e66ca4fa3fc1358b35d40b9569ca78fde0396787c7f11c'
},
_id: '5c90e2a70d7265c9310ae9a6',
status: 'NEW',
type: 'FIAT_PAYMENT',
shopper: '5c753d4ef96ad883a65e8fb9',
currency: 'USD',
genericTransactions: [
{
status: 'PENDING',
_id: '5c90e2a70d7265c9310ae9a8',
gasPrice: '9000000000',
gasLimit: 100000,
to: '0x30D25785515bE27d0B46Ab41Ed57dBAbf8A9cFf6',
functionName: 'approve',
functionParams: [
{
_id : "5c90e2a70d7265c9310ae9aa",
type : "address",
value : "0x37688cFc875DC6AA6D39fE8449A759e434a86482"
},
{
_id : "5c90e2a70d7265c9310ae9a9",
type : "uint",
value : "10000000000000000000"
}
]
},
{
status: 'PENDING',
_id: '5c90e2a70d7265c9310ae9a7',
gasPrice: '9000000000',
gasLimit: 100000,
to: '0x37688cFc875DC6AA6D39fE8449A759e434a86482',
functionName: 'buySomeService',
functionParams: []
}
],
items: [
{
quantity: 1,
_id: '5c90e2a70d7265c9310ae9ab',
description: 'Some good description',
lineAmount: 6
}
],
vendor: '5c18dca47dc18d30a1e978f3',
limeToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcGlVc2VyIjoiNWM4YTYzYjk4MTE0ZWFlYThlNGQyMGVlIiwidXNlciI6IjVjMThkYjhkN2RjMThkMzBhMWU5NzhlYyIsInNob3BwZXJJZCI6IjVjNzUzZDRlZjk2YWQ4ODNhNjVlOGZiOSIsImNyZWF0ZWRPbiI6MTU1Mjk5OTA3OTk1OSwidHlwZSI6IkxJTUVfVE9LRU4iLCJpYXQiOjE1NTI5OTkwNzksImV4cCI6MTU1MzAwMjY3OX0.DsFTSS9NqMzk8QTELnWCVSBtKl-eEdtAfD6SJxw3h94',
date: '2019-03-19T12:37:59.967Z'
}
404: Not Found
Returns this error if the provided ID is invalid
{
errorName: "NOT_FOUND_ERROR",
code: 3010,
message: "Payment was not found"
}

get
Getting All Payments

https://api.limepay.io/v1/payments
Getting all payments
Request
Response
Headers
Authorization
required
string
Authorization through API Credentials
200: OK
[
{
paymentDetails: {
baseAmount: 6
},
fundTxData: {
tokenAmount: '10000000000000000000',
status: 'PENDING',
weiAmount: '60000000000000000',
nonce: '95536884874082896539454',
authorizationSignature: '0xc81002ec416d6ad24675a854caba578147b467e91106d1e6d2f6c098f5efbdeb2048a0f87db2c7b88491e66ca4fa3fc1358b35d40b9569ca78fde0396787c7f11c'
},
_id: '5c90e2a70d7265c9310ae9a6',
status: 'NEW',
type: 'FIAT_PAYMENT',
shopper: '5c753d4ef96ad883a65e8fb9',
currency: 'USD',
genericTransactions: [
{
status: 'PENDING',
_id: '5c90e2a70d7265c9310ae9a8',
gasPrice: '9000000000',
gasLimit: 100000,
to: '0x30D25785515bE27d0B46Ab41Ed57dBAbf8A9cFf6',
functionName: 'approve',
functionParams: [
{
_id : "5c90e2a70d7265c9310ae9aa",
type : "address",
value : "0x37688cFc875DC6AA6D39fE8449A759e434a86482"
},
{
_id : "5c90e2a70d7265c9310ae9a9",
type : "uint",
value : "10000000000000000000"
}
]
},
{
status: 'PENDING',
_id: '5c90e2a70d7265c9310ae9a7',
gasPrice: '9000000000',
gasLimit: 100000,
to: '0x37688cFc875DC6AA6D39fE8449A759e434a86482',
functionName: 'buySomeService',
functionParams: []
}
],
items: [
{
quantity: 1,
_id: '5c90e2a70d7265c9310ae9ab',
description: 'Some good description',
lineAmount: 6
}
],
vendor: '5c18dca47dc18d30a1e978f3',
limeToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcGlVc2VyIjoiNWM4YTYzYjk4MTE0ZWFlYThlNGQyMGVlIiwidXNlciI6IjVjMThkYjhkN2RjMThkMzBhMWU5NzhlYyIsInNob3BwZXJJZCI6IjVjNzUzZDRlZjk2YWQ4ODNhNjVlOGZiOSIsImNyZWF0ZWRPbiI6MTU1Mjk5OTA3OTk1OSwidHlwZSI6IkxJTUVfVE9LRU4iLCJpYXQiOjE1NTI5OTkwNzksImV4cCI6MTU1MzAwMjY3OX0.DsFTSS9NqMzk8QTELnWCVSBtKl-eEdtAfD6SJxw3h94',
date: '2019-03-19T12:37:59.967Z'
}
]