Service Fee object
{
"created_at": "2020-08-17T20:02:52Z",
"fee_amount": "9.00",
"id": "service_fee_1Xjrntj8hezL0P7mWcYvW8wTYCrFdXgn",
"is_accepted": true,
"updated_at": "2020-08-17T20:04:26Z"
}
Data | Data type | Description |
---|---|---|
id |
string | Permanent unique identifier of the service fee. |
is_accepted |
boolean | The whether the service fee was accepted or not. |
fee_amount |
datetime string | The amount of the service fee. |
created_at |
datetime string | The timestamp when the service fee was created. |
updated_at |
datetime string | The timestamp when the service fee was updated. |
Read Service Fee
Success
Request
GET /api/service-fees/{service_fee_id}
Authorization: Bearer {PUBLISHABLE_KEY}
Response
{
"data": {
"created_at": "2020-08-17T20:02:52Z",
"fee_amount": "9.00",
"id": "service_fee_1Xjrntj8hezL0P7mWcYvW8wTYCrFdXgn",
"is_accepted": false,
"updated_at": "2020-08-17T20:04:26Z"
},
"meta": {
"type": "service_fee"
}
}
Example Errors
Service Fee not found
Request
GET /api/service-fees/{service_fee_id}
Authorization: Bearer {PUBLISHABLE_KEY}
Response
HTTP/1.1 200 OK
{
"message": "not_found"
}
Update Service Fee
NOTE: You can update Transaction Service Fees before SDK initialization to bypass Service Fee Acceptance screens.
Success
Request
PATCH /api/service-fees/{service_fee_id}
Authorization: Bearer {PUBLISHABLE_KEY}
{
"action": "accept",
"consumer_ip_address": "123.234.5.67"
}
Response
{
"data": {
"created_at": "2020-08-17T20:02:52Z",
"fee_amount": "9.00",
"id": "service_fee_1Xjrntj8hezL0P7mWcYvW8wTYCrFdXgn",
"is_accepted": true,
"updated_at": "2020-08-17T20:04:26Z"
},
"meta": {
"type": "service_fee"
}
}
Example Errors
Service Fee not found
Request
GET /api/service-fees/{service_fee_id}
Authorization: Bearer {PUBLISHABLE_KEY}
Response
HTTP/1.1 200 OK
{
"message": "not_found"
}
Service Fee already accepted
Request
GET /api/service-fees/{service_fee_id}
Authorization: Bearer {PUBLISHABLE_KEY}
{
"action": "accept"
}
Response
HTTP/1.1 200 OK
{
"action": "accept",
"conflict": "already_accepted",
"message": "Service fee already accepted."
}