payment_methods
Creates, updates, deletes, gets or lists a payment_methods resource.
Overview​
| Name | payment_methods |
| Type | Resource |
| Id | ovh.me.payment_methods |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
billing_contact_id | integer | Associated billing contact ID (wire: billingContactId) |
form_session_id | string | Form session ID (wire: formSessionId) |
merchant_id | string | Merchant ID (wire: merchantId) |
payment_mean_id | integer | Payment mean ID associated to this payment method (wire: paymentMeanId) |
payment_method_id | integer | Payment method ID (wire: paymentMethodId) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
default | boolean | Indicates if payment method is the default one for this account |
description | string | Custom customer description |
expiration_date | string (date-time) | Expiration date (wire: expirationDate) |
icon | object | Payment method type icon |
integration | string | Payment method integration type (BANK_TRANSFER, COMPONENT, IFRAME_VANTIV, IN_CONTEXT, NONE, OSP, POST_FORM, REDIRECT) |
label | string | Payment method public label |
last_update | string (date-time) | Last update date (wire: lastUpdate) |
oneclick | boolean | Indicates if payment method support the oneclick functionality |
payment_sub_type | string | Payment method sub-type (30_DAYS, 45_DAYS, 60_DAYS, AMERICAN_EXPRESS, AURA, CARTE_BANCAIRE, CARTE_BLEUE, CHORUS, DINERS_CLUB, DISCOVER, JCB, MAESTRO, MASTERCARD, NONE, RUPAY, VISA) (wire: paymentSubType) |
payment_type | string | Payment method type (wire: paymentType) |
status | string | Payment method status (CANCELED, CANCELING, CREATED, CREATING, ERROR, EXPIRED, FAILED, MAINTENANCE, PAUSED, REJECTED, REPLACED, VALID, VALIDATING) |
Payment method object
| Name | Datatype | Description |
|---|---|---|
billing_contact_id | integer | Associated billing contact ID (wire: billingContactId) |
form_session_id | string | Form session ID (wire: formSessionId) |
merchant_id | string | Merchant ID (wire: merchantId) |
payment_mean_id | integer | Payment mean ID associated to this payment method (wire: paymentMeanId) |
payment_method_id | integer | Payment method ID (wire: paymentMethodId) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
default | boolean | Indicates if payment method is the default one for this account |
description | string | Custom customer description |
expiration_date | string (date-time) | Expiration date (wire: expirationDate) |
icon | object | Payment method type icon |
integration | string | Payment method integration type (BANK_TRANSFER, COMPONENT, IFRAME_VANTIV, IN_CONTEXT, NONE, OSP, POST_FORM, REDIRECT) |
label | string | Payment method public label |
last_update | string (date-time) | Last update date (wire: lastUpdate) |
oneclick | boolean | Indicates if payment method support the oneclick functionality |
payment_sub_type | string | Payment method sub-type (30_DAYS, 45_DAYS, 60_DAYS, AMERICAN_EXPRESS, AURA, CARTE_BANCAIRE, CARTE_BLEUE, CHORUS, DINERS_CLUB, DISCOVER, JCB, MAESTRO, MASTERCARD, NONE, RUPAY, VISA) (wire: paymentSubType) |
payment_type | string | Payment method type (wire: paymentType) |
status | string | Payment method status (CANCELED, CANCELING, CREATED, CREATING, ERROR, EXPIRED, FAILED, MAINTENANCE, PAUSED, REJECTED, REPLACED, VALID, VALIDATING) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | payment_method_id | Retrieve a payment method | |
list | select | default, payment_type, status, x_pagination_mode | Retrieve payment method list | |
create | insert | callback_url, payment_type | Register a new payment method | |
update | update | payment_method_id | Edit payment method | |
delete | delete | payment_method_id | Delete a payment method | |
challenge | exec | paymentMethodId, challenge | Challenge your payment method | |
details | exec | paymentMethodId | Add details to your payment method challenge | |
finalize | exec | paymentMethodId | Finalize a payment method registration |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
paymentMethodId | integer | Payment method ID |
payment_method_id | integer | Payment method ID (wire: paymentMethodId) |
default | boolean | Filter on 'default' property |
payment_type | string | Filter on 'paymentType' property (wire: paymentType) |
status | string | Filter on 'status' property |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Retrieve a payment method
SELECT
billing_contact_id,
form_session_id,
merchant_id,
payment_mean_id,
payment_method_id,
creation_date,
default,
description,
expiration_date,
icon,
integration,
label,
last_update,
oneclick,
payment_sub_type,
payment_type,
status
FROM ovh.me.payment_methods
WHERE payment_method_id = '{{ payment_method_id }}' -- required
;
Retrieve payment method list
SELECT
billing_contact_id,
form_session_id,
merchant_id,
payment_mean_id,
payment_method_id,
creation_date,
default,
description,
expiration_date,
icon,
integration,
label,
last_update,
oneclick,
payment_sub_type,
payment_type,
status
FROM ovh.me.payment_methods
WHERE default = '{{ default }}'
AND payment_type = '{{ payment_type }}'
AND status = '{{ status }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Register a new payment method
INSERT INTO ovh.me.payment_methods (
billing_contact_id,
callback_url,
default,
description,
form_data,
order_id,
payment_sub_type,
payment_type,
register
)
SELECT
{{ billing_contact_id }},
'{{ callback_url }}' /* required */,
{{ default }},
'{{ description }}',
'{{ form_data }}',
{{ order_id }},
'{{ payment_sub_type }}',
'{{ payment_type }}' /* required */,
{{ register }}
RETURNING
form_session_id,
merchant_id,
organization_id,
payment_method_id,
transaction_id,
url,
validation_type
;
# Description fields are for documentation purposes
- name: payment_methods
props:
- name: billing_contact_id
value: {{ billing_contact_id }}
description: |
Associated billing contact ID
- name: callback_url
description: |
Callback URL's necessary to register
value:
cancel: "{{ cancel }}"
error: "{{ error }}"
failure: "{{ failure }}"
pending: "{{ pending }}"
success: "{{ success }}"
- name: default
value: {{ default }}
description: |
Indicates if this payment method will be set as the default one
- name: description
value: "{{ description }}"
description: |
Personalized description
- name: form_data
value: "{{ form_data }}"
description: |
Additional payment information
- name: order_id
value: {{ order_id }}
description: |
Order ID to pay it if it's possible (in oneshot transaction or while registration)
- name: payment_sub_type
value: "{{ payment_sub_type }}"
description: |
Payment sub-type
valid_values: ['CHORUS', 'NONE']
- name: payment_type
value: "{{ payment_type }}"
description: |
Payment type
- name: register
value: {{ register }}
description: |
Register this payment method if it's possible (default value is false and will proceed a oneshot transaction)
UPDATE examples​
- update
Edit payment method
UPDATE ovh.me.payment_methods
SET
default = {{ default }},
description = '{{ description }}'
WHERE
payment_method_id = '{{ payment_method_id }}' --required
RETURNING
billing_contact_id,
form_session_id,
merchant_id,
payment_mean_id,
payment_method_id,
creation_date,
default,
description,
expiration_date,
icon,
integration,
label,
last_update,
oneclick,
payment_sub_type,
payment_type,
status;
DELETE examples​
- delete
Delete a payment method
DELETE FROM ovh.me.payment_methods
WHERE payment_method_id = '{{ payment_method_id }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- challenge
- details
- finalize
Challenge your payment method
EXEC ovh.me.payment_methods.challenge
@paymentMethodId='{{ paymentMethodId }}' --required
@@json=
'{
"challenge": "{{ challenge }}"
}'
;
Add details to your payment method challenge
EXEC ovh.me.payment_methods.details
@paymentMethodId='{{ paymentMethodId }}' --required
@@json=
'{
"details": "{{ details }}",
"transactionId": {{ transactionId }}
}'
;
Finalize a payment method registration
EXEC ovh.me.payment_methods.finalize
@paymentMethodId='{{ paymentMethodId }}' --required
@@json=
'{
"expirationMonth": {{ expirationMonth }},
"expirationYear": {{ expirationYear }},
"formSessionId": "{{ formSessionId }}",
"registrationId": "{{ registrationId }}"
}'
;