API Endpoints
Peter
Jones
Successful operation.
{"statusCode":201}
This error can occur because of an invalid value or because a value is required.
Failed because the authentication token was not sent or it has already expired.
User has already a Stripe customer
POST /payments/customer-enrollment HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 222
{
"firstName": "Peter",
"lastName": "Jones",
"phone": {
"number": "9786431878",
"countryCode": "1"
},
"address": {
"street1": "Main 123",
"street2": "Secondary St",
"city": "Los Angeles",
"state": "CA",
"countryCode": "US",
"postalCode": "12345"
}
}
{
"statusCode": 201
}
Successful operation.
Failed because the authentication token was not sent or it has already expired.
User doesn't have Stripe integration
GET /payments/customers HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"statusCode": 200,
"data": {
"name": "Peter Jones",
"phone": {
"number": "9786431878",
"countryCode": "1"
},
"address": {
"street1": "Main 123",
"street2": "Secondary St",
"city": "Los Angeles",
"state": "CA",
"countryCode": "US",
"postalCode": "12345"
},
"userExternalId": "c495345a-bf0c-4af3-bc66-a59d570f4459"
}
}
Successful operation
Failed because the authentication token was not sent or it has already expired.
User doesn't have Stripe integration
GET /payments/charges HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"statusCode": 200,
"data": {
"charges": [
{
"chargeId": "py_1MGu3AJbiW7FRdJYvghbU3jh",
"amount": "10",
"status": "succeeded"
}
]
}
}
10
ba_1MCkDNJbiW7FRdJYJDT684sV
Successful operation.
{"statusCode":201}
This error can occur because of an invalid value or because a value is required.
Failed because the authentication token was not sent or it has already expired.
Missing card / bank
fromAccountId is not from this users or doesn't exist
Missing Stripe integration or there is no accepted authorization
POST /payments/charges HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 61
{
"amount": "10",
"fromAccountId": "ba_1MCkDNJbiW7FRdJYJDT684sV"
}
{
"statusCode": 201
}
Successful operation.
{"statusCode":201}
Failed because the authentication token was not sent or it has already expired.
Missing Stripe integration or authorization already accepted
POST /payments/authorizations HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"statusCode": 201
}
Personal reasons
Successful operation
{"statusCode":200}
This error can occur because of an invalid value or because a value is required.
Failed because the authentication token was not sent or it has already expired.
Missing Stripe integration or there is no accepted authorization
DELETE /payments/authorizations HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"cancelReason": "Personal reasons"
}
{
"statusCode": 200
}
The request was not made by Stripe
{"statusCode":400,"message":"Bad Request"}
POST /payments/stripe-wh HTTP/1.1
Host:
Accept: */*
The request was not made by Stripe
{
"statusCode": 400,
"message": "Bad Request"
}
Last updated
Was this helpful?