Skip to main content

payment_methods

Creates, updates, deletes, gets or lists a payment_methods resource.

Overview​

Namepayment_methods
TypeResource
Idovh.me.payment_methods

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
billing_contact_idintegerAssociated billing contact ID (wire: billingContactId)
form_session_idstringForm session ID (wire: formSessionId)
merchant_idstringMerchant ID (wire: merchantId)
payment_mean_idintegerPayment mean ID associated to this payment method (wire: paymentMeanId)
payment_method_idintegerPayment method ID (wire: paymentMethodId)
creation_datestring (date-time)Creation date (wire: creationDate)
defaultbooleanIndicates if payment method is the default one for this account
descriptionstringCustom customer description
expiration_datestring (date-time)Expiration date (wire: expirationDate)
iconobjectPayment method type icon
integrationstringPayment method integration type (BANK_TRANSFER, COMPONENT, IFRAME_VANTIV, IN_CONTEXT, NONE, OSP, POST_FORM, REDIRECT)
labelstringPayment method public label
last_updatestring (date-time)Last update date (wire: lastUpdate)
oneclickbooleanIndicates if payment method support the oneclick functionality
payment_sub_typestringPayment 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_typestringPayment method type (wire: paymentType)
statusstringPayment method status (CANCELED, CANCELING, CREATED, CREATING, ERROR, EXPIRED, FAILED, MAINTENANCE, PAUSED, REJECTED, REPLACED, VALID, VALIDATING)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpayment_method_idRetrieve a payment method
listselectdefault, payment_type, status, x_pagination_modeRetrieve payment method list
createinsertcallback_url, payment_typeRegister a new payment method
updateupdatepayment_method_idEdit payment method
deletedeletepayment_method_idDelete a payment method
challengeexecpaymentMethodId, challengeChallenge your payment method
detailsexecpaymentMethodIdAdd details to your payment method challenge
finalizeexecpaymentMethodIdFinalize 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.

NameDatatypeDescription
api_hoststringThe 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"}})
paymentMethodIdintegerPayment method ID
payment_method_idintegerPayment method ID (wire: paymentMethodId)
defaultbooleanFilter on 'default' property
payment_typestringFilter on 'paymentType' property (wire: paymentType)
statusstringFilter on 'status' property
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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
;

INSERT examples​

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
;

UPDATE examples​

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 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 your payment method

EXEC ovh.me.payment_methods.challenge
@paymentMethodId='{{ paymentMethodId }}' --required
@@json=
'{
"challenge": "{{ challenge }}"
}'
;