JK
TPToss payments 개발자 커뮤니티
•Created by JK on 7/30/2024 in #❓┃연동개발-문의
checkout url 에서 일시적인 오류
successUrl 과 failUrl 로 바꾸니까 되네요. 저는 이 doc 을 보고 returnUrl 이 required 라고 해서 따라했는데요. doc 가 잘못된건가요?
https://docs.tosspayments.com/en/api-guide#create-payment
11 replies
TPToss payments 개발자 커뮤니티
•Created by JK on 7/30/2024 in #❓┃연동개발-문의
checkout url 에서 일시적인 오류
widget 을 안쓰고 checkout url 을 바로 쓰려고 하는데요. 여기 영문 가이드 보면 Integrate hosted type 1번 옵션 따라 하고 있습니다.
https://docs.tosspayments.com/en/integration-types#1-create-payments-api
v1/payments request 는 그냥 postman 써서 authorization header 는 test key 쓰고, body 는 아래와 같이 테스트용 보냈습니다.
{
"orderId": "test-order-1",
"orderName": "test order 1",
"amount": 10000,
"method": "CARD",
"returnUrl": "https://google.com"
}
response 는 다음과 같습니다
{
"mId": "tvivarepublica",
"lastTransactionKey": null,
"paymentKey": "tviva20240730181702f3jE0",
"orderId": "test-order-1",
"orderName": "test order 1",
"taxExemptionAmount": 0,
"status": "READY",
"requestedAt": "2024-07-30T18:17:02+09:00",
"approvedAt": null,
"useEscrow": null,
"cultureExpense": false,
"card": null,
"virtualAccount": null,
"transfer": null,
"mobilePhone": null,
"giftCertificate": null,
"cashReceipt": null,
"cashReceipts": null,
"discount": null,
"cancels": null,
"secret": "ps_GePWvyJnrKOOWvwK6xE6rgLzN97E",
"type": "NORMAL",
"easyPay": null,
"country": "KR",
"failure": null,
"isPartialCancelable": true,
"receipt": null,
"checkout": {
"url": "https://payment-gateway-sandbox.tosspayments.com/link/payment?urlToken=checkout-url-88d6d834ef0848828384345b02057f5416f3aad191664838a16b02e491a39c0f&sessionCreationApiVersion=V3>id=a2407309b07a306c5b64ca8b0593c41f57f3ed0&flowMode=DEFAULT"
},
"currency": "KRW",
"totalAmount": 10000,
"balanceAmount": 10000,
"suppliedAmount": 9091,
"vat": 909,
"taxFreeAmount": 0,
"method": null,
"version": "2022-11-16"
}
11 replies