Custom validity rules

When creating an order, validity and expiry rules that are associated with the product being purchased will be inherited by the cards created as part of that order.

However, if you want to override these validity or expiry rules, you can pass in validity_rules and expiry_config variables as part of the OrderItemInput object.

To use the validity_rules follow the example below:

 "validity_rules": [
     {
          "validity_rule_type_id": 1,
          "rule": "2021-08-14 00:08:00"
     }      
]

To use the expiry_config follow the example below:

"expiry_config": {
    "hard_expire_at": "2021-08-14 22:59:59"
 }

Take a look at the example on our API playground >

Update a card

If you want to update a card with a new validity ruleset or a new expiry config you can use the updateCard mutation. Again, you can see an example on our API playground.

Last updated