Skip to main content

Payments

info

This api provides feature like manager cards and can charge invoice.

All APIs endpoints

Billing information APIs:

Payment method APIs:

The payments object

Billing-information

Attribute

companyId: string;
paymentId: string;
paymentMethod: string;
inStoreCredit: number;
firstName: string;
lastName: string;
phoneNumber: string;
country: string;
address: string;
zipCode: string;
province: string;
city: string;
organization: string;

Example

{
"id": "a875156a-9646-4d09-8b71-76437509d7e2",
"companyId": "f0bc2b54-64b6-403f-bb2c-eab2564a5e20",
"paymentId": "02953731-1769-414f-a231-03541c3387ae",
"paymentMethod": "card",
"inStoreCredit": 100,
"firstName": "Clayton",
"lastName": "Bailey",
"phoneNumber": "(714) 555-8431",
"country": "Canada",
"address": "95 Beach St Biller, MA 01824",
"postalCode": 49503,
"province": "Quebec",
"city": "Stain",
"organization": "Lumyri",
"taxId": "EIN: 12-3456789"
}

Address

Attribute

companyId: string;
firstName: string;
lastName: string;
streetAddress: string;
aptNumber: string;
state: string;
country: string;
zipCode: string;

Example

{
"id": "b5374005-650d-4e9f-b1bb-3ad1d4caee3a",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"createdAt": "2023-01-04T10:02:39.000Z",
"updatedAt": "2023-01-04T10:02:39.000Z",
"firstName": "Clayton",
"lastName": "Bailey",
"streetAddress": "CA 94566 North Depot Street",
"aptNumber": "CA 94566",
"state": "Indiana",
"country": "Canada",
"zipCode": "123987"
}

Payment method

Attribute

id: uuid;
companyId: string;
addressId: string;
method: PaymentMethod = 'Card';
isDefault: boolean = false;
info: {
country: string;
expMonth: number;
expYear: number;
cardName: string;
cardNumber: string;
}
metadata: Record<string, any>;

Example

{
"id": "02953731-1769-414f-a231-03541c3387ae",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"addressId": "b5374005-650d-4e9f-b1bb-3ad1d4caee3a",
"createdAt": "2023-01-04T10:02:39.000Z",
"updatedAt": "2023-02-14T07:44:21.000Z",
"method": "Card",
"isDefault": true,
"info": {
"country": "EUR",
"expYear": 2027,
"cardName": "Clayton Bailey",
"expMonth": 12,
"cardNumber": "4263********9299"
},
"metadata": {}
}

Invoice

Attribute

companyId: string;
billToId: string;
paymentId: string;
startAt: string;
endAt: string;
method: 'Card' | 'paypal' = 'Card';
status: 'Processing' | 'Succeeded' | 'Failed' = 'Processing';
details: Array<{
title: string;
path: string;
totalRequest: number;
currency: Currency;
amount: number;
}>;
subTotal: number;
tax: number;
total: number;
metadata: Record<string, unknown>;

Example

{
"id": "4e872310-58fb-40bf-9494-68731fb3d6b4",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"billToId": "ce733f62-d863-4938-ad84-3b049ff8647d",
"paymentId": null,
"startAt": "2023-02-01T00:00:00.000Z",
"endAt": "2023-02-28T00:00:00.000Z",
"status": "Processing",
"method": "Card",
"details": [
{
"path": "route",
"title": "Direction API",
"amount": 0,
"currency": "USD",
"totalRequest": "0"
},
{
"path": "search",
"title": "Address Autofill",
"amount": 0,
"currency": "USD",
"totalRequest": "0"
},
{
"path": "reverse",
"title": "Permanent Geocoding",
"amount": 0,
"currency": "USD",
"totalRequest": "0"
},
{
"path": "tile",
"title": "Tilesets",
"amount": 174.08,
"currency": "USD",
"totalRequest": "2176"
},
{
"path": "trip",
"title": "Direction API",
"amount": 0,
"currency": "USD",
"totalRequest": "0"
}
],
"subTotal": "174.08",
"tax": "0.00",
"total": "174.08",
"metadata": null,
"createdAt": "2023-02-01T06:16:41.000Z",
"updatedAt": "2023-02-01T06:16:41.000Z"
}

Payment method APIs

Create card method

Parameters

  • isDefault: optional
    • description: create a new card and set this card as the main one to charge
    • default = false
  • addressInfo: require
    • description: address data where you created a physical card
    • property:
      • firstName: optional
      • lastName: optional
      • aptNumber: optional
      • streetAddress: optional
      • state: optional
      • country: optional
      • zipCode: optional
  • info: require
    • description: basic card information on a physical card
    • property:
      • cardName: require
      • cardNumber: require
      • expMonth: require
      • expYear: require
      • cvv: require
      • country: require

Request

curl --location --request POST 'https://api-v1-stg.lumyri.com/payments/cards' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"isDefault": true,
"addressInfo": {
"streetAddress": "new york city",
"firstName": "Clayton",
"lastName": "Bailey",
"aptNumber": "1000",
"country": "USA",
},
"info": {
"cardName": "Clayton Bailey",
"cardNumber": "4242424242424242",
"expMonth": 1,
"expYear": 2025,
"cvv": "123",
"country": "USA"
}
}'

Response

{
"id": "1244ff21-7bfb-4a56-b4bb-44f11934d78d",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"addressId": "75d49d15-e755-4f6b-871b-ec00efac21c8",
"address": {
"id": "75d49d15-e755-4f6b-871b-ec00efac21c8",
"createdAt": "2023-04-17T04:43:15.784Z",
"updatedAt": "2023-04-17T04:43:15.784Z",
"firstName": "Clayton",
"lastName": "Bailey",
"streetAddress": "new york city",
"aptNumber": "1000",
"state": "",
"country": "USA",
"zipCode": "",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9"
},
"createdAt": "2023-02-16T03:14:54.000Z",
"updatedAt": "2023-02-16T03:14:54.000Z",
"method": "Card",
"isDefault": true,
"info": {
"cardName": "Clayton Bailey",
"cardNumber": "4242********4242",
"expMonth": 1,
"expYear": 2025,
"country": "USA"
}
}

Get list of cards

Request

curl --location --request GET 'https://api-v1-stg.lumyri.com/payments/cards'\
--header 'Authorization: Bearer $ACCESS_TOKEN'

Response

[
{
"id": "1244ff21-7bfb-4a56-b4bb-44f11934d78d",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"createdAt": "2023-02-16T03:14:54.000Z",
"updatedAt": "2023-02-16T03:14:54.000Z",
"method": "Card",
"isDefault": true,
"info": {
"country": "USA",
"expYear": 2025,
"cardName": "Clayton Bailey",
"expMonth": 1,
"cardNumber": "4242********4242"
},
"addressId": "b5374005-650d-4e9f-b1bb-3ad1d4caee3a",
"address": {
"id": "b5374005-650d-4e9f-b1bb-3ad1d4caee3a",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"firstName": "Clayton",
"lastName": "Bailey",
"streetAddress": "CA 94566 North Depot Street",
"aptNumber": "CA 94566",
"state": "Indiana",
"country": "Canada",
"zipCode": "123987",
"createdAt": "2023-01-04T10:02:39.000Z",
"updatedAt": "2023-01-04T10:02:39.000Z"
}
},
{
"id": "dcc81a1c-a89c-4cb8-abee-208eb479921a",
"createdAt": "2023-01-16T07:46:01.000Z",
"updatedAt": "2023-02-14T08:25:26.000Z",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"method": "Card",
"isDefault": false,
"info": {
"country": "USA",
"expYear": 2023,
"cardName": "Tobey Maguire",
"expMonth": 12,
"cardNumber": "4000********1976"
},
"addressId": "b5374005-650d-4e9f-b1bb-3ad1d4caee3a",
"address": {
"id": "b5374005-650d-4e9f-b1bb-3ad1d4caee3a",
"createdAt": "2023-01-04T10:02:39.000Z",
"updatedAt": "2023-01-04T10:02:39.000Z",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"firstName": "M. Willa ",
"lastName": "Mac",
"streetAddress": "CA 94566 North Depot Street",
"aptNumber": "CA 94566",
"state": "Indiana",
"country": "",
"zipCode": "123987"
}
}
]

Update card information

Parameters

  • isDefault: optional
  • info: require
    • description: basic card information on a physical card
    • property:
      • expMonth: require
      • expYear: require

Request

curl --location --request PUT 'https://api-v1-stg.lumyri.com/payments/cards/$CARD_ID' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"isDefault": false,
"info": {
"expMonth": 12,
"expYear": 2026
}
}'

Response

{
"id": "1244ff21-7bfb-4a56-b4bb-44f11934d78d",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"method": "Card",
"isDefault": false,
"info": {
"country": "USA",
"cardNumber": "4242********4242",
"expYear": 2026,
"expMonth": 12,
"cardName": "Clayton Bailey"
},
"metadata": null,
"createdAt": "2023-02-16T03:14:54.000Z",
"updatedAt": "2023-02-16T03:27:37.196Z"
}

Delete card method

Parameters

no parameters require

Request

curl --location --request DELETE '/payments/cards/$CARD_ID' \
--header 'Authorization: Bearer $ACCESS_TOKEN'

Response

status code 204: no content

Billing information

Get billing information

Parameters

no parameters require

Request

curl --location --request GET 'https://api-v1-stg.lumyri.com/payments/billing-information' \
--header 'Authorization: Bearer $ACCESS_TOKEN'

Response

{
"id": "a875156a-9646-4d09-8b71-76437509d7e2",
"companyId": "f0bc2b54-64b6-403f-bb2c-eab2564a5e20",
"paymentId": "02953731-1769-414f-a231-03541c3387ae",
"paymentMethod": "card",
"inStoreCredit": 100,
"firstName": "Clayton",
"lastName": "Bailey",
"phoneNumber": "(714) 555-8431",
"country": "Canada",
"address": "95 Beach St Biller, MA 01824",
"postalCode": 49503,
"province": "Quebec",
"city": "Stain",
"organization": "Lumyri",
"taxId": "EIN: 12-3456789"
}

Update billing information

Body Parameters

  • firstName: optional
  • lastName: optional
  • phoneNumber: optional
  • country: optional
  • address: optional
  • zipCode: optional
  • province: optional
  • city: optional
  • province: optional
  • organization: optional
  • taxId: optional

Request

curl --location --request PUT 'https://api-v1-stg.lumyri.com/payments/billing-information' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstName": "Clayton",
"lastName": "Bill",
"phoneNumber": "(714) 555-444",
}'

Response

{
"id": "ce733f62-d863-4938-ad84-3b049ff8647d",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"firstName": "Clayton",
"lastName": "Bill",
"phoneNumber": "(714) 555-44",
"country": "Canada",
"address": "95 Beach St Biller, MA 01824",
"postalCode": 49503,
"province": "Quebec",
"city": "Stain",
"organization": "Lumyri",
"taxId": "EIN: 12-3456789",
"createdAt": "2023-01-04T10:02:39.000Z",
"updatedAt": "2023-02-16T03:52:45.531Z"
}

Invoice

Get a list of Invoices

Parameters

  • page: optional
    • description: current page for pagination
    • default: 1
  • perPage: optional
    • description: the number of invoices on one page
    • default: 10
  • receipt: optional
    • description: filter receipt by id
  • min: optional
    • description: filter receipt by its monetary cost
  • max: optional
    • description: filter receipt by its monetary cost
  • status: optional
    • description: filter receipt by its status
  • method: optional
    • description: filter by a charged method like card, PayPal...
  • startAt: optional
    • description: filter receipt from date
  • endAt: optional
    • description: filter receipt to date

Request

curl --location --request GET 'https://api-v1-stg.lumyri.com/payments/orders?page=1&perPage=1' \
--header 'Authorization: Bearer $ACCESS_TOKEN'

Response

{
"total": 10,
"page": 1,
"perPage": 1,
"data": [
{
"id": "4e872310-58fb-40bf-9494-68731fb3d6b4",
"createdAt": "2023-02-01T06:16:41.000Z",
"updatedAt": "2023-02-01T06:16:41.000Z",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"startAt": "2023-02-01T00:00:00.000Z",
"endAt": "2023-02-28T00:00:00.000Z",
"status": "Processing",
"method": "Card",
"details": [
{
"path": "route",
"title": "Direction API",
"amount": 0,
"currency": "USD",
"totalRequest": "0"
},
{
"path": "search",
"title": "Address Autofill",
"amount": 0,
"currency": "USD",
"totalRequest": "0"
},
{
"path": "reverse",
"title": "Permanent Geocoding",
"amount": 0,
"currency": "USD",
"totalRequest": "0"
},
{
"path": "tile",
"title": "Tilesets",
"amount": 174.08,
"currency": "USD",
"totalRequest": "2176"
},
{
"path": "trip",
"title": "Direction API",
"amount": 0,
"currency": "USD",
"totalRequest": "0"
}
],
"subTotal": "174.08",
"tax": "0.00",
"total": "174.08",
"metadata": null,
"billToId": "ce733f62-d863-4938-ad84-3b049ff8647d",
"paymentId": null,
"payment": null
}
]
}

Charge Invoice

Parameters

no parameters require

Request

curl --location --request PUT 'https://api-v1-stg.lumyri.com/payments/orders/$INVOICE_ID/pay' \
--header 'Authorization: Bearer $ACCESS_TOKEN'

Response

{
"id": "4e872310-58fb-40bf-9494-68731fb3d6b4",
"createdAt": "2023-02-01T06:16:41.000Z",
"updatedAt": "2023-02-16T04:58:49.000Z",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"startAt": "2023-02-01T00:00:00.000Z",
"endAt": "2023-02-28T00:00:00.000Z",
"status": "Succeeded",
"method": "Card",
"details": [
{
"path": "route",
"title": "Direction API",
"amount": 0,
"currency": "USD",
"totalRequest": "0"
},
{
"path": "search",
"title": "Address Autofill",
"amount": 0,
"currency": "USD",
"totalRequest": "0"
},
{
"path": "reverse",
"title": "Permanent Geocoding",
"amount": 0,
"currency": "USD",
"totalRequest": "0"
},
{
"path": "tile",
"title": "Tilesets",
"amount": 174.08,
"currency": "USD",
"totalRequest": "2176"
},
{
"path": "trip",
"title": "Direction API",
"amount": 0,
"currency": "USD",
"totalRequest": "0"
}
],
"subTotal": "174.08",
"tax": "0.00",
"total": "174.08",
"metadata": {},
"billToId": "ce733f62-d863-4938-ad84-3b049ff8647d",
"paymentId": "fbd436bb-8bff-4936-8c16-9291826a4885"
}