|
| 1 | +# CyberSource Payments |
| 2 | + |
| 3 | +{% hint style="info" %} |
| 4 | +CyberSource integration supports the `purchase` payment method. |
| 5 | +{% endhint %} |
| 6 | + |
| 7 | +{% api-method method="post" host="https://api.moltin.com" path="/v2/orders/:orderId/payments" %} |
| 8 | +{% api-method-summary %} |
| 9 | +Pay by card |
| 10 | +{% endapi-method-summary %} |
| 11 | + |
| 12 | +{% api-method-description %} |
| 13 | + |
| 14 | +{% endapi-method-description %} |
| 15 | + |
| 16 | +{% api-method-spec %} |
| 17 | +{% api-method-request %} |
| 18 | +{% api-method-path-parameters %} |
| 19 | +{% api-method-parameter name="order\_id" type="string" required=true %} |
| 20 | +The UUID of the order you want to pay for |
| 21 | +{% endapi-method-parameter %} |
| 22 | +{% endapi-method-path-parameters %} |
| 23 | + |
| 24 | +{% api-method-headers %} |
| 25 | +{% api-method-parameter name="Authorization" type="string" required=true %} |
| 26 | +The Bearer token to grant access to the API |
| 27 | +{% endapi-method-parameter %} |
| 28 | +{% endapi-method-headers %} |
| 29 | + |
| 30 | +{% api-method-body-parameters %} |
| 31 | +{% api-method-parameter name="verification\_value" type="string" required=false %} |
| 32 | +The CVV/CVC code from the back of the card |
| 33 | +{% endapi-method-parameter %} |
| 34 | + |
| 35 | +{% api-method-parameter name="year" type="string" required=false %} |
| 36 | +The expiry year of the card |
| 37 | +{% endapi-method-parameter %} |
| 38 | + |
| 39 | +{% api-method-parameter name="month" type="string" required=false %} |
| 40 | +The expiry month of the card |
| 41 | +{% endapi-method-parameter %} |
| 42 | + |
| 43 | +{% api-method-parameter name="number" type="string" required=false %} |
| 44 | +The full card number |
| 45 | +{% endapi-method-parameter %} |
| 46 | + |
| 47 | +{% api-method-parameter name="last\_name" type="string" required=false %} |
| 48 | +The last name of the card owner |
| 49 | +{% endapi-method-parameter %} |
| 50 | + |
| 51 | +{% api-method-parameter name="first\_name" type="string" required=false %} |
| 52 | +The first name of the card owner |
| 53 | +{% endapi-method-parameter %} |
| 54 | + |
| 55 | +{% api-method-parameter name="method" type="string" required=false %} |
| 56 | +`purchase` |
| 57 | +{% endapi-method-parameter %} |
| 58 | + |
| 59 | +{% api-method-parameter name="gateway" type="string" required=false %} |
| 60 | +You will use `cyber_source` in this case |
| 61 | +{% endapi-method-parameter %} |
| 62 | +{% endapi-method-body-parameters %} |
| 63 | +{% endapi-method-request %} |
| 64 | + |
| 65 | +{% api-method-response %} |
| 66 | +{% api-method-response-example httpCode=200 %} |
| 67 | +{% api-method-response-example-description %} |
| 68 | + |
| 69 | +{% endapi-method-response-example-description %} |
| 70 | + |
| 71 | +``` |
| 72 | +
|
| 73 | +``` |
| 74 | +{% endapi-method-response-example %} |
| 75 | +{% endapi-method-response %} |
| 76 | +{% endapi-method-spec %} |
| 77 | +{% endapi-method %} |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | +```text |
| 82 | +curl -X POST https://api.moltin.com/v2/orders/:orderId/payments \ |
| 83 | + -H "Authorization: Bearer XXXX" \ |
| 84 | + -d $'{ |
| 85 | + "data": { |
| 86 | + "gateway": "cyber_source", |
| 87 | + "method": "purchase", |
| 88 | + "first_name": "John", |
| 89 | + "last_name": "Smith", |
| 90 | + "number": "4111111111111111", |
| 91 | + "month": "10", |
| 92 | + "year": "2020", |
| 93 | + "verification_value": "123" |
| 94 | + } |
| 95 | + }' |
| 96 | +``` |
| 97 | + |
0 commit comments