| Term | Description |
|---|---|
| MobileApp | The third party app |
| ServerApp | The third party backend serving information to the MobileApp |
| End User | The person user the MobileApp |
| Glow User | The user entity in the Glow Platform that represent the End User |
| Stripe Customer | The customer record in Stripe that represents the End User |
| Stripe | The chosen external payment provider |
| Glow userId | The UUID of the Glow User |
customer.updated .customer.created or customer.updated ).| Case | Process Flow Description | Preexisting Stripe Customer | Preexisting Glow User | Stripe Webhooks to configure | Glow API to use |
|---|---|---|---|---|---|
| 1 | Stripe Customer and Glow User are registered at the same time the meter is onboarded. (API 1) | false | false | - customer.created - payment_method.attached | API 1 |
| 2 | Glow User and Stripe Customer (Stripe Customer is tied to Glow User at creation) preexist at the time the smart meter is onboarded. (API 2) | false | true | - customer.created - payment_method.attached | API 2 |
| 3 | Stripe Customer preexists and was created without assigning a Glow userId to description. Glow User is registered at the same time the meter is onboarded. (API 1) | true | false | - customer.updated - payment_method.attached | API 1 |
| 4 | Stripe Customer preexists and was created without assigning a Glow userId to description. Glow User also preexists at the time the smart meter is onboarded. (API 2) | true | true | - customer.updated - payment_method.attached | API 2 |
| Event | Payload | Description | JSON payload |
|---|---|---|---|
| smart-meter-avs-onboard.success | - MPXN - userId -applicationId | These events are generated as a successful asynchronous response to the AVS. This means that the system will register the smart meters against the user. | { "applicationId": "b0f1b774-a586-4f72-9edd-27ead8aa7a8d", "eventType": "smart-meter-avs-onboard.success", "data": { "userId": "0f580541-7139-43d3-826f-a63655b73c89", "mpxn": "1111111122228" } } |
| Event | Payload | Description | JSON payload |
|---|---|---|---|
| smart-meter-avs-onboard.failure | -- MPXN - userId - applicationId | These events are generated as an unsuccessful asynchronous response to the AVS. This means that the system will register the smart meters against the user. The error codes with details are provided in the SmarterMeterOnboardingViaAVS(Stripe) documentation. | { "applicationId": "b0f1b774-a586-4f72-9edd-27ead8aa7a8d", "eventType": "smart-meter-avs-onboard.success", "data": { "userId": "0f580541-7139-43d3-826f-a63655b73c89", "mpxn": "1111111122228", "errorCode":"ERROR_CODE" "errorDetails": {} } } |
| ErrorCode | Description |
|---|---|
| AVS_BAD_PAYMENT_METHOD | Payment method not attached to cusotmer, it was rejected for some reason by stripe |
| MPXN_NO_DCC_ADDRESS | MPXN has no address in the DCC. |
| AVS_FAILS | AVS fails (billing address provided does not match card billing address) |
| AVS_MPXN_ADDRESS_MISMATCH | DCC address does not match incoming billing address |
{
"object": {
"id": "cus_NsJ5YtQ7qPzfUX",
"object": "customer",
"address": null,
"balance": 0,
"created": 1683807587,
"currency": null,
"default_source": null,
"delinquent": false,
"description": "2f828329-55cd-456b-9123-05d07fa9e1cc",
"discount": null,
"email": null,
"invoice_prefix": "55CA31B0",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": null,
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": {
},
"name": null,
"phone": null,
"preferred_locales": [
],
"shipping": null,
"tax_exempt": "none",
"test_clock": null
}
}{
"object": {
"id": "cus_NsJ5YtQ7qPzfUX",
"object": "customer",
"address": null,
"balance": 0,
"created": 1683807587,
"currency": null,
"default_source": null,
"delinquent": false,
"description": "2f828329-55cd-456b-9123-05d07fa9e1cc",
"discount": null,
"email": null,
"invoice_prefix": "55CA31B0",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": null,
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": {
},
"name": null,
"phone": null,
"preferred_locales": [
],
"shipping": null,
"tax_exempt": "none",
"test_clock": null
}
}{
"address_line1_check": "pass",
"address_postal_code_check": "pass",
"cvc_check": "pass"
},{
"id": "evt_1N6Xd9DOZzcVYvZSFp1IUJp8",
"object": "event",
"api_version": "2022-11-15",
"created": 1683804354,
"data": {
"object": {
"id": "pm_************************",
"object": "payment_method",
"billing_details": {
"address": {
"city": "London",
"country": null,
"line1": "Street Name",
"line2": "123A",
"postal_code": "A00 A00",
"state": null
},
"email": null,
"name": "Justin Testing",
"phone": null
},
"card": {
"brand": "visa",
"checks": {
"address_line1_check": "pass",
"address_postal_code_check": "pass",
"cvc_check": "pass"
},
"country": "US",
"exp_month": 7,
"exp_year": 2026,
"fingerprint": "************",
"funding": "credit",
"generated_from": null,
"last4": "4242",
"networks": {
"available": [
"visa"
],
"preferred": null
},
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1683804354,
"customer": "cus_NsHWPrRrruAkIu",
"livemode": false,
"metadata": {},
"type": "card"
}
},
"livemode": false,
"pending_webhooks": 1,
"request": {
"id": "req_eTST0K7NYyHA4K",
"idempotency_key": "6014083d-da1e-4c22-86f5-804dff000156"
},
"type": "payment_method.attached"
}{
"id": "evt_1N6XhmDOZzcVYvZSlRxgTdED",
"object": "event",
"api_version": "2022-11-15",
"created": 1683804642,
"data": {
"object": {
"id": "pm_************************",",
"object": "payment_method",
"billing_details": {
"address": {
"city": "London",
"country": null,
"line1": "Street Name",
"line2": "123A",
"postal_code": "A00 A00",
"state": null
},
"email": null,
"name": "Justin Testing",
"phone": null
},
"card": {
"brand": "visa",
"checks": {
"address_line1_check": "pass",
"address_postal_code_check": "fail",
"cvc_check": "pass"
},
"country": "US",
"exp_month": 2,
"exp_year": 2044,
"fingerprint": "************",
"funding": "credit",
"generated_from": null,
"last4": "0036",
"networks": {
"available": [
"visa"
],
"preferred": null
},
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1683804641,
"customer": "cus_NsHWPrRrruAkIu",
"livemode": false,
"metadata": {},
"type": "card"
}
},
"livemode": false,
"pending_webhooks": 3,
"request": {
"id": "req_35g2UeX1asmS90",
"idempotency_key": "4be614bc-ac44-4117-83cb-c2de310c2ff0"
},
"type": "payment_method.attached"
}{
"id": "cus_NsJ5YtQ7qPzfUX",
"object": "customer",
"address": null,
"balance": 0,
"created": 1683807587,
"currency": null,
"default_source": null,
"delinquent": false,
"description": "2f828329-55cd-456b-9123-05d07fa9e1cc",
"discount": null,
"email": null,
"invoice_prefix": "55CA31B0",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": null,
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": {},
"name": null,
"phone": null,
"preferred_locales": [],
"shipping": null,
"tax_exempt": "none",
"test_clock": null
}