Organization API: Customer Portal: Payment methods
The 5 Organization API operations for payment methods.
Part of Customer Portal.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/orgs/{org_slug}/portal/payment-methods |
List customer's saved payment methods |
| POST | /api/v1/orgs/{org_slug}/portal/payment-methods/confirm |
Confirm payment method setup after customer approves on gateway side |
| POST | /api/v1/orgs/{org_slug}/portal/payment-methods/setup |
Initiate payment method tokenization on a regional gateway account |
| DELETE | /api/v1/orgs/{org_slug}/portal/payment-methods/{method_id} |
Remove (deactivate) a saved payment method |
| PUT | /api/v1/orgs/{org_slug}/portal/payment-methods/{method_id}/default |
Set a payment method as the default for this customer |
List customer's saved payment methods
Section titled List customer's saved payment methodsGET /api/v1/orgs/{org_slug}/portal/payment-methods
List customer's saved payment methods.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Confirm payment method setup after customer approves on gateway side
Section titled Confirm payment method setup after customer approves on gateway sidePOST /api/v1/orgs/{org_slug}/portal/payment-methods/confirm
Confirm payment method setup after customer approves on gateway side. Stores the tokenized method for future charges.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
gateway_name |
query | string | yes | |
session_id |
query | string | yes | |
set_as_default |
query | boolean | no | Default: True. |
currency |
query | string | no |
Request body
Section titled Request bodyapplication/json
Type: Callback Data.
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Initiate payment method tokenization on a regional gateway account
Section titled Initiate payment method tokenization on a regional gateway accountPOST /api/v1/orgs/{org_slug}/portal/payment-methods/setup
Initiate payment method tokenization on a regional gateway account.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
return_url |
query | string | yes |
cancel_url |
query | string | yes |
gateway_name |
query | string | no |
currency |
query | string | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Remove (deactivate) a saved payment method
Section titled Remove (deactivate) a saved payment methodDELETE /api/v1/orgs/{org_slug}/portal/payment-methods/{method_id}
Remove (deactivate) a saved payment method.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
method_id |
path | integer | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Set a payment method as the default for this customer
Section titled Set a payment method as the default for this customerPUT /api/v1/orgs/{org_slug}/portal/payment-methods/{method_id}/default
Set a payment method as the default for this customer.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
method_id |
path | integer | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |