Skip to content

Instantly share code, notes, and snippets.

@wehub
Last active September 18, 2019 20:32
Show Gist options
  • Save wehub/b747a895f03ecbc5892d985789603a4c to your computer and use it in GitHub Desktop.
Save wehub/b747a895f03ecbc5892d985789603a4c to your computer and use it in GitHub Desktop.
Note that this sample reflects a use case where a merchant updates their account name to a literal null (should not be allowed by your platform). If their payments and payouts were previously enabled, this would be the notification body.
{
"id": "947ecf75-11eb-4368-a60b-c443dc4366ae",
"resource": "notifications",
"path": "/notifications/947ecf75-11eb-4368-a60b-c443dc4366ae",
"owner": {
"id": "121212",
"resource": "applications",
"path": null
},
"topic": "accounts.capabilities.updated",
"event_time": 1568673336,
"payload": {
"payments": {
"enabled": false, // Identifies whether this account has enabled payment capability
"current_issues": [{ // Array with reasons why payment capability is disabled (if applicable)
"target": {
"resource": "accounts",
"id": "2b794862-80f6-4248-8b0a-cdb24e053a13",
"path": "/accounts/2b794862-80f6-4248-8b0a-cdb24e053a13"
},
"issue_type": "errant_fields",
"errant_fields": {
"name": [
"is_null"
]
}
}],
"upcoming_issues": {} // Outlines why payment capability will become disabled soon (if applicable)
},
"payouts": {
"enabled": false, // Identifies whether this account has enabled payout capability
"current_issues": [{ // Array with reasons why payout capability is disabled (if applicable)
"target": {
"resource": "accounts",
"id": "2b794862-80f6-4248-8b0a-cdb24e053a13",
"path": "/accounts/2b794862-80f6-4248-8b0a-cdb24e053a13"
},
"issue_type": "errant_fields",
"errant_fields": {
"name": [
"is_null"
]
}
}],
"upcoming_issues": {}
},
"id": null,
"resource": "capabilities",
"path": "/accounts/2b794862-80f6-4248-8b0a-cdb24e053a13/capabilities",
"owner": {
"id": "2b794862-80f6-4248-8b0a-cdb24e053a13",
"resource": "accounts",
"path": "/accounts/2b794862-80f6-4248-8b0a-cdb24e053a13"
},
"api_version": "3.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment