Properties
- Name
object
- Type
- string
- Description
Type of object is always
paymentMethod
.
- Name
id
- Type
- string
- Description
Unique identifier for the payment method.
Example:pm_1IHCiiI2m82Dc6YnhqGWH6JX
- Name
brand
- Type
- nullable string
- Description
Card brand. Only available for type
card
.Example:visa
Allowed values:amex, diners, discover, jcb, mastercard, unionpay, visa, unknown
- Name
clientSecret
- Type
- nullable string
- Description
An optional Stripe specific client secret to be used for payment method confirmation.
- Name
last4
- Type
- nullable string
- Description
The last four digits of the card. Only available for type
card
.Example:4242
- Name
provider
- Type
- string
- Description
The provider of the payment method. Currently only
stripe
is supported.
- Name
status
- Type
- string
- Description
Status of the payment method.
Example:available
Allowed values:available, requiresConfirmation
- Name
type
- Type
- string
- Description
Type of the payment method.
Example:card
Allowed values:card, applePay, googlePay
- Name
user
- Type
- string
- Description
Unique identifier for the user of the payment method.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
- Name
createdAt
- Type
- string
- Description
Time when the payment method was created.
Example:2021-02-14T19:38:34Z
Response
{
"object": "paymentMethod",
"id": "pm_1IHCiiI2m82Dc6YnhqGWH6JX",
"brand": "visa",
"last4": "4242",
"provider": "stripe",
"status": "available",
"type": "card",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"createdAt": "2021-02-14T19:38:34Z"
}
Retrieve a payment method
Retrieves the details of an existing payment method. You need only supply the unique identifier that was returned upon payment method creation.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
paymentMethod
- Type
- string
- Description
The unique identifier for the payment method.
Example:pm_1IHCiiI2m82Dc6YnhqGWH6JX
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
paymentMethod
.
required- Name
id
- Type
- string
- Description
Unique identifier for the payment method.
Example:pm_1IHCiiI2m82Dc6YnhqGWH6JX
required- Name
brand
- Type
- nullable string
- Description
Card brand. Only available for type
card
.Example:visa
Allowed values:amex, diners, discover, jcb, mastercard, unionpay, visa, unknown
required- Name
clientSecret
- Type
- nullable string
- Description
An optional Stripe specific client secret to be used for payment method confirmation.
required- Name
last4
- Type
- nullable string
- Description
The last four digits of the card. Only available for type
card
.Example:4242
required- Name
provider
- Type
- string
- Description
The provider of the payment method. Currently only
stripe
is supported.
required- Name
status
- Type
- string
- Description
Status of the payment method.
Example:available
Allowed values:available, requiresConfirmation
required- Name
type
- Type
- string
- Description
Type of the payment method.
Example:card
Allowed values:card, applePay, googlePay
required- Name
user
- Type
- string
- Description
Unique identifier for the user of the payment method.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
required- Name
createdAt
- Type
- string
- Description
Time when the payment method was created.
Example:2021-02-14T19:38:34Z
required
Request
curl https://api.gigs.com/projects/{project}/paymentMethods/{paymentMethod} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "paymentMethod",
"id": "pm_1IHCiiI2m82Dc6YnhqGWH6JX",
"brand": "visa",
"clientSecret": null,
"last4": "4242",
"provider": "stripe",
"status": "available",
"type": "card",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"createdAt": "2021-02-14T19:38:34Z"
}
Delete a payment method
Permanently deletes a payment method. It cannot be undone.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
paymentMethod
- Type
- string
- Description
The unique identifier for the payment method.
Example:pm_1IHCiiI2m82Dc6YnhqGWH6JX
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
paymentMethod
.
required- Name
id
- Type
- string
- Description
Unique identifier for the payment method.
Example:pm_1IHCiiI2m82Dc6YnhqGWH6JX
required- Name
brand
- Type
- nullable string
- Description
Card brand. Only available for type
card
.Example:visa
Allowed values:amex, diners, discover, jcb, mastercard, unionpay, visa, unknown
required- Name
clientSecret
- Type
- nullable string
- Description
An optional Stripe specific client secret to be used for payment method confirmation.
required- Name
last4
- Type
- nullable string
- Description
The last four digits of the card. Only available for type
card
.Example:4242
required- Name
provider
- Type
- string
- Description
The provider of the payment method. Currently only
stripe
is supported.
required- Name
status
- Type
- string
- Description
Status of the payment method.
Example:available
Allowed values:available, requiresConfirmation
required- Name
type
- Type
- string
- Description
Type of the payment method.
Example:card
Allowed values:card, applePay, googlePay
required- Name
user
- Type
- string
- Description
Unique identifier for the user of the payment method.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
required- Name
createdAt
- Type
- string
- Description
Time when the payment method was created.
Example:2021-02-14T19:38:34Z
required
Request
curl https://api.gigs.com/projects/{project}/paymentMethods/{paymentMethod} \
-X DELETE \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "paymentMethod",
"id": "pm_1IHCiiI2m82Dc6YnhqGWH6JX",
"brand": "visa",
"clientSecret": null,
"last4": "4242",
"provider": "stripe",
"status": "available",
"type": "card",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"createdAt": "2021-02-14T19:38:34Z"
}
List all payment methods
Returns a list of payment methods.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Query Parameters
- Name
user
- Type
- string
- Description
The unique identifier for the user to be filtered by.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
- Name
type
- Type
- array
- Description
A comma-separated list of payment method types to be filtered by.
Default:card,applePay,googlePay
- Name
after
- Type
- string
- Description
A cursor for use in pagination. The
after
parameter takes an object ID that defines the position in the list, only items immediately following the item with that ID will be returned.
- Name
before
- Type
- string
- Description
A cursor for use in pagination. The
before
parameter takes an object ID that defines the position in the list, only items immediately preceding the item with that ID will be returned.
- Name
limit
- Type
- integer
- Description
The limit of items to be returned in the list, between 0 and 200.
Default:10
>= 0
<= 200
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
list
.
required- Name
items
- Type
- array
- Description
- List of objects of type `paymentMethod`.
required- Name
moreItemsAfter
- Type
- nullable string
- Description
A unique identifier to be used as
after
pagination parameter if more items are available sorted after the current batch of items.
required- Name
moreItemsBefore
- Type
- nullable string
- Description
A unique identifier to be used as
before
pagination parameter if more items are available sorted before the current batch of items.
required
Request
curl https://api.gigs.com/projects/{project}/paymentMethods \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "list",
"items": [
{
"object": "paymentMethod",
"id": "pm_1IHCiiI2m82Dc6YnhqGWH6JX",
"brand": "visa",
"clientSecret": null,
"last4": "4242",
"provider": "stripe",
"status": "available",
"type": "card",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"createdAt": "2021-02-14T19:38:34Z"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Create a payment method
Create a new payment method with the given parameters.
Body
- Name
id
- Type
- string
- Description
Unique identifier for the payment method.
Example:pm_1IHCiiI2m82Dc6YnhqGWH6JX
required- Name
user
- Type
- string
- Description
The unique identifier of the user the payment method should be created for.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
required
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
paymentMethod
.
required- Name
id
- Type
- string
- Description
Unique identifier for the payment method.
Example:pm_1IHCiiI2m82Dc6YnhqGWH6JX
required- Name
brand
- Type
- nullable string
- Description
Card brand. Only available for type
card
.Example:visa
Allowed values:amex, diners, discover, jcb, mastercard, unionpay, visa, unknown
required- Name
clientSecret
- Type
- nullable string
- Description
An optional Stripe specific client secret to be used for payment method confirmation.
required- Name
last4
- Type
- nullable string
- Description
The last four digits of the card. Only available for type
card
.Example:4242
required- Name
provider
- Type
- string
- Description
The provider of the payment method. Currently only
stripe
is supported.
required- Name
status
- Type
- string
- Description
Status of the payment method.
Example:available
Allowed values:available, requiresConfirmation
required- Name
type
- Type
- string
- Description
Type of the payment method.
Example:card
Allowed values:card, applePay, googlePay
required- Name
user
- Type
- string
- Description
Unique identifier for the user of the payment method.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
required- Name
createdAt
- Type
- string
- Description
Time when the payment method was created.
Example:2021-02-14T19:38:34Z
required
Request
curl https://api.gigs.com/projects/{project}/paymentMethods \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"id\":\"pm_1IHCiiI2m82Dc6YnhqGWH6JX\",\"user\":\"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d\"}"
Response
{
"object": "paymentMethod",
"id": "pm_1IHCiiI2m82Dc6YnhqGWH6JX",
"brand": "visa",
"clientSecret": null,
"last4": "4242",
"provider": "stripe",
"status": "available",
"type": "card",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"createdAt": "2021-02-14T19:38:34Z"
}